ubuntu-phone team mailing list archive
Mailing list archive
[BaseOS] Migration to Upstart user session
We have recently landed support in our Ubuntu Touch builds (17.1) to
migrate our session-manager-touch package to use Upstart system/user
sessions as it currently happens on the desktop.
What does this mean? before, ubuntu-touch-session used to manually set
up the environment and individually fork each process/service required
on the Ubuntu side from a hardcoded list of services found
These services are now installed as Upstart user session jobs
in /usr/share/upstart/sessions and respond to the startup of the user
session identified by DESKTOP_SESSION=ubuntu-touch. The old Upstart
system job for ubuntu-touch-session now takes care of setting up the
initial environment and device-specific bits before handing over to the
The reason for this change is that we need to support application
launching via the upstart-app-launch helper in order to provide seamless
confinement via AppArmor and better tracking of user sessions and their
In order to make use of the Upstart session from your adb or ssh
terminal you need to first join it, this should already happen
automatically as we have a hook for it in /etc/profile.d. You can check
it works by doing
$ initctl list-env
And seeing the usual env vars such as DBUS_SESSION_BUS_ADDRESS,
XDG_RUNTIME_DIR and XDG_SESSION_ID. Your environment should also by
default have DBUS_SESSION_BUS_ADDRESS exported so you can launch
applications as you always have.
The new interface allows you to launch applications by issuing the
$ start application APP_ID="..."
Where ... can be your usual ubuntu touch application that has a matching
desktop file (i.e. gallery-app, webbrowser-app, etc).
This also lets you start/stop individual jobs within the user session,
such as unity8, maliit-server and others by the usual commands:
$ stop unity8
$ start unity8
The work is fresh landed, so if you find any bugs or have any doubts
about how to port your current scripts to make use of the new interface
please send me an email or ping me in irc.