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 741658 - GDM should set XDG_SESSION_TYPE to wayland for wayland sessions
GDM should set XDG_SESSION_TYPE to wayland for wayland sessions
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-17 15:23 UTC by Ray Strode [halfline]
Modified: 2014-12-18 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session: set session type to "x11" or "wayland" as appropriate (6.79 KB, patch)
2014-12-17 16:31 UTC, Ray Strode [halfline]
committed Details | Review
Revert "session: set session type to "x11" or "wayland" as appropriate" (6.69 KB, patch)
2014-12-18 18:50 UTC, Ray Strode [halfline]
committed Details | Review
session: send display made in gdm_session_open_session (6.88 KB, patch)
2014-12-18 18:50 UTC, Ray Strode [halfline]
committed Details | Review
session: set session type to "x11" or "wayland" as appropriate (5.74 KB, patch)
2014-12-18 18:50 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2014-12-17 15:23:43 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.
Comment 1 Ray Strode [halfline] 2014-12-17 15:24:52 UTC
we could also do some heuristic with environment variables and checking if DISPLAY is set or not, but I think that's less good.
Comment 2 Ray Strode [halfline] 2014-12-17 16:31:36 UTC
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.
Comment 3 Ray Strode [halfline] 2014-12-17 16:34:51 UTC
Attachment 292910 [details] pushed as 2a3e3e0 - session: set session type to "x11" or "wayland" as appropriate
Comment 4 Ray Strode [halfline] 2014-12-18 18:50:17 UTC
Created attachment 292999 [details] [review]
Revert "session: set session type to "x11" or "wayland" as appropriate"

This reverts commit 2a3e3e02296b9ff20bc1bffcca4ed7ccf210a4fb.
Comment 5 Ray Strode [halfline] 2014-12-18 18:50:25 UTC
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.
Comment 6 Ray Strode [halfline] 2014-12-18 18:50:29 UTC
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.
Comment 7 Ray Strode [halfline] 2014-12-18 18:51:24 UTC
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