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 706420 - Support launching wayland sessions
Support launching wayland sessions
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
wayland
Depends on:
Blocks: wayland 706421
 
 
Reported: 2013-08-20 16:34 UTC by Giovanni Campagna
Modified: 2013-09-09 20:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GsmManager: remove obsolete code for talking with GDM (19.45 KB, patch)
2013-08-20 16:34 UTC, Giovanni Campagna
committed Details | Review
Stop connecting to the X11 server (89.59 KB, patch)
2013-08-20 16:34 UTC, Giovanni Campagna
committed Details | Review
fail-whale: don't rely on the x11 GTK backend (1.83 KB, patch)
2013-08-20 16:34 UTC, Giovanni Campagna
committed Details | Review
Add a new autostart phase, DisplayServer, that runs before Initialization (5.36 KB, patch)
2013-08-20 16:34 UTC, Giovanni Campagna
committed Details | Review
Add basic support for running in wayland (2.29 KB, patch)
2013-08-20 16:34 UTC, Giovanni Campagna
committed Details | Review
GsmManager: don't attempt to restart a wayland compositor (2.60 KB, patch)
2013-08-21 12:18 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-20 16:34:08 UTC
Yes, the future is systemd in the session, but gnome-session works,
right now, and just fine - provided you insist enough :)
Comment 1 Giovanni Campagna 2013-08-20 16:34:11 UTC
Created attachment 252451 [details] [review]
GsmManager: remove obsolete code for talking with GDM

These days shutdown and reboot is handled by logind everywhere, no
need for this ancient code.
Comment 2 Giovanni Campagna 2013-08-20 16:34:15 UTC
Created attachment 252452 [details] [review]
Stop connecting to the X11 server

Remove all GTK+ code from the main gnome-session binary (including
the two fallback mode dialogs), so that gnome-session can run
when X is not available.
Comment 3 Giovanni Campagna 2013-08-20 16:34:19 UTC
Created attachment 252453 [details] [review]
fail-whale: don't rely on the x11 GTK backend

This way, we can run as a wayland client, in case XWayland crashed.
Comment 4 Giovanni Campagna 2013-08-20 16:34:24 UTC
Created attachment 252454 [details] [review]
Add a new autostart phase, DisplayServer, that runs before Initialization

This way, the wayland compositor can initialize (and spawn XWayland)
before gnome-settings-daemon starts.
Comment 5 Giovanni Campagna 2013-08-20 16:34:28 UTC
Created attachment 252455 [details] [review]
Add basic support for running in wayland

Add gnome-wayland, a session running gnome-shell-wayland and
gnome-settings-daemon.
Comment 6 Ray Strode [halfline] 2013-08-20 16:43:11 UTC
Review of attachment 252451 [details] [review]:

looks mostly okay... feel free to commit after this change:

::: data/gnome-wayland.session.desktop.in.in
@@ +1,3 @@
+[GNOME Session]
+_Name=GNOME on Wayland
+RequiredComponents=gnome-settings-daemon;

looks like this file snuck into the wrong commit.
Comment 7 Ray Strode [halfline] 2013-08-20 16:46:48 UTC
Review of attachment 252452 [details] [review]:

::: gnome-session/main.c
@@ +279,3 @@
 
+        if (getenv ("DISPLAY") == NULL) {
+                /* Not connected to X11, someone else will take care of checking GL */

hmm, aren't we shifting toward DISPLAY staying unset and xtrans using XDG_RUNTIME_DIR/something ?
Comment 8 Ray Strode [halfline] 2013-08-20 16:47:55 UTC
Review of attachment 252453 [details] [review]:

::: gnome-session/gsm-fail-whale-dialog.c
@@ +57,3 @@
+        GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+
+#ifdef GDK_WINDOWING_X11

maybe move this up above the declarations to prevent the compiler of warning about unused variables.
Comment 9 Ray Strode [halfline] 2013-08-20 16:50:02 UTC
Review of attachment 252454 [details] [review]:

looks mostly okay.

::: gnome-session/gsm-manager.c
@@ +2661,3 @@
                              GSM_MANAGER_ERROR,
                              GSM_MANAGER_ERROR_NOT_IN_INITIALIZATION,
+                             "Setenv interface is only available during the DisplayServer and Initialization phase");

why did you change this message?
Comment 10 Ray Strode [halfline] 2013-08-20 16:51:03 UTC
Review of attachment 252455 [details] [review]:

Make sure distcheck still works after this.
Comment 11 Giovanni Campagna 2013-08-21 07:43:31 UTC
(In reply to comment #9)
> Review of attachment 252454 [details] [review]:
> 
> looks mostly okay.
> 
> ::: gnome-session/gsm-manager.c
> @@ +2661,3 @@
>                               GSM_MANAGER_ERROR,
>                               GSM_MANAGER_ERROR_NOT_IN_INITIALIZATION,
> +                             "Setenv interface is only available during the
> DisplayServer and Initialization phase");
> 
> why did you change this message?

Because Setenv becomes available in the DisplayServer and Initialization phases.
Comment 12 Giovanni Campagna 2013-08-21 12:18:24 UTC
Created attachment 252542 [details] [review]
GsmManager: don't attempt to restart a wayland compositor

There is no point in restarting it, the session is already gone.
And we can't show a fail whale either, so just log a message to
the journal and die.
Comment 13 Ray Strode [halfline] 2013-08-21 12:46:10 UTC
Hi,
> > ::: gnome-session/gsm-manager.c
> > @@ +2661,3 @@
> >                               GSM_MANAGER_ERROR,
> >                               GSM_MANAGER_ERROR_NOT_IN_INITIALIZATION,
> > +                             "Setenv interface is only available during the
> > DisplayServer and Initialization phase");
> > 
> > why did you change this message?
Ahhh, splinter hid the "and Initialization phase" from me.
Comment 14 Alban Crequy 2013-08-23 21:33:11 UTC
(In reply to comment #4)
> Created an attachment (id=252454) [details] [review]
> Add a new autostart phase, DisplayServer, that runs before Initialization
> 
> This way, the wayland compositor can initialize (and spawn XWayland)
> before gnome-settings-daemon starts.

Bug #706692 adds a new phase EARLY_INITIALIZATION just before INITIALIZATION for gnome-initial-setup-copy-work (see also #704956) to install files in $HOME (so far, it installs dconf, GOA accounts, keyrings). I don't know much about XWayland: does it need to be run after files are installed in $HOME, or does it matter?
Comment 15 Ray Strode [halfline] 2013-09-03 14:20:32 UTC
Attachment 252542 [details] pushed as e2fb2ef - GsmManager: don't attempt to restart a wayland compositor
Comment 16 Ray Strode [halfline] 2013-09-09 20:43:10 UTC
Comment on attachment 252455 [details] [review]
Add basic support for running in wayland

this wasn't actually commited before but is now: