Merge lp:~mterry/unity8-desktop-session/systemd into lp:unity8-desktop-session

Proposed by Michael Terry
Status: Work in progress
Proposed branch: lp:~mterry/unity8-desktop-session/systemd
Merge into: lp:unity8-desktop-session
Diff against target: 189 lines (+27/-88)
6 files modified
data/45-unity8.conf (+0/-1)
data/Makefile.am (+0/-4)
data/lightdm-unity8-session (+24/-38)
data/unity8-copy-env.conf (+0/-32)
debian/control (+3/-12)
debian/unity8-desktop-session.install (+0/-1)
To merge this branch: bzr merge lp:~mterry/unity8-desktop-session/systemd
Reviewer Review Type Date Requested Status
Unity 8 Desktop Session Pending
Review via email: mp+321558@code.launchpad.net

Commit message

WIP

To post a comment you must log in.
129. By Michael Terry

Set systemd environment variables from lightdm session script

Unmerged revisions

129. By Michael Terry

Set systemd environment variables from lightdm session script

128. By Michael Terry

Name session script back, don't need to confuse things

127. By Michael Terry

Use systemd to start unity8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/45-unity8.conf'
2--- data/45-unity8.conf 2016-07-14 14:26:54 +0000
3+++ data/45-unity8.conf 2017-04-03 17:42:42 +0000
4@@ -1,4 +1,3 @@
5 [Seat:*]
6 user-session=unity8
7 unity-compositor-command=unity-system-compositor.sleep
8-session-wrapper=lightdm-unity8-session
9
10=== modified file 'data/Makefile.am'
11--- data/Makefile.am 2017-03-23 18:09:26 +0000
12+++ data/Makefile.am 2017-04-03 17:42:42 +0000
13@@ -19,7 +19,6 @@
14 lightdmdir = ${datadir}/lightdm
15 lightdm_confdir = ${lightdmdir}/lightdm.conf.d
16 lightdm_sessiondir = ${lightdmdir}/sessions
17-upstart_sessiondir = ${datadir}/upstart/sessions
18
19 dist_pkgdata_DATA = \
20 sensors.txt
21@@ -38,9 +37,6 @@
22 dist_bin_SCRIPTS = \
23 lightdm-unity8-session
24
25-dist_upstart_session_DATA = \
26- unity8-copy-env.conf
27-
28 EXTRA_DIST = \
29 unity8.desktop.in
30
31
32=== modified file 'data/lightdm-unity8-session'
33--- data/lightdm-unity8-session 2016-11-03 19:53:05 +0000
34+++ data/lightdm-unity8-session 2017-04-03 17:42:42 +0000
35@@ -1,40 +1,26 @@
36 #!/bin/sh
37-#
38-# If no X server is available, just run upstart, otherwise fall back to the
39-# traditional X-based desktop session startup.
40-#
41-
42-if [ -z "$DISPLAY" -a "$DESKTOP_SESSION" != "unity8-snap" ]; then
43- # TODO: The following block is to work around the OOBE wizard for the phone.
44- # See LP: #1435877.
45- if [ ! -f $HOME/.config/ubuntu-system-settings/wizard-has-run ]; then
46- mkdir -p $HOME/.config/ubuntu-system-settings
47- touch $HOME/.config/ubuntu-system-settings/wizard-has-run
48- fi
49-
50- # Set up xdg dirs
51- [ -z "$XDG_CONFIG_DIRS" ] && export XDG_CONFIG_DIRS=/etc/xdg
52- [ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS=/usr/local/share:/usr/share
53- if [ -n "$DESKTOP_SESSION" ]; then
54- export XDG_CONFIG_DIRS=/etc/xdg/xdg-$DESKTOP_SESSION:$XDG_CONFIG_DIRS
55- export XDG_DATA_DIRS=/usr/share/$DESKTOP_SESSION:$XDG_DATA_DIRS
56- fi
57-
58- # Do any system-configured setup.
59- for profile in "/etc/profile" "$HOME/.profile"; do
60- if [ -r "$profile" ]; then
61- . "$profile"
62- fi
63- done
64-
65- # work around crashes caused by appmenu-qt5
66- # https://bugs.launchpad.net/appmenu-qt5/+bug/1606246
67- unset QT_QPA_PLATFORMTHEME
68-
69- export QT_QPA_PLATFORM=ubuntumirclient
70- export UNITY_INDICATOR_PROFILE=desktop
71- export UBUNTU_PLATFORM_API_BACKEND=desktop_mirclient
72- exec upstart --user
73-else
74- exec /usr/sbin/lightdm-session "$@"
75+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
76+
77+# TODO: The following block is to work around the OOBE wizard for the phone.
78+# See LP: #1435877.
79+# From mterry: This should be removed, I think; I believe our wizard should run
80+# for the user even on the desktop (it does in snappy, and
81+# should on classic too). But I'm writing this late in the
82+# zesty cycle and don't want to change anything now.
83+if [ ! -f $HOME/.config/ubuntu-system-settings/wizard-has-run ]; then
84+ mkdir -p $HOME/.config/ubuntu-system-settings
85+ touch $HOME/.config/ubuntu-system-settings/wizard-has-run
86 fi
87+
88+systemctl --user import-environment
89+systemctl --user set-environment MIR_SERVER_VT=$XDG_VTNR
90+
91+dbus-update-activation-environment --systemd QT_QPA_PLATFORM=ubuntumirclient
92+dbus-update-activation-environment --systemd UBUNTU_PLATFORM_API_BACKEND=desktop_mirclient
93+
94+/usr/lib/gnome-session/run-systemd-session unity8.service
95+
96+dbus-update-activation-environment --systemd QT_QPA_PLATFORM=
97+dbus-update-activation-environment --systemd UBUNTU_PLATFORM_API_BACKEND=
98+
99+exit 0
100
101=== removed file 'data/unity8-copy-env.conf'
102--- data/unity8-copy-env.conf 2017-03-23 18:09:26 +0000
103+++ data/unity8-copy-env.conf 1970-01-01 00:00:00 +0000
104@@ -1,32 +0,0 @@
105-# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
106-
107-description "Copy Upstart Environment for Unity 8"
108-author "Michael Terry <mterry@ubuntu.com>"
109-
110-start on started unity8
111-task
112-
113-script
114- # Share our upstart env with dbus and systemd, so all activated services
115- # and applications will have the same environment. This was originally done
116- # to make sure everyone has QT_QPA_PLATFORM, but other vars are likely useful
117- # too.
118-
119- # FIXME: This script should go away shortly. In the short term, it should be
120- # replaced by just doing everything in systemd directly and adjusting how
121- # unity8 configures its environment. In the long term, everything will be
122- # a snap and not need external environment variables to be set. But in the
123- # very immediate term, this helps avoid regressions as we migrate away from
124- # upstart.
125-
126- # (script is copied from /etc/X11/Xsession.d/95dbus_update-activation-env)
127-
128- # unset login-session-specifics
129- unset XDG_SEAT
130- unset XDG_SESSION_ID
131- unset XDG_VTNR
132-
133- # tell dbus-daemon --session (and systemd --user, if running)
134- # to put our environment in activated services' environments
135- dbus-update-activation-environment --verbose --systemd --all
136-end script
137
138=== modified file 'debian/control'
139--- debian/control 2017-03-07 13:40:17 +0000
140+++ debian/control 2017-04-03 17:42:42 +0000
141@@ -15,7 +15,9 @@
142 # Remove conflicts while in development
143 Replaces: unity8-desktop-session-mir (<< 1.0.13)
144 Breaks: unity8-desktop-session-mir (<< 1.0.13)
145-Depends: mir-graphics-drivers-desktop,
146+Depends: dbus,
147+ gnome-session-bin,
148+ mir-graphics-drivers-desktop,
149 packagekit,
150 policykit-unity8,
151 qtmir-desktop,
152@@ -25,7 +27,6 @@
153 unity-system-compositor,
154 unity8,
155 url-dispatcher,
156- upstart,
157 ${misc:Depends}
158 Recommends: indicator-transfer,
159 ubuntu-terminal-app,
160@@ -36,20 +37,10 @@
161 gallery-app,
162 mediaplayer-app
163 Description: Unity8 desktop session for Mir
164- .
165 A desktop session running Unity8 on a Mir back end.
166 .
167 This package is provided for evaluation and demonstration purposes only.
168
169-Package: unity8-desktop-session-mir
170-Depends: unity8-desktop-session (>= 1.0.13),
171- ${misc:Depends}
172-Architecture: all
173-Section: oldlibs
174-Priority: extra
175-Description: transitional dummy package
176- This is a transitional dummy package. It can safely be removed.
177-
178 Package: unity8-session-snap
179 Architecture: all
180 # Conflicts: unity8-desktop-session
181
182=== modified file 'debian/unity8-desktop-session.install'
183--- debian/unity8-desktop-session.install 2017-03-23 18:09:26 +0000
184+++ debian/unity8-desktop-session.install 2017-04-03 17:42:42 +0000
185@@ -3,4 +3,3 @@
186 usr/share/lightdm/sessions/unity8.desktop
187 usr/share/unity-greeter/custom_unity8_badge.png
188 usr/share/unity8-desktop-session/sensors.txt
189-usr/share/upstart/sessions/unity8-copy-env.conf

Subscribers

People subscribed via source and target branches