Merge lp:~laney/upstart/xsession-sessiontype into lp:ubuntu/raring/upstart

Proposed by Iain Lane
Status: Merged
Merged at revision: 1437
Proposed branch: lp:~laney/upstart/xsession-sessiontype
Merge into: lp:ubuntu/raring/upstart
Diff against target: 41 lines (+14/-1)
3 files modified
debian/changelog (+7/-0)
debian/user-conf/xsession-init.conf (+1/-1)
debian/xsession.d/99upstart (+6/-0)
To merge this branch: bzr merge lp:~laney/upstart/xsession-sessiontype
Reviewer Review Type Date Requested Status
Stéphane Graber Approve
James Hunt Pending
Review via email: mp+153412@code.launchpad.net

Description of the change

Currently the gnome-session user job's start on condition is

  start on xsession SESSION=ubuntu

which seems overly specific. That job can work for any gnome-session.

While the Xsession.d scripts are being processed, there is a $BASESTARTUP variable set in 55gnome-session_gnomerc that we can use to determine which session manager is being used. Currently we only look for gnome-session but others could extend this if they wish.

If accepted, I'll modify gnome-session's job accordingly.

To post a comment you must log in.
1434. By Iain Lane

Quote variable

Revision history for this message
Stéphane Graber (stgraber) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-03-07 21:16:26 +0000
+++ debian/changelog 2013-03-14 16:57:22 +0000
@@ -1,3 +1,10 @@
1upstart (1.7-0ubuntu2) UNRELEASED; urgency=low
2
3 * Set $SESSIONTYPE when emitting the xsession event that specifies the type
4 of session being launched. Currently only gnome-session is supported.
5
6 -- Iain Lane <iain.lane@canonical.com> Thu, 14 Mar 2013 16:28:35 +0000
7
1upstart (1.7-0ubuntu1) raring; urgency=low8upstart (1.7-0ubuntu1) raring; urgency=low
29
3 [ Stéphane Graber ]10 [ Stéphane Graber ]
411
=== modified file 'debian/user-conf/xsession-init.conf'
--- debian/user-conf/xsession-init.conf 2013-03-07 18:52:38 +0000
+++ debian/user-conf/xsession-init.conf 2013-03-14 16:57:22 +0000
@@ -9,5 +9,5 @@
9end script9end script
1010
11script11script
12 exec initctl emit xsession SESSION=$DESKTOP_SESSION12 exec initctl emit xsession SESSION=$DESKTOP_SESSION SESSIONTYPE=$SESSIONTYPE
13end script13end script
1414
=== modified file 'debian/xsession.d/99upstart'
--- debian/xsession.d/99upstart 2013-03-07 18:52:38 +0000
+++ debian/xsession.d/99upstart 2013-03-14 16:57:22 +0000
@@ -1,5 +1,11 @@
1# Start the user session1# Start the user session
2if [ -n "$UPSTART" ]; then2if [ -n "$UPSTART" ]; then
3 case "$BASESTARTUP" in
4 gnome-session*)
5 export SESSIONTYPE=gnome-session
6 ;;
7 esac
8
3 STARTUP="init --user"9 STARTUP="init --user"
4 unset UPSTART10 unset UPSTART
5fi11fi

Subscribers

People subscribed via source and target branches

to all changes: