xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 9 years ago

Closed 9 years ago

Last modified 6 months ago

#210 closed defect (fixed)

avoid client server loops

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.8
Component: core Version: trunk
Keywords: Cc:


At the moment, there is nothing stopping someone from doing something stupid like:

xpra start :10
DISPLAY=:10 xpra attach :10
DISPLAY=:10 xterm&

This results in the same problem if going via more than one hop:

xpra start :10
xpra start :11
DISPLAY=:10 xpra attach :11
DISPLAY=:11 xpra attach :10
DISPLAY=:10 xterm&

Both will create a loop, and cause the new window to appear on the first server, then be forwarded on the second where it is forwarded back to the first... until everything goes down in flames.

We can prevent this by:

  • defining a unique random server session ID on startup, exposed via a root window property
  • carrying this value with all objects (windows, trays, notifications) we forward to the client - looking up the session ID first on the object itself (if possible) in case this object is already forwarded from somewhere else
  • when receiving objects, the client should then set this session ID property on the client copy of the object (so if the client is running from within an xpra server, the server will see the forwarded session ID)
  • on startup, the client should look for the root window session ID and hand it over to the server it connects to as the "client-session-ID", the server can then avoid forwarding windows which already belong to the same session ID as the client (since they will already be there).

Attachments (1)

forward-window-server-uuid.patch (8.1 KB) - added by Antoine Martin 9 years ago.
forwards the server uuid the window originally belongs to

Download all attachments as: .zip

Change History (3)

comment:1 Changed 9 years ago by Antoine Martin

Resolution: fixed
Status: newclosed
  • part1 done in r2243
  • we cannot do part2 easily unfortunately: the server will pick up a new window as soon as the xpra client creates a new gdk.Window when we process the do_map_event, which is before we get a chance to set the property which would let the server know the server-uuid that this new window belongs to... (see patch)

This will do for now.

Changed 9 years ago by Antoine Martin

forwards the server uuid the window originally belongs to

comment:2 Changed 6 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/210

Note: See TracTickets for help on using tickets.