Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916045

Summary: gnome-base/gnome-session: xinitrc.d files need to check XDG_CURRENT_DESKTOP not obsolete DESKTOP_SESSION
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pacho Ramos gentoo-dev 2023-10-20 12:38:09 UTC
All the xinitrc.d files provided by gnome-session are using a (now obsolete) parsing of DESKTOP_SESSION variable:
[ "$DESKTOP_SESSION" = "gnome" -o "$DESKTOP_SESSION" = "cinnamon" ]

The problem is that, at present time, that variable doesn't cover at all the different gnome-shell modes. Those are properly represented by the XDG_CURRENT_DESKTOP variable. For example, if I login in a "GNOME Classic on Xorg" session, I get DESKTOP_SESSION=gnome-classic-xorg. On the other hand, XDG_CURRENT_SESSION gives all the info: GNOME-Classic:GNOME.

Situation is even worse for modes not having "gnome" in their name, on those cases even the word "gnome" won't appear at all in DESKTOP_SESSION, while it will be correctly reported by XDG_CURRENT_SESSION (for example pch:GNOME for my customized sessions... or Ubuntu ones too)

Currently the scripts are then not being executed except on plain gnome session on wayland as, even GNOME on xorg won't fit the conditionals.

Something like:
case "$XDG_CURRENT_DESKTOP" in
	*GNOME*)
		...........
		;;
esac

would work... but I don't have a cinnamon session now to discover its value on XDG_CURRENT_DESKTOP :/