Comment 4 for bug 1391955

Revision history for this message
In , LaƩrcio de Sousa (lbssousa) wrote :

I've managed to make guest login work!

My guest-account creation script (ported from Ubuntu) is available in my lightdm branch (link above). The relevant changes are:

* Replace /etc/default/locale with /etc/sysconfig/language (and export LANG=$RC_LANG)

* Replace "adduser with --gecos option" with useradd (followed by chfn to set GECOS)

* Rename UID variable to GUEST_UID (systemd is telling me that special variable UID is read-only).

* Replace /media with /run/media

The hardest part was debugging AppArmor profile. After some struggle, I've found that the following settings need to be added in lightdm-guest-session AppArmor profile:

# Needed to exec /etc/X11/xdm/Xsession, openSUSE'd default session-wrapper.
/etc/X11/xdm/** ix,

# Needed to exec /etc/X11/xinit/xinitrc and /etc/X11/xinit/xinitrc/xdg-user-dirs.sh, called by /etc/X11/xdm/Xsession.
/etc/X11/xinit/** ix,

# openSUSE mounts USB sticks under /run/media, not /media.
owner /run/media/ r,
owner /run/media/** rmwlixk,

I've opened a bug at Launchpad to ask if these settings could be upstreamed. See also: https://bugs.launchpad.net/lightdm/+bug/1391955