GNOME Bugzilla – Bug 706421
Support being launched by gnome-session
Last modified: 2013-09-11 14:16:47 UTC
Call the appropriate method on gnome-session so that autostarted and bus activated apps see the X server and wayland socket.
Created attachment 252456 [details] [review] Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps
Review of attachment 252456 [details] [review]: ::: src/wayland/meta-wayland.c @@ +1,1 @@ +s/* Typo.
See https://people.gnome.org/~walters/user-session-patches/ by the way.
(In reply to comment #3) > See https://people.gnome.org/~walters/user-session-patches/ by the way. Yes but, are we merging some of those patches? Is user@.service coming any time soon?
Ok, let's make this a general bug for supporting mutter launched by gnome-session.
Created attachment 252602 [details] [review] Stop messing with process groups and standard streams We can be launched by gnome-session now, which implies: 1) gdb must attached from outside (and the Ctrl-C problem is gone) 2) stdin is /dev/null already 3) stdout is the journal, not the terminal
Created attachment 252603 [details] [review] wayland: don't require Clutter backend variables to be set from outside When running under mutter-launch, we can assume we're running on bare metal, and set the clutter backend appropriately.
Created attachment 252604 [details] [review] wayland: die when gnome-session asks us to At logout, we want to die when gnome-session tells us. Previously, we were relying on the X server going down (killed by GDM at the end of the session), but we can't use that in wayland.
Review of attachment 252602 [details] [review]: OK.
Review of attachment 252456 [details] [review]: ::: src/wayland/meta-wayland.c @@ +1650,3 @@ + g_free (display_name); + + set_gnome_env ("WAYLAND_DISPLAY", "wayland-0"); Do we know this, or is this an assumption that there will only be one Wayland session at a time?
Review of attachment 252603 [details] [review]: ::: src/core/main.c @@ +258,3 @@ + { + g_setenv ("CLUTTER_BACKEND", "eglnative", TRUE); + g_setenv ("CLUTTER_INPUT_BACKEND", "evdev", TRUE); I'd rather see Clutter APIs for this instead of setenv. Ugh.
Review of attachment 252604 [details] [review]: Hm. Do we want to die, or do we want to wait for gdm to kill us? This looks good.
(In reply to comment #12) > Review of attachment 252604 [details] [review]: > > Hm. Do we want to die, or do we want to wait for gdm to kill us? > > This looks good. gdm only kills the X server. If it grows wayland support, I would expect it to only kill gnome-session or the dbus-daemon.
(In reply to comment #10) > Review of attachment 252456 [details] [review]: > > ::: src/wayland/meta-wayland.c > @@ +1650,3 @@ > + g_free (display_name); > + > + set_gnome_env ("WAYLAND_DISPLAY", "wayland-0"); > > Do we know this, or is this an assumption that there will only be one Wayland > session at a time? wl_display_create() already hardcodes wayland-0 (In reply to comment #11) > Review of attachment 252603 [details] [review]: > > ::: src/core/main.c > @@ +258,3 @@ > + { > + g_setenv ("CLUTTER_BACKEND", "eglnative", TRUE); > + g_setenv ("CLUTTER_INPUT_BACKEND", "evdev", TRUE); > > I'd rather see Clutter APIs for this instead of setenv. Ugh. And are you blocking on that API addition?
(In reply to comment #13) > gdm only kills the X server. If it grows wayland support, I would expect it to > only kill gnome-session or the dbus-daemon. Yeah. ACN then. (In reply to comment #14) > wl_display_create() already hardcodes wayland-0 OK. > And are you blocking on that API addition? If you think you can get it in in time, yes.
Created attachment 254652 [details] [review] Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps Call the appropriate method on gnome-session so that autostarted and bus activated apps see the X server and wayland socket.
Created attachment 254653 [details] [review] wayland: don't require Clutter backend variables to be set from outside When running under mutter-launch, we can assume we're running on bare metal, and set the clutter backend appropriately.
Review of attachment 254653 [details] [review]: OK.
Review of attachment 254652 [details] [review]: OK.
Attachment 252604 [details] pushed as 72ca2b2 - wayland: die when gnome-session asks us to Attachment 254652 [details] pushed as 227fb56 - Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps Attachment 254653 [details] pushed as 7360aec - wayland: don't require Clutter backend variables to be set from outside