summaryrefslogtreecommitdiff
path: root/daemon/gdm-x-session.c
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2015-02-22 22:19:37 +0200
committerRay Strode <rstrode@redhat.com>2015-02-22 16:56:21 -0500
commit9bac8121debeefe3ec25a8fb0a005e0cd4c7a394 (patch)
tree0cde6ad8a14d52caaf1ff1a7b75f7df2e2fb1e42 /daemon/gdm-x-session.c
parent5b95e62243232e2d22bd0211714f24e20563725c (diff)
downloadgdm-9bac8121debeefe3ec25a8fb0a005e0cd4c7a394.tar.gz
gdm-x-session: pass display location to dbus-daemon
The DISPLAY and XAUTHORITY environment variables need to be set in the bus daemon environment so that programs activated via the session bus can access the display. https://bugzilla.gnome.org/show_bug.cgi?id=744946
Diffstat (limited to 'daemon/gdm-x-session.c')
-rw-r--r--daemon/gdm-x-session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index c3c638ef..dfd60166 100644
--- a/daemon/gdm-x-session.c
+++ b/daemon/gdm-x-session.c
@@ -385,6 +385,10 @@ spawn_bus (State *state,
arguments = g_ptr_array_new ();
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
+
+ g_subprocess_launcher_setenv (launcher, "DISPLAY", state->display_name, TRUE);
+ g_subprocess_launcher_setenv (launcher, "XAUTHORITY", state->auth_file, TRUE);
+
g_subprocess_launcher_take_fd (launcher, pipe_fds[1], BUS_ADDRESS_FILENO);
bus_address_fd_string = g_strdup_printf ("%d", BUS_ADDRESS_FILENO);