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
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-03-07 21:16:26 +0000
3+++ debian/changelog 2013-03-14 16:57:22 +0000
4@@ -1,3 +1,10 @@
5+upstart (1.7-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * Set $SESSIONTYPE when emitting the xsession event that specifies the type
8+ of session being launched. Currently only gnome-session is supported.
9+
10+ -- Iain Lane <iain.lane@canonical.com> Thu, 14 Mar 2013 16:28:35 +0000
11+
12 upstart (1.7-0ubuntu1) raring; urgency=low
13
14 [ Stéphane Graber ]
15
16=== modified file 'debian/user-conf/xsession-init.conf'
17--- debian/user-conf/xsession-init.conf 2013-03-07 18:52:38 +0000
18+++ debian/user-conf/xsession-init.conf 2013-03-14 16:57:22 +0000
19@@ -9,5 +9,5 @@
20 end script
21
22 script
23- exec initctl emit xsession SESSION=$DESKTOP_SESSION
24+ exec initctl emit xsession SESSION=$DESKTOP_SESSION SESSIONTYPE=$SESSIONTYPE
25 end script
26
27=== modified file 'debian/xsession.d/99upstart'
28--- debian/xsession.d/99upstart 2013-03-07 18:52:38 +0000
29+++ debian/xsession.d/99upstart 2013-03-14 16:57:22 +0000
30@@ -1,5 +1,11 @@
31 # Start the user session
32 if [ -n "$UPSTART" ]; then
33+ case "$BASESTARTUP" in
34+ gnome-session*)
35+ export SESSIONTYPE=gnome-session
36+ ;;
37+ esac
38+
39 STARTUP="init --user"
40 unset UPSTART
41 fi

Subscribers

People subscribed via source and target branches

to all changes: