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
=== modified file 'data/45-unity8.conf'
--- data/45-unity8.conf 2016-07-14 14:26:54 +0000
+++ data/45-unity8.conf 2017-04-03 17:42:42 +0000
@@ -1,4 +1,3 @@
1[Seat:*]1[Seat:*]
2user-session=unity82user-session=unity8
3unity-compositor-command=unity-system-compositor.sleep3unity-compositor-command=unity-system-compositor.sleep
4session-wrapper=lightdm-unity8-session
54
=== modified file 'data/Makefile.am'
--- data/Makefile.am 2017-03-23 18:09:26 +0000
+++ data/Makefile.am 2017-04-03 17:42:42 +0000
@@ -19,7 +19,6 @@
19lightdmdir = ${datadir}/lightdm19lightdmdir = ${datadir}/lightdm
20lightdm_confdir = ${lightdmdir}/lightdm.conf.d20lightdm_confdir = ${lightdmdir}/lightdm.conf.d
21lightdm_sessiondir = ${lightdmdir}/sessions21lightdm_sessiondir = ${lightdmdir}/sessions
22upstart_sessiondir = ${datadir}/upstart/sessions
2322
24dist_pkgdata_DATA = \23dist_pkgdata_DATA = \
25 sensors.txt24 sensors.txt
@@ -38,9 +37,6 @@
38dist_bin_SCRIPTS = \37dist_bin_SCRIPTS = \
39 lightdm-unity8-session38 lightdm-unity8-session
4039
41dist_upstart_session_DATA = \
42 unity8-copy-env.conf
43
44EXTRA_DIST = \40EXTRA_DIST = \
45 unity8.desktop.in41 unity8.desktop.in
4642
4743
=== modified file 'data/lightdm-unity8-session'
--- data/lightdm-unity8-session 2016-11-03 19:53:05 +0000
+++ data/lightdm-unity8-session 2017-04-03 17:42:42 +0000
@@ -1,40 +1,26 @@
1#!/bin/sh 1#!/bin/sh
2#2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
3# If no X server is available, just run upstart, otherwise fall back to the3
4# traditional X-based desktop session startup.4# TODO: The following block is to work around the OOBE wizard for the phone.
5#5# See LP: #1435877.
66# From mterry: This should be removed, I think; I believe our wizard should run
7if [ -z "$DISPLAY" -a "$DESKTOP_SESSION" != "unity8-snap" ]; then7# for the user even on the desktop (it does in snappy, and
8 # TODO: The following block is to work around the OOBE wizard for the phone.8# should on classic too). But I'm writing this late in the
9 # See LP: #1435877.9# zesty cycle and don't want to change anything now.
10 if [ ! -f $HOME/.config/ubuntu-system-settings/wizard-has-run ]; then10if [ ! -f $HOME/.config/ubuntu-system-settings/wizard-has-run ]; then
11 mkdir -p $HOME/.config/ubuntu-system-settings11 mkdir -p $HOME/.config/ubuntu-system-settings
12 touch $HOME/.config/ubuntu-system-settings/wizard-has-run12 touch $HOME/.config/ubuntu-system-settings/wizard-has-run
13 fi
14
15 # Set up xdg dirs
16 [ -z "$XDG_CONFIG_DIRS" ] && export XDG_CONFIG_DIRS=/etc/xdg
17 [ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS=/usr/local/share:/usr/share
18 if [ -n "$DESKTOP_SESSION" ]; then
19 export XDG_CONFIG_DIRS=/etc/xdg/xdg-$DESKTOP_SESSION:$XDG_CONFIG_DIRS
20 export XDG_DATA_DIRS=/usr/share/$DESKTOP_SESSION:$XDG_DATA_DIRS
21 fi
22
23 # Do any system-configured setup.
24 for profile in "/etc/profile" "$HOME/.profile"; do
25 if [ -r "$profile" ]; then
26 . "$profile"
27 fi
28 done
29
30 # work around crashes caused by appmenu-qt5
31 # https://bugs.launchpad.net/appmenu-qt5/+bug/1606246
32 unset QT_QPA_PLATFORMTHEME
33
34 export QT_QPA_PLATFORM=ubuntumirclient
35 export UNITY_INDICATOR_PROFILE=desktop
36 export UBUNTU_PLATFORM_API_BACKEND=desktop_mirclient
37 exec upstart --user
38else
39 exec /usr/sbin/lightdm-session "$@"
40fi13fi
14
15systemctl --user import-environment
16systemctl --user set-environment MIR_SERVER_VT=$XDG_VTNR
17
18dbus-update-activation-environment --systemd QT_QPA_PLATFORM=ubuntumirclient
19dbus-update-activation-environment --systemd UBUNTU_PLATFORM_API_BACKEND=desktop_mirclient
20
21/usr/lib/gnome-session/run-systemd-session unity8.service
22
23dbus-update-activation-environment --systemd QT_QPA_PLATFORM=
24dbus-update-activation-environment --systemd UBUNTU_PLATFORM_API_BACKEND=
25
26exit 0
4127
=== removed file 'data/unity8-copy-env.conf'
--- data/unity8-copy-env.conf 2017-03-23 18:09:26 +0000
+++ data/unity8-copy-env.conf 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
1# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
2
3description "Copy Upstart Environment for Unity 8"
4author "Michael Terry <mterry@ubuntu.com>"
5
6start on started unity8
7task
8
9script
10 # Share our upstart env with dbus and systemd, so all activated services
11 # and applications will have the same environment. This was originally done
12 # to make sure everyone has QT_QPA_PLATFORM, but other vars are likely useful
13 # too.
14
15 # FIXME: This script should go away shortly. In the short term, it should be
16 # replaced by just doing everything in systemd directly and adjusting how
17 # unity8 configures its environment. In the long term, everything will be
18 # a snap and not need external environment variables to be set. But in the
19 # very immediate term, this helps avoid regressions as we migrate away from
20 # upstart.
21
22 # (script is copied from /etc/X11/Xsession.d/95dbus_update-activation-env)
23
24 # unset login-session-specifics
25 unset XDG_SEAT
26 unset XDG_SESSION_ID
27 unset XDG_VTNR
28
29 # tell dbus-daemon --session (and systemd --user, if running)
30 # to put our environment in activated services' environments
31 dbus-update-activation-environment --verbose --systemd --all
32end script
330
=== modified file 'debian/control'
--- debian/control 2017-03-07 13:40:17 +0000
+++ debian/control 2017-04-03 17:42:42 +0000
@@ -15,7 +15,9 @@
15# Remove conflicts while in development15# Remove conflicts while in development
16Replaces: unity8-desktop-session-mir (<< 1.0.13)16Replaces: unity8-desktop-session-mir (<< 1.0.13)
17Breaks: unity8-desktop-session-mir (<< 1.0.13)17Breaks: unity8-desktop-session-mir (<< 1.0.13)
18Depends: mir-graphics-drivers-desktop,18Depends: dbus,
19 gnome-session-bin,
20 mir-graphics-drivers-desktop,
19 packagekit,21 packagekit,
20 policykit-unity8,22 policykit-unity8,
21 qtmir-desktop,23 qtmir-desktop,
@@ -25,7 +27,6 @@
25 unity-system-compositor,27 unity-system-compositor,
26 unity8,28 unity8,
27 url-dispatcher,29 url-dispatcher,
28 upstart,
29 ${misc:Depends}30 ${misc:Depends}
30Recommends: indicator-transfer,31Recommends: indicator-transfer,
31 ubuntu-terminal-app,32 ubuntu-terminal-app,
@@ -36,20 +37,10 @@
36 gallery-app,37 gallery-app,
37 mediaplayer-app38 mediaplayer-app
38Description: Unity8 desktop session for Mir39Description: Unity8 desktop session for Mir
39 .
40 A desktop session running Unity8 on a Mir back end.40 A desktop session running Unity8 on a Mir back end.
41 .41 .
42 This package is provided for evaluation and demonstration purposes only.42 This package is provided for evaluation and demonstration purposes only.
4343
44Package: unity8-desktop-session-mir
45Depends: unity8-desktop-session (>= 1.0.13),
46 ${misc:Depends}
47Architecture: all
48Section: oldlibs
49Priority: extra
50Description: transitional dummy package
51 This is a transitional dummy package. It can safely be removed.
52
53Package: unity8-session-snap44Package: unity8-session-snap
54Architecture: all45Architecture: all
55# Conflicts: unity8-desktop-session46# Conflicts: unity8-desktop-session
5647
=== modified file 'debian/unity8-desktop-session.install'
--- debian/unity8-desktop-session.install 2017-03-23 18:09:26 +0000
+++ debian/unity8-desktop-session.install 2017-04-03 17:42:42 +0000
@@ -3,4 +3,3 @@
3usr/share/lightdm/sessions/unity8.desktop3usr/share/lightdm/sessions/unity8.desktop
4usr/share/unity-greeter/custom_unity8_badge.png4usr/share/unity-greeter/custom_unity8_badge.png
5usr/share/unity8-desktop-session/sensors.txt5usr/share/unity8-desktop-session/sensors.txt
6usr/share/upstart/sessions/unity8-copy-env.conf

Subscribers

People subscribed via source and target branches