tvrzna / emptty

Dead simple CLI Display Manager on TTY
MIT License
696 stars 26 forks source link

Set XDG_CURRENT_DESKTOP using DesktopNames= value #93

Closed edmonds closed 1 year ago

edmonds commented 1 year ago

Hi,

If I understand correctly, there is a key DesktopNames= in the desktop entry specification that should be set by the login manager. From https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys:

$XDG_CURRENT_DESKTOP should have been set by the login manager, according to the value of the DesktopNames found in the session file. The entry in the session file has multiple values separated in the usual way: with a semicolon.

It looks like gdm3, lightdm, and lxdm all set this environment variable, and I see that some DEs/WMs set the DesktopNames= key in their .desktop session files, such as GNOME, i3, phosh, icewm, enlightenment, wayfire, etc.

Should emptty also read DesktopNames= from the session .desktop file and use it to set the XDG_CURRENT_DESKTOP environment variable?

Thanks!

tvrzna commented 1 year ago

Hello, that's outstanding research! There is no reason to not implement it, especially with it's just read -> set value.