Merge lp:~robert-ancell/lightdm/unity-session-vtnr into lp:lightdm

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1742
Merged at revision: 1742
Proposed branch: lp:~robert-ancell/lightdm/unity-session-vtnr
Merge into: lp:lightdm
Diff against target: 99 lines (+58/-1)
3 files modified
src/seat-unity.c (+12/-0)
tests/Makefile.am (+3/-1)
tests/scripts/unity-login1.conf (+43/-0)
To merge this branch: bzr merge lp:~robert-ancell/lightdm/unity-session-vtnr
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+177591@code.launchpad.net

Commit message

Set XDG_VTNR for unity sessions

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1742
http://jenkins.qa.ubuntu.com/job/lightdm-ci/149/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/lightdm-saucy-amd64-ci/65

Click here to trigger a rebuild:
http://s-jenkins:8080/job/lightdm-ci/149/rebuild

review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/seat-unity.c'
2--- src/seat-unity.c 2013-07-26 02:54:55 +0000
3+++ src/seat-unity.c 2013-07-30 13:30:42 +0000
4@@ -510,6 +510,12 @@
5
6 greeter_session = greeter_new ();
7 session_set_env (SESSION (greeter_session), "XDG_SEAT", "seat0");
8+ if (!SEAT_UNITY (seat)->priv->use_vt_switching)
9+ {
10+ gchar *value = g_strdup_printf ("%d", SEAT_UNITY (seat)->priv->vt);
11+ session_set_env (SESSION (greeter_session), "XDG_VTNR", value);
12+ g_free (value);
13+ }
14
15 return greeter_session;
16 }
17@@ -521,6 +527,12 @@
18
19 session = session_new ();
20 session_set_env (session, "XDG_SEAT", "seat0");
21+ if (!SEAT_UNITY (seat)->priv->use_vt_switching)
22+ {
23+ gchar *value = g_strdup_printf ("%d", SEAT_UNITY (seat)->priv->vt);
24+ session_set_env (SESSION (session), "XDG_VTNR", value);
25+ g_free (value);
26+ }
27
28 return session;
29 }
30
31=== modified file 'tests/Makefile.am'
32--- tests/Makefile.am 2013-07-26 05:17:21 +0000
33+++ tests/Makefile.am 2013-07-30 13:30:42 +0000
34@@ -147,7 +147,8 @@
35 test-unity-mir-autologin \
36 test-unity-mir-greeter-x-session \
37 test-unity-mir-greeter-mir-session \
38- test-unity-mir-session-x-greeter
39+ test-unity-mir-session-x-greeter \
40+ test-unity-login1
41
42 # test-session-exit-error
43 # test-greeter-no-exit
44@@ -400,6 +401,7 @@
45 scripts/unity-compositor-fail-ready.conf \
46 scripts/unity-compositor-fail-start.conf \
47 scripts/unity-login.conf \
48+ scripts/unity-login1.conf \
49 scripts/unity-mir-autologin.conf \
50 scripts/unity-mir-greeter-mir-session.conf \
51 scripts/unity-mir-greeter-x-session.conf \
52
53=== added file 'tests/scripts/unity-login1.conf'
54--- tests/scripts/unity-login1.conf 1970-01-01 00:00:00 +0000
55+++ tests/scripts/unity-login1.conf 2013-07-30 13:30:42 +0000
56@@ -0,0 +1,43 @@
57+#
58+# Check logind variables are set in Unity sessions
59+#
60+
61+[SeatDefaults]
62+type=unity
63+autologin-user=have-password1
64+user-session=default
65+
66+#?RUNNER DAEMON-START
67+
68+# System compositor starts
69+#?UNITY-SYSTEM-COMPOSITOR START VT=7
70+#?*UNITY-SYSTEM-COMPOSITOR READY
71+
72+# X server starts
73+#?XSERVER-0 START MIR-ID=0
74+
75+# Daemon connects when X server is ready
76+#?*XSERVER-0 INDICATE-READY
77+#?XSERVER-0 INDICATE-READY
78+#?XSERVER-0 ACCEPT-CONNECT
79+
80+# Session starts
81+#?SESSION-X-0 START USER=have-password1
82+#?XSERVER-0 ACCEPT-CONNECT
83+#?SESSION-X-0 CONNECT-XSERVER
84+
85+# System compositor switches to session
86+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=0
87+
88+# Check environment variables
89+#?*SESSION-X-0 READ-ENV NAME=XDG_SEAT
90+#?SESSION-X-0 READ-ENV NAME=XDG_SEAT VALUE=seat0
91+#?*SESSION-X-0 READ-ENV NAME=XDG_VTNR
92+#?SESSION-X-0 READ-ENV NAME=XDG_VTNR VALUE=7
93+
94+# Cleanup
95+#?*STOP-DAEMON
96+#?SESSION-X-0 TERMINATE SIGNAL=15
97+#?XSERVER-0 TERMINATE SIGNAL=15
98+#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
99+#?RUNNER DAEMON-EXIT STATUS=0

Subscribers

People subscribed via source and target branches