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
=== modified file 'src/seat-unity.c'
--- src/seat-unity.c 2013-07-26 02:54:55 +0000
+++ src/seat-unity.c 2013-07-30 13:30:42 +0000
@@ -510,6 +510,12 @@
510510
511 greeter_session = greeter_new ();511 greeter_session = greeter_new ();
512 session_set_env (SESSION (greeter_session), "XDG_SEAT", "seat0");512 session_set_env (SESSION (greeter_session), "XDG_SEAT", "seat0");
513 if (!SEAT_UNITY (seat)->priv->use_vt_switching)
514 {
515 gchar *value = g_strdup_printf ("%d", SEAT_UNITY (seat)->priv->vt);
516 session_set_env (SESSION (greeter_session), "XDG_VTNR", value);
517 g_free (value);
518 }
513519
514 return greeter_session;520 return greeter_session;
515}521}
@@ -521,6 +527,12 @@
521527
522 session = session_new ();528 session = session_new ();
523 session_set_env (session, "XDG_SEAT", "seat0");529 session_set_env (session, "XDG_SEAT", "seat0");
530 if (!SEAT_UNITY (seat)->priv->use_vt_switching)
531 {
532 gchar *value = g_strdup_printf ("%d", SEAT_UNITY (seat)->priv->vt);
533 session_set_env (SESSION (session), "XDG_VTNR", value);
534 g_free (value);
535 }
524536
525 return session;537 return session;
526}538}
527539
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am 2013-07-26 05:17:21 +0000
+++ tests/Makefile.am 2013-07-30 13:30:42 +0000
@@ -147,7 +147,8 @@
147 test-unity-mir-autologin \147 test-unity-mir-autologin \
148 test-unity-mir-greeter-x-session \148 test-unity-mir-greeter-x-session \
149 test-unity-mir-greeter-mir-session \149 test-unity-mir-greeter-mir-session \
150 test-unity-mir-session-x-greeter150 test-unity-mir-session-x-greeter \
151 test-unity-login1
151152
152# test-session-exit-error153# test-session-exit-error
153# test-greeter-no-exit154# test-greeter-no-exit
@@ -400,6 +401,7 @@
400 scripts/unity-compositor-fail-ready.conf \401 scripts/unity-compositor-fail-ready.conf \
401 scripts/unity-compositor-fail-start.conf \402 scripts/unity-compositor-fail-start.conf \
402 scripts/unity-login.conf \403 scripts/unity-login.conf \
404 scripts/unity-login1.conf \
403 scripts/unity-mir-autologin.conf \405 scripts/unity-mir-autologin.conf \
404 scripts/unity-mir-greeter-mir-session.conf \406 scripts/unity-mir-greeter-mir-session.conf \
405 scripts/unity-mir-greeter-x-session.conf \407 scripts/unity-mir-greeter-x-session.conf \
406408
=== added file 'tests/scripts/unity-login1.conf'
--- tests/scripts/unity-login1.conf 1970-01-01 00:00:00 +0000
+++ tests/scripts/unity-login1.conf 2013-07-30 13:30:42 +0000
@@ -0,0 +1,43 @@
1#
2# Check logind variables are set in Unity sessions
3#
4
5[SeatDefaults]
6type=unity
7autologin-user=have-password1
8user-session=default
9
10#?RUNNER DAEMON-START
11
12# System compositor starts
13#?UNITY-SYSTEM-COMPOSITOR START VT=7
14#?*UNITY-SYSTEM-COMPOSITOR READY
15
16# X server starts
17#?XSERVER-0 START MIR-ID=0
18
19# Daemon connects when X server is ready
20#?*XSERVER-0 INDICATE-READY
21#?XSERVER-0 INDICATE-READY
22#?XSERVER-0 ACCEPT-CONNECT
23
24# Session starts
25#?SESSION-X-0 START USER=have-password1
26#?XSERVER-0 ACCEPT-CONNECT
27#?SESSION-X-0 CONNECT-XSERVER
28
29# System compositor switches to session
30#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=0
31
32# Check environment variables
33#?*SESSION-X-0 READ-ENV NAME=XDG_SEAT
34#?SESSION-X-0 READ-ENV NAME=XDG_SEAT VALUE=seat0
35#?*SESSION-X-0 READ-ENV NAME=XDG_VTNR
36#?SESSION-X-0 READ-ENV NAME=XDG_VTNR VALUE=7
37
38# Cleanup
39#?*STOP-DAEMON
40#?SESSION-X-0 TERMINATE SIGNAL=15
41#?XSERVER-0 TERMINATE SIGNAL=15
42#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
43#?RUNNER DAEMON-EXIT STATUS=0

Subscribers

People subscribed via source and target branches