After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761568 - daemon: support dbus user buses with X sessions
daemon: support dbus user buses with X sessions
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-04 18:41 UTC by Ray Strode [halfline]
Modified: 2016-05-04 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: support dbus user buses with X sessions (7.96 KB, patch)
2016-02-04 18:41 UTC, Ray Strode [halfline]
committed Details | Review
daemon: import DISPLAY into user bus (11.71 KB, patch)
2016-05-04 18:39 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2016-02-04 18:41:27 UTC
If the dbus user bus was started when the user first
logged in, before the session was started, then that
dbus daemon won't have DISPLAY and XAUTHORITY in its
activation environment.

This means programs activated from that dbus daemon
also won't have DISPLAY and XAUTHORITY in their
activation environments.

This commit changes GDM to explicitly put the two
variables in the activation environment via D-Bus,
rather than sending them into the bus environment
process when launching the bus (since in the case
of the user bus, we don't launch it).
Comment 1 Ray Strode [halfline] 2016-02-04 18:41:32 UTC
Created attachment 320464 [details] [review]
daemon: support dbus user buses with X sessions
Comment 2 Ray Strode [halfline] 2016-02-04 18:42:31 UTC
Attachment 320464 [details] pushed as 99eeae9 - daemon: support dbus user buses with X sessions
Comment 3 Ray Strode [halfline] 2016-05-04 18:39:00 UTC
Created attachment 327312 [details] [review]
daemon: import DISPLAY into user bus

commit 99eeae91c1f11997521ad3bc016a7b2d23ec7942 attempted to
support dbus user buses with X sessions, by supposedly importing
DISPLAY and XAUTHORITY into the dbus user bus activation
environment.

It didn't actually work, though, because the spawn_bus function
quits early if the dbus daemon is already running.

This commit fixes the code so that the activation environment is
always updated.
Comment 4 Ray Strode [halfline] 2016-05-04 18:39:23 UTC
Attachment 327312 [details] pushed as d1820d8 - daemon: import DISPLAY into user bus