Bug 1224146

Summary: cannot login on gnome-classic-xorg
Product: [openSUSE] openSUSE Tumbleweed Reporter: Giacomo Comes <gcomes.obs>
Component: GNOMEAssignee: xiaoguang wang <xiaoguang.wang>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: comes, gnome-bugs, yfjiang
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Giacomo Comes 2024-05-11 20:00:38 UTC
If in the display manager (doesn't matter which), I select the xorg gnome classic session, what it is started is not gnome classic but whatever is default-xsession's setting.
Use: "update-alternatives --query default-xsession.desktop" to check the setting and set default-xsession to something different that gnome for testing purpose.
Instead if I select the wayland gnome classic session, it is correctly started no matter what the setting of default-waylandsession.
Comment 1 Giacomo Comes 2024-05-13 03:19:23 UTC
Actually the bug is with sddm and lightdm only. Gdm seems to do the right thing.
I mostly use sddm or lightdm and noticed the issue there.
Comment 2 Giacomo Comes 2024-05-13 21:47:04 UTC
In the files:
  /usr/share/xsessions/gnome-classic.desktop
  /usr/share/xsessions/gnome-classic-xorg.desktop
the Exec line is:
  Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session
If I change it to:
  Exec=/usr/bin/env GNOME_SHELL_SESSION_MODE=classic gnome-session
then sddm and lightdm are able to start gnome classic on Xorg
Comment 3 Yifan Jiang 2024-05-14 01:16:03 UTC
Xiaoguang, can you help to have a look please? Thanks.
Comment 4 Giacomo Comes 2024-05-14 17:48:18 UTC
It looks like the same 'fix' is required for the files:
  /usr/share/wayland-sessions/gnome-classic.desktop
  /usr/share/wayland-sessions/gnome-classic-wayland.desktop
Although sddm was able to start gnome-classic on wayland, lightdm wasn't.
After I applied the fix, lightdm too starts gnome-classic on wayland.
Comment 5 xiaoguang wang 2024-05-15 01:08:20 UTC
gdm sets the environment variable PATH in /etc/gdm/PreSession/Default

PATH="/usr/bin:$PATH"

So it works with gdm.

For the desktop file entry key Exec, the executable program can either be specified with its full path or with the name of the executable only(https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html).

So I’m not sure the desktop file should be changed, or the sddm and lightdm needs to adapt the desktop file.
Comment 6 Giacomo Comes 2024-05-15 16:25:12 UTC
May be sddm and lightdm need to be fixed. I'll open a bug report for them.

I have another question. There are four possible combination of gnome startup:
gnome/classic/xorg/wayland and gdm allows you to select any of them.
However, in /usr/share/xsessions and /usr/share/wayland-sessions after installing gnome-session, gnome-shell-classic and gnome-session-wayland there are eight .desktop files for the possible four combination with the result that
in sddm and lightdm you have eight possible choices:
two for gnome on xorg, two for gnome on wayland, two for gnome classic on xorg, two for gnome classic on wayland.
Why is that? It is possible to delete the four redundant .desktop file and
have sddm/lightdm/gdm offer the four combination. And everything seems to work.
Is there a (valid) reason to keep the double .desktop files?
Comment 7 xiaoguang wang 2024-05-20 03:18:26 UTC
(In reply to Giacomo Comes from comment #6)

> I have another question. There are four possible combination of gnome
> startup:
> gnome/classic/xorg/wayland and gdm allows you to select any of them.
> However, in /usr/share/xsessions and /usr/share/wayland-sessions after
> installing gnome-session, gnome-shell-classic and gnome-session-wayland
> there are eight .desktop files for the possible four combination with the
> result that
> in sddm and lightdm you have eight possible choices:
> two for gnome on xorg, two for gnome on wayland, two for gnome classic on
> xorg, two for gnome classic on wayland.
> Why is that? It is possible to delete the four redundant .desktop file and
> have sddm/lightdm/gdm offer the four combination. And everything seems to
> work.
> Is there a (valid) reason to keep the double .desktop files?

When gdm starts in X11, and support Wayland, session list will show:
gnome
gnome classic
gnome on Wayland
gnome classic on Wayland

When gdm starts in Wayland, session list will show:
gnome
gnome classic
gnome on Xorg
gnome classic on Xorg

So the all the .desktop files are needed to show the up list.