diff -Nru xfce4-session-4.12.1/debian/changelog xfce4-session-4.12.1/debian/changelog --- xfce4-session-4.12.1/debian/changelog 2015-05-26 00:24:51.000000000 +0000 +++ xfce4-session-4.12.1/debian/changelog 2016-07-25 20:13:03.000000000 +0000 @@ -1,3 +1,11 @@ +xfce4-session (4.12.1-3ubuntu2) yakkety; urgency=medium + + * Add systemd user session. Note that this is not active for the XFCE + session right now, it will just be used for xubuntu-default-setting's + Xubuntu session. + + -- Martin Pitt Mon, 25 Jul 2016 22:12:13 +0200 + xfce4-session (4.12.1-3ubuntu1) wily; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru xfce4-session-4.12.1/debian/systemd/run-systemd-session xfce4-session-4.12.1/debian/systemd/run-systemd-session --- xfce4-session-4.12.1/debian/systemd/run-systemd-session 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-session-4.12.1/debian/systemd/run-systemd-session 2016-07-25 19:41:53.000000000 +0000 @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# robustness: if the previous graphical session left some failed units, +# reset them so that they don't break this startup +for unit in $(systemctl --user --no-legend --state=failed list-units | cut -f1 -d' '); do +if [ "$(systemctl --user show -p PartOf --value)" = "graphical-session.target" ]; then + systemctl --user reset-failed $unit +fi +done + +systemctl --user restart graphical-session-pre.target +systemctl --user restart "$1" + +# Wait until the session gets closed +# FIXME: replace with an event-based waiting instead of polling (needs new systemctl functionality) +while systemctl --user --quiet is-active "$1"; do sleep 1; done + +# Delay killing the X server until all graphical units stopped +# FIXME: we currently cannot make targets wait on its dependencies going to +# "inactive", only to "deactivating" +while [ -n "$(systemctl --user --no-legend --state=deactivating list-units)" ]; do sleep 0.2; done diff -Nru xfce4-session-4.12.1/debian/systemd/startxfce4.override xfce4-session-4.12.1/debian/systemd/startxfce4.override --- xfce4-session-4.12.1/debian/systemd/startxfce4.override 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-session-4.12.1/debian/systemd/startxfce4.override 2016-07-25 19:57:29.000000000 +0000 @@ -0,0 +1 @@ +manual diff -Nru xfce4-session-4.12.1/debian/systemd/xfce4-session.service xfce4-session-4.12.1/debian/systemd/xfce4-session.service --- xfce4-session-4.12.1/debian/systemd/xfce4-session.service 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-session-4.12.1/debian/systemd/xfce4-session.service 2016-07-25 19:41:53.000000000 +0000 @@ -0,0 +1,7 @@ +[Unit] +Description=XFCE 4 Session Manager +PartOf=graphical-session.target + +[Service] +ExecStart=/usr/bin/startxfce4 +ExecStopPost=-/usr/bin/dbus-send --type=method_call --address=${UPSTART_SESSION} /com/ubuntu/Upstart com.ubuntu.Upstart0_6.EndSession diff -Nru xfce4-session-4.12.1/debian/xfce4-session.install xfce4-session-4.12.1/debian/xfce4-session.install --- xfce4-session-4.12.1/debian/xfce4-session.install 2015-05-16 16:12:07.000000000 +0000 +++ xfce4-session-4.12.1/debian/xfce4-session.install 2016-07-25 20:12:03.000000000 +0000 @@ -2,3 +2,6 @@ etc debian/defaults.list etc/xfce4/ debian/55xfce4-session etc/X11/Xsession.d/ +debian/systemd/xfce4-session.service /usr/lib/systemd/user/ +debian/systemd/run-systemd-session /usr/share/xfce4/scripts/ +debian/systemd/startxfce4.override /usr/share/upstart/systemd-session/upstart/