Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start the dbus server automatically #1104

Closed
totaam opened this issue Jan 29, 2016 · 17 comments
Closed

start the dbus server automatically #1104

totaam opened this issue Jan 29, 2016 · 17 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 29, 2016

Issue migrated from trac ticket # 1104

component: server | priority: critical | resolution: fixed | keywords: dbus

2016-01-29 20:16:04: antoine created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 29, 2016

2016-01-29 20:24:45: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Jan 29, 2016

2016-01-29 20:24:45: antoine commented


Done in r11784.

What this changes:

  • "xpra start" will start the dbus server for you, no need for "dbus-launch xpra start .."
  • "xpra upgrade" will keep track of it, so "xpra stop" will still kill the dbus server after an upgrade
  • fewer spurious warnings about pulseaudio and notifications

@afarr: mostly a FYI.

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2016

2016-02-03 22:05:49: afarr changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2016

2016-02-03 22:05:49: afarr set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2016

2016-02-03 22:05:49: afarr commented


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

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2016

2016-02-08 18:51:11: afarr changed status from closed to reopened

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2016

2016-02-08 18:51:11: afarr removed resolution (was fixed)

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2016

2016-02-08 18:51:11: afarr commented


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 '10.0.11.162:59620':
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.

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2016

2016-02-08 18:51:28: afarr changed status from reopened to new

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2016

2016-02-08 18:51:28: afarr changed owner from afarr to antoine

@totaam
Copy link
Collaborator Author

totaam commented Feb 17, 2016

2016-02-17 15:18:04: antoine changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Feb 17, 2016

2016-02-17 15:18:04: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Feb 17, 2016

2016-02-17 15:18:04: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Feb 23, 2016

2016-02-23 04:35:34: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Feb 23, 2016

2016-02-23 04:35:34: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Feb 23, 2016

2016-02-23 04:35:34: antoine commented


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.

@totaam totaam closed this as completed Feb 23, 2016
@totaam
Copy link
Collaborator Author

totaam commented Mar 13, 2016

2016-03-13 07:27:01: antoine commented


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant