Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916045 - gnome-base/gnome-session: xinitrc.d files need to check XDG_CURRENT_DESKTOP not obsolete DESKTOP_SESSION
Summary: gnome-base/gnome-session: xinitrc.d files need to check XDG_CURRENT_DESKTOP n...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-20 12:38 UTC by Pacho Ramos
Modified: 2023-10-20 12:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :/