lightdm does not source .xsession

Bug #1468834 reported by Derek Martin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

There is a decades-old standard protocol for starting up a user's X session, which requires display managers to source the user's ~/.xsession file. lightdm fails to do this. See also Bug #1468832.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

To me it looks like lightdm does the right thing in /usr/sbin/lightdm-session.

According to the files in /etc/X11/Xsession.d, which belong to x11-common, the intended behavior seems to be to not source ~/.xsession. Which standard protocol are you referring to? Are you possibly mixing it up with ~/.xsessionrc, which is sourced by lightdm if it exists?

affects: lightdm (Ubuntu) → xorg (Ubuntu)
Changed in xorg (Ubuntu):
status: New → Incomplete
Revision history for this message
Derek Martin (code-pizzashack) wrote :

Try:

  man xsession

The X window system has been reading this file since forever.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, thanks. Can't help feeling that the rest of the x11-common package has diverged from that man page.

Changed in xorg (Ubuntu):
status: Incomplete → New
Revision history for this message
Derek Martin (code-pizzashack) wrote :

It may well have, but it's a change that's bad. For what it's worth, the Debian manuals still document this:

  https://www.debian.org/doc/manuals/debian-reference/ch07.en.html#_customizing_the_x_session_classic_method

I've been a member of the Linux community for 20 years--Take comfort in the fact that these shell scripts have often changed rather arbitrarily over the years on many different distributions, and the owners of those changes seemingly do not understand the consequences of the changes they have made.

This stuff was designed this way for a reason... It's supposed to make it easy for the user to customize their X window system session regardless of what shell they use or how they have their environment set up. This change is one of several that actually work against that goal.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Now it sounds as if you are mostly talking about the use of ~/.profile. But sure, the lack of cross-distro standards is sad. That's true for other things but config files, btw.

Anyway, I noticed this comment:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1468832/comments/7

So closing this bug.

Changed in xorg (Ubuntu):
status: New → Invalid
Revision history for this message
Derek Martin (code-pizzashack) wrote :

I don't follow the reason for closing this... It seems like maybe you're thinking I said this bug is all wrong, but it's not. The point is that instead of *sourcing* $HOME/.xsession, the Xsession system script should *exec* it if it exists, completely bypassing the rest of the system Xsession script. The debian manual I linked to actually describes that behavior. The point is, Ubuntu appears to ignore it entirely.

Revision history for this message
Derek Martin (code-pizzashack) wrote :

From the debian manual:

> any user who defines "~/.xsession" or "~/.Xsession" is able to customize the action of "/etc/X11/Xsession" by completely overriding the system code.

It does (or did) that by executing the script via exec...

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Please study /etc/X11/Xsession.d/50x11-common_determine-startup

If I understand it correctly, ~/.xsession may be used as a fall back script, and does normally not apply if you start the session from e.g. lightdm or GDM. The $STARTUP variable gets set in /etc/X11/Xsession.d/20x11-common_process-args

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.