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 706421 - Support being launched by gnome-session
Support being launched by gnome-session
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
wayland
Depends on: 706420
Blocks: wayland
 
 
Reported: 2013-08-20 16:36 UTC by Giovanni Campagna
Modified: 2013-09-11 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps (2.33 KB, patch)
2013-08-20 16:36 UTC, Giovanni Campagna
needs-work Details | Review
Stop messing with process groups and standard streams (2.97 KB, patch)
2013-08-21 14:06 UTC, Giovanni Campagna
committed Details | Review
wayland: don't require Clutter backend variables to be set from outside (2.57 KB, patch)
2013-08-21 14:06 UTC, Giovanni Campagna
reviewed Details | Review
wayland: die when gnome-session asks us to (1.18 KB, patch)
2013-08-21 14:06 UTC, Giovanni Campagna
committed Details | Review
Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps (3.22 KB, patch)
2013-09-11 09:02 UTC, Giovanni Campagna
committed Details | Review
wayland: don't require Clutter backend variables to be set from outside (1.26 KB, patch)
2013-09-11 09:02 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-20 16:36:30 UTC
Call the appropriate method on gnome-session so that autostarted
and bus activated apps see the X server and wayland socket.
Comment 1 Giovanni Campagna 2013-08-20 16:36:33 UTC
Created attachment 252456 [details] [review]
Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps
Comment 2 Colin Walters 2013-08-20 17:13:31 UTC
Review of attachment 252456 [details] [review]:

::: src/wayland/meta-wayland.c
@@ +1,1 @@
+s/*

Typo.
Comment 3 Colin Walters 2013-08-20 17:13:45 UTC
See https://people.gnome.org/~walters/user-session-patches/ by the way.
Comment 4 Giovanni Campagna 2013-08-21 07:44:50 UTC
(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?
Comment 5 Giovanni Campagna 2013-08-21 14:02:06 UTC
Ok, let's make this a general bug for supporting mutter launched by gnome-session.
Comment 6 Giovanni Campagna 2013-08-21 14:06:22 UTC
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
Comment 7 Giovanni Campagna 2013-08-21 14:06:40 UTC
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.
Comment 8 Giovanni Campagna 2013-08-21 14:06:44 UTC
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.
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-09-10 13:48:52 UTC
Review of attachment 252602 [details] [review]:

OK.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-09-10 13:50:23 UTC
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?
Comment 11 Jasper St. Pierre (not reading bugmail) 2013-09-10 13:52:37 UTC
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.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-09-10 13:54:53 UTC
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.
Comment 13 Giovanni Campagna 2013-09-10 14:01:01 UTC
(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.
Comment 14 Giovanni Campagna 2013-09-10 14:02:00 UTC
(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?
Comment 15 Jasper St. Pierre (not reading bugmail) 2013-09-10 15:53:49 UTC
(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.
Comment 16 Giovanni Campagna 2013-09-11 09:02:06 UTC
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.
Comment 17 Giovanni Campagna 2013-09-11 09:02:23 UTC
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.
Comment 18 Jasper St. Pierre (not reading bugmail) 2013-09-11 13:43:28 UTC
Review of attachment 254653 [details] [review]:

OK.
Comment 19 Jasper St. Pierre (not reading bugmail) 2013-09-11 14:14:14 UTC
Review of attachment 254652 [details] [review]:

OK.
Comment 20 Giovanni Campagna 2013-09-11 14:16:30 UTC
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