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 772924 - [PATCH] Don't install Xorg session file twice
[PATCH] Don't install Xorg session file twice
Status: RESOLVED NOTGNOME
Product: gnome-session
Classification: Core
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-14 10:42 UTC by Balló György
Modified: 2016-10-14 20:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't install Xorg session file twice (752 bytes, patch)
2016-10-14 10:42 UTC, Balló György
none Details | Review

Description Balló György 2016-10-14 10:42:46 UTC
Created attachment 337696 [details] [review]
Don't install Xorg session file twice

Currently the GNOME Xorg session has two equal session files:
- /usr/share/xsessions/gnome-xorg.desktop
- /usr/share/xsessions/gnome.desktop

I think the latter file is pointless, and causes problems and duplicated entries in some display managers (e.g. in LightDM), because its name is the same as the Wayland session file. It would be a much cleaner to have:
- "GNOME" session only in wayland-sessions.
- "GNOME on Xorg" session in xsessions.
Comment 1 Ray Strode [halfline] 2016-10-14 16:10:07 UTC
fallback is implemented by having the same session available in /usr/share/wayland-sessions and /usr/share/xsessions
Comment 2 Balló György 2016-10-14 17:07:15 UTC
(In reply to Ray Strode [halfline] from comment #1)
> fallback is implemented by having the same session available in
> /usr/share/wayland-sessions and /usr/share/xsessions

But it's implemented only in GDM. Other display managers may confused by having two sessions with the same name.

And if Wayland is disabled or unsupported, then the two xsessions (gnome-xorg, gnome) are identical, both launch the same GNOME on Xorg session. I see no reason to keep both of them.
Comment 3 Ray Strode [halfline] 2016-10-14 17:52:52 UTC
sure, but gnome doesn't work well with other display managers anyway.  I mean lock screen relies on GDM.

The reason to keep gnome.desktop is it's used as a wayland fallback if wayland fails.  The reason to keep gnoem-xorg is so people can explicitly choose Xorg even if wayland wouldn't have fallen back.  Eventually gnome-xorg will get dropped but not for a while.
Comment 4 Balló György 2016-10-14 18:50:58 UTC
(In reply to Ray Strode [halfline] from comment #3)
> The reason to keep gnome.desktop is it's used as a wayland fallback if
> wayland fails.  The reason to keep gnoem-xorg is so people can explicitly
> choose Xorg even if wayland wouldn't have fallen back.  Eventually
> gnome-xorg will get dropped but not for a while.

I think it would better to hard-code the whole fallback think in GDM, e.g. if gnome wayland-session fails, then start the gnome-xorg xsession.
Comment 5 Ray Strode [halfline] 2016-10-14 19:58:34 UTC
That's a possibility, but it has a few problems (What should get written to accountsservice ? gnome ? gnome-xorg ?  what if the user uninstalls the proprietary nvidia driver, what should get used then ? What if another desktop (say kde or enlightenment) want to fall back too ? Do I need to hardcode their options?)

Honestly, since lightdm doesn't support wayland sessions anyway, probably the best bet would be for the distribution to package the gnome-xorg session inside a wayland-support subpackage, and make lightdm conflict with that subpackage.
Comment 6 Balló György 2016-10-14 20:13:16 UTC
LightDM supports Wayland sessions, but unable to handle multiple sessions with the same name. I reported this problem on LightDM bug tracker:
https://bugs.launchpad.net/lightdm/+bug/1633599