Comment 18 for bug 398300

Revision history for this message
Mark Wilkinson (mhw) wrote : Re: The new gdm doesn't give an option to use .xsession

I've got an alternative explanation for what's going wrong here. The default GNOME session runs gnome-session and this in turn runs /etc/gdm/Xsession as mentioned in comment #14. As pointed out there, /etc/gdm/Xsession runs through the session scripts in /etc/X11/Xsession.d. This includes 50x11-common_determine-startup which should cause ~/.xsession to be picked up. What's going wrong is that a set of environment variables that are normally set by /etc/X11/Xsession are not set by /etc/gdm/Xsession, including things like USERXSESSION. So when the scripts run they don't behave as designed.

A simple kludge to get things working is to observe that /etc/gdm/Xsession sources /etc/xprofile and ~/.xprofile very early on, and we can use one of these files to set the environment up correctly for the Xsession.d scripts. Stick the attached script into /etc/xprofile (or ~/.xprofile) and see if that gets .xsession working again. It works for my dot files that depend on .xsessionrc getting sourced.

I'm not sure what a more correct fix would look like as I haven't delved into which files are sourced from Debian/Ubuntu sources and which are from upstream (and hence less favourable for changes).