description "Run systemd user units for graphical session"
author "Martin Pitt <martin.pitt@ubuntu.com>"
# this is normally done by the /usr/share/xsessions/*.desktop's Exec= line, but
# as Xsession.d/99upstart completely nullifies $STARTUP, we need to replicate it
# through this upstart job.
start on startup
task
pre-start script
# some services talk to upstart in code, and for the transition period we
# also want this to be in shells
if [ -x "/usr/bin/dbus-update-activation-environment" ]; then
dbus-update-activation-environment --verbose --systemd UPSTART_SESSION
fi
end script
exec /usr/lib/gnome-session/run-systemd-session ${DESKTOP_SESSION}-session.target