> However, "sudo su -" does not result in the creation of XDG_RUNTIME_DIR for the root user, hence UPSTART_SESSION is set to the null value.
That's correct, and intended. This was explicitly done in https://launchpad.net/ubuntu/+source/systemd/204-0ubuntu19.1 for bug 1197395. $XDG_RUNTIME_DIR must *never* be set for a session/program which does not belong to the owner of /run/user/..., in particular not root. Otherwise processes from root will damage/destroy the user's runtime dir. ** Changed in: systemd (Ubuntu) Status: Confirmed => Won't Fix -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1217863 Title: /etc/profile.d/upstart-phablet.sh sets UPSTART_SESSION to null value Status in “systemd” package in Ubuntu: Won't Fix Status in “ubuntu-touch-session” package in Ubuntu: Confirmed Bug description: Script /etc/profile.d/upstart-phablet.sh sets XDG_RUNTIME_DIR to a suitable value, then calls: export UPSTART_SESSION=$(/sbin/initctl list-sessions | awk '{ print $NF; quit }') However, "sudo su -" does not result in the creation of XDG_RUNTIME_DIR for the root user, hence UPSTART_SESSION is set to the null value. This leads to confusing upstart behaviour: phablet@ubuntu-phablet:~$ sudo su - initctl: unable to determine sessions root@ubuntu-phablet:~# initctl list initctl: Unable to connect to Upstart: Empty address '' root@ubuntu-phablet:~# unset UPSTART_SESSION root@ubuntu-phablet:~# initctl list | head cgroup-lite start/running mountall-net stop/waiting mountnfs-bootclean.sh start/running passwd stop/waiting rc stop/waiting rsyslog start/running, process 437 startpar-bridge stop/waiting tty4 stop/waiting udev start/running, process 631 upstart-udev-bridge start/running, process 624 I think the issue may actually be related to logind not creating XDG_RUNTIME_DIR. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1217863/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

