← Back to team overview

ubuntu-phone team mailing list archive

Re: [BaseOS] Migration to Upstart user session

 

This is awesome, nice work. One question: have we compared startup time
to display the shell before and after this change? I'm noticing it's
taking ~30 seconds to display the shell on Galaxy Nexus after adb reboot
which seems longer than it was before. I'm wondering if there are
upstart jobs being started now that weren't before. I know rebooting the
phone is not a common occurance, but we should ensure we're only
starting what is needed, and deferring anything that is needed by the
shell until after the shell has started.

Bill

On 07/17/2013 12:52 PM, Ricardo Mendoza wrote:
> 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
> in /etc/device-services.
>
> 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
> user init.
>
> 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
> launched processes.
>
> 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
> following command:
>
> $ 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.
>
> Regards,
>
>
>      Ricardo
>
>



Follow ups

References