Xpra: Ticket #1104: start the dbus server automatically

A number of features rely on having a dbus server running:


The user may also have an existing dbus server running in their desktop session, but using this one can cause serious problems (ie: maybe #1032)

The usual way of working around this is to start the xpra server with:

dbus-launch xpra ..

A better way would be to automatically start the dbus server as part of xpra, through a command line switch and config option which would be enabled by default.

Fri, 29 Jan 2016 20:24:44 GMT - Antoine Martin: owner changed

Done in r11784.

What this changes:

@afarr: mostly a FYI.

Wed, 03 Feb 2016 22:05:48 GMT - alas: status changed; resolution set

Seems to be working as advertised... I'll go ahead and close.

Mon, 08 Feb 2016 18:51:10 GMT - alas: status changed; resolution deleted

Just as a note... after leaving a server running for a few days, when I shut it down with a control-c, I got the following dbus errors:

2016-02-08 10:47:34,840 got signal SIGINT, exiting
2016-02-08 10:47:34,847 Disconnecting client '':
2016-02-08 10:47:34,847  server shutdown
2016-02-08 10:47:34,874 xpra client disconnected.
2016-02-08 10:47:34,876 child 'xterm' with pid 25094 has terminated
2016-02-08 10:47:34,877 failed to release dbus notification forwarder: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
2016-02-08 10:47:34,877 child 'xterm' with pid 25097 has terminated
Exception dbus.exceptions.DBusException: DBusException('Connection is closed',) in <bound method BusName.__del__ of <dbus.service.BusName org.xpra.Server13 on <dbus._dbus.SessionBus (session) at 0x7f2be9aef650> at 0x7f2bdcc79910>> ignored

The server did shut down ok, and restarted fine though, so maybe it was just the dbus server being shut down before it could respond... Was running a 0.16.2 r11850 win32 client against a 0.16.2 r11850 fedora 23 server.

Reopening the ticket, in case this isn't just an expected signint issue.

Mon, 08 Feb 2016 18:51:28 GMT - alas: owner, status changed

Wed, 17 Feb 2016 15:18:03 GMT - Antoine Martin: priority, status changed

The DBusException from comment:3 is unlikely to be a big problem. There is a bigger problem though: using xpra exit, the dbus daemon inherits the socket from the parent process so we cannot start a new server using the same port with --use-display.

Tue, 23 Feb 2016 04:35:34 GMT - Antoine Martin: status changed; resolution set

That's fixed in r12012 so closing again, we can re-open if something else crops up.

r12018 + r12027 fixes the "xpra upgrade" / "xpra start --use-display" case. r12019 re-orders initialization so dbus-launch comes after the vfb.

Sun, 13 Mar 2016 07:27:00 GMT - Antoine Martin:

Since we now have a dbus server started by default, I have enabled dbus in pulseaudio by default: r12139

Sat, 23 Jan 2021 05:15:05 GMT - migration script:

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