xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 5 months ago

#1123 closed enhancement (fixed)

move more initialization code into server core class

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: server Version: trunk
Keywords: Cc:

Description

This will allow us to cleanup the code somewhat and avoid issues like #1122, or at least solve them more cleanly.
The server knows if it is doing an upgrade, exit or stop - so the exit code stuff can go away too.

Change History (12)

comment:1 Changed 3 years ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

comment:2 Changed 3 years ago by Antoine Martin

Milestone: 1.0future
Status: newassigned

Too late for this release (likely to cause tricksy bugs).

comment:3 Changed 3 years ago by Antoine Martin

This would help simplify the code used for remote ssh start: we could just start a "plain" server and let the client tell the server what it wants without using command line arguments. (better cross version compatibility)
See #1319 which does this for starting sessions via the proxy.

comment:4 Changed 14 months ago by Antoine Martin

Milestone: future3.0

See also #1838, #1943

Last edited 14 months ago by Antoine Martin (previous) (diff)

comment:5 Changed 14 months ago by Antoine Martin

r20286 moves in this direction.

comment:6 Changed 8 months ago by Antoine Martin

Blocker for #2187

comment:7 Changed 6 months ago by Antoine Martin

Preparatory work in r22652.

This is really hard: we can't instantiate the server class early because it (indirectly) loads GTK and X11 bindings, and for those we need to have initialized the vfb, which requires the following components to have been initialized too:

  • pam
  • daemonization
  • logging / directories creation
  • uinput virtual devices
  • dbus

etc..
Even within those components, there are dependencies: uinput before pam, etc..

comment:8 Changed 6 months ago by Antoine Martin

Updates:

  • r22654 + r22655: move some initialization / validation code to methods
  • r22656 move vfb resizing to server_init()
  • r22659 move dbus bits
  • r22660 move dbus kill and property handling to server

Other undocumented rules I have (re)discovered:

  • dbus before gtk3
  • sockets before vfb?

comment:9 Changed 6 months ago by Antoine Martin

Updates:

comment:10 Changed 5 months ago by Antoine Martin

Updates:

  • r22666 close gtk display on exit now for all types of servers (+r22667 and r22668 fixups)
  • r22669 always fsync and close the pipe when using displayfd
  • r22670 + r22674: move socket cleanup code to the server
  • r22671 fix --bind-ssl socket errors on start (backport in r22672)
  • r22676 ssl setup moved
  • r22677 fixup dbus refactoring

Still TODO:

  • derive mdns data from socket info and move mdns setup code to server
  • find a way to move display related stuff into the server class, delaying the actual bindings initialization until we have a display to connect to.. (hard)

comment:11 Changed 5 months ago by Antoine Martin

Updates:

comment:12 Changed 5 months ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Updates:

Moving the display stuff to #2294.

This will do for 3.0.

Note: See TracTickets for help on using tickets.