GNOME Bugzilla – Bug 741658
GDM should set XDG_SESSION_TYPE to wayland for wayland sessions
Last modified: 2014-12-18 18:51:42 UTC
In order to support a bus activated future for the user session, we need to have one desktop file for gnome-shell. That means nuking gnome-shell-wayland.desktop, gnome-shell.desktop, and gnome-shell-classic.desktop and having a lone org.gnome.Shell.desktop We already can figure things out for classic, IIRC, but for wayland we need to DTRT without --wayland or --display-server getting passed. The easiest way to know whether or not to do the right thing would be to query logind for the user's session and find out the type. If it's type is wayland then we should provide a wayland session. If its type is X11 then we shouldn't. Unfortunately, looking, GDM doesn't currently set XDG_SESSION_TYPE for wayland sessions. So this bug report is about making GDM set XDG_SESSION_TYPE in its worker before calling pam_open_session.
we could also do some heuristic with environment variables and checking if DISPLAY is set or not, but I think that's less good.
Created attachment 292910 [details] [review] session: set session type to "x11" or "wayland" as appropriate logind has a "session type" property which is useful for determining what kind of session the user is using. This commit makes sure that property gets set appropriately.
Attachment 292910 [details] pushed as 2a3e3e0 - session: set session type to "x11" or "wayland" as appropriate
Created attachment 292999 [details] [review] Revert "session: set session type to "x11" or "wayland" as appropriate" This reverts commit 2a3e3e02296b9ff20bc1bffcca4ed7ccf210a4fb.
Created attachment 293000 [details] [review] session: send display made in gdm_session_open_session It's more appropriate there then in in establish credentials callback. Also, we're going to need to add more pre-open code, so having it all in one gdm_session_open_session is a good idea.
Created attachment 293001 [details] [review] session: set session type to "x11" or "wayland" as appropriate logind has a "session type" property which is useful for determining what kind of session the user is using. This commit makes sure that property gets set appropriately.
had to have another go at this. the first time round the environment was getting set too late in the process. Attachment 292999 [details] pushed as 72ed641 - Revert "session: set session type to "x11" or "wayland" as appropriate" Attachment 293000 [details] pushed as b58b60a - session: send display made in gdm_session_open_session Attachment 293001 [details] pushed as 806f2de - session: set session type to "x11" or "wayland" as appropriate