GNOME Bugzilla – Bug 765053
Default to wayland when session type is neither x11 nor wayland
Last modified: 2016-04-15 09:06:23 UTC
Created attachment 326007 [details] [review] Default to wayland for uninformative session types In https://bugzilla.gnome.org/show_bug.cgi?id=757715 it was decided to default to wayland and have the session type decide the backend. The implementation is in 8ec0c9. Only the logind provided session type is considered, the $XDG_SESSION_TYPE is ignored or assumed equal. In a text-mode VT it is unlikely that the logind provided session type is either "wayland" or "x11" (making it so should be considered a PAM hack). Following https://bugzilla.gnome.org/show_bug.cgi?id=741666 it is unclear how to launch a gnome session on wayland without using gdm. The expected behavior after executing `gnome-session` would be to get a session on wayland (since wayland is supposed to be the default) but instead a session on X is attempted (and fails). The attached patch fixes the logic by defaulting to wayland _unless_ the logind session type is "x11" instead of going with wayland _only if_ the logind session type is "wayland".
Created attachment 326073 [details] [review] Default to wayland after checking XDG_SESSION_TYPE A more elaborate alternative to the previous patch. This one 1) checks if the logind session type is wayland or x11 and acts accordingly 2) else, it checks $XDG_SESSION_TYPE and acts accordingly 3) otherwise (implicit in the code), it defaults to wayland
The question of whether (and how) it should be possible to launch gnome-session outside a graphical logind session (namely ttys) is discussed in bug 759388, let's keep it there. *** This bug has been marked as a duplicate of bug 759388 ***