LightDM is already able to create the xauthority file locally under $XDG_RUNTIME_DIR, using configuration option user-authority-in-system- dir. This option is off by default on Ubuntu 16.04/18.04, but can be enabled with
# echo -e '[LightDM]\nuser-authority-in-system-dir=true' >/etc/lightdm/lightdm.conf.d/50-user-authority-in-system-dir.conf LightDM then sets XAUTHORITY=/var/run/lightdm/$USER/xauthority instead of $HOME/.Xauthority. However, this path goes through the symbolic link /var/run -> /run. For some reason (why?) snap does not like such symlinks, resulting in a warning: # snap install pdftk # pdftk 2018/08/24 17:32:48.267771 cmd_run.go:442: WARNING: XAUTHORITY environment value is not a clean path: "/run/lightdm/mgk25/xauthority" A workaround to canonicalize the XAUTHORITY path (to eliminate symlinks) can be installed with e.g. # echo 'XAUTHORITY=`readlink -f "$XAUTHORITY"` && [ -z "$XAUTHORITY" ] && export XAUTHORITY' >/etc/X11/Xsession.d/10canonicalize-xauthority It would be nicer if LightDM directly used a canonical path in XAUTHORITY with user-authority-in-system-dir=true, or if snap didn't have to be so picky about symbolic links. (LightDM currently does not set ICEAUTHORITY when user-authority-in- system-dir=true.) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1648107 Title: $XAUTHORITY should move into $XDG_RUNTIME_DIR To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1648107/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
