Created attachment 327434 [details] /etc/X11/xinit/xinitrc.d/05-desktop-session More of an enhancement than a bug, but when using the XSESSION variable to 'startx' in runlevel 3, the resulting X11 session started has an empty $DESKTOP_SESSION environment variable. This variable is getting depended on more and more to perform other functions from scripts landing in /etc/X11/xinit/xinitrc.d/. Attached is a xinitrc.d script that sets the DESKTOP_SESSION variable to be the same as ${XSESSION} if it hasn't already been filled by a login manager. Thoughts ?
(In reply to comment #0) > Thoughts ? Upstream Xfce is handling this on it's own within /etc/xdg/xfce4/xinitrc: # set DESKTOP_SESSION so that one can detect easily if an Xfce session is running if test "x$DESKTOP_SESSION" = "x"; then DESKTOP_SESSION="xfce" export DESKTOP_SESSION fi I don't have XSESSION set to anything: $ echo $XSESSION $DESKTOP_SESSION xfce Wouldn't this patch feed the wrong value to the DESKTOP_SESSION variable and, ths, cripple the setting done by Xfce itself?
XSESSION can be "Xfce" or "Xfce4" as per: /etc/X11/Sessions/Xfce4 /etc/X11/Sessions/Xfce And DESKTOP_SESSION can be "xfce" lowercased. So this patch/improvement wouild indeed feed the wrong value to the DESKTOP_SESSION...
Hmm..yes I see how that's a problem. Was trying to come up with a global solution but that can't work as all desktops do their own thing for this in subtle ways. Thanks for replying and sorry for the noise, closing.