Comment 0 for bug 1804869

Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Daemons do not have an /run/user/* dir created on Ubuntu Classic

I'm working on the Mir-Kiosk snap. It has Mir running as a "daemon: simple". Mir wants an XDG_RUNTIME_DIR directory for its sockets.

Snapd does set the $XDG_RUNTIME_DIR environment variable for it (/run/user/0/snap.mir-kiosk), but I'm not able to create that directory as /run/user/0 has not been created by snapd.

We had a workaround for lp:1738197, vis:

     [ ! -d "$XDG_RUNTIME_DIR" ] && mkdir $XDG_RUNTIME_DIR -m 700

And that ought to work regardless of whether lp:1738197 is fixed.

Something seems to have changed since around September (when the above was working) as this no longer works on Ubuntu Classic (18.04LTS), instead we see:

2018-11-23T17:37:07Z mir-kiosk.mir-kiosk[25245]: mkdir: cannot create directory '/run/user/0': Permission denied