Upstart packaging conflicts with man Xsession

Bug #1457730 reported by Alkis Georgopoulos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
High
Alkis Georgopoulos
upstart (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 14.04, upstart 1.12.1-0ubuntu4.2.

man Xsession:
"Xsession may optionally be passed a single argument indicating the type of X session to be started."
"default produces the same behavior as if no session type argument had been given at all."

In /etc/X11/Xsession.d/20x11-common_process-args and in /etc/X11/Xsession.d/50x11-common_determine-startup, Xsession processes its command line, the user settings, and the Debian alternatives system and sets STARTUP which after that is the correct program to run.
I.e. the program to run is decided at the "50" number.

As an example of correct behaviour, gnome-session-common in /etc/X11/Xsession.d/55gnome-session_gnomerc processes $STARTUP in 55gnome-session_gnomerc.

Unfortunately /etc/X11/Xsession.d/00upstart doesn't care for $STARTUP only works if "$1" points to an Exec= line of an xsession.desktop file. This does work with e.g. lightdm, but it breaks in a lot of other cases, notably in LTSP where LDM passes "" as the default case when the user didn't select anything at all from the session selection combo box.

This used to work in 12.04 and it's now broken in 14.04. I haven't checked non LTS releases.

The fix consists of two parts:
1) To rename /etc/X11/Xsession.d/00upstart to /etc/X11/Xsession.d/55upstart, so that $STARTUP is set. This doesn't cause any issues with the variables that 00upstart sets inside it, they're only accessed after the "50" number which is where $STARTUP is determined.
2) Inside 55upstart, to change
BASESESSION=${1% *}
to
BASESESSION=${STARTUP%% *}
That's all, but if you do want more common code with 55gnome-session_gnomerc, you can copy the code from there, it does the same thing even if it calls it BASESTARTUP instead of BASESESSION.

Thanks,
Alkis

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

To work around the issue from the LTSP side, I pushed the following changes:
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ldm-trunk/revision/1577
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2646

Anyone interested in getting Unity to work with LTSP in Ubuntu 14.04 should apply for an SRU,
either for upstart if this bug is accepted and fixed, or for LTSP.

In the meantime, I've upload patched LTSP and LDM packages for LTS versions only to the Greek schools PPA:
https://launchpad.net/~ts.sch.gr/+archive/ppa

Changed in ltsp (Ubuntu):
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fix released in LDM 2.2.16.

Changed in ltsp (Ubuntu):
status: Fix Committed → Fix Released
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.