desktop-launchers assumes home is /home/$USER #53

Open
iainlane opened this Issue Feb 16, 2017 · 1 comment

Comments

Projects
None yet
2 participants

Looking at https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/common/desktop-exports#L138 we can see a hardcoded /home/$USER.

I suppose this is because of apparmor, but it should be $HOME instead. If necessary for now users can (hopefully) configure /etc/apparmor.d/tunables/home to make this work.

(Aside: does this have access to the environment? if so, it should look at $XDG_CONFIG_HOME if that is set).

Owner

didrocks commented Feb 17, 2017

Hey Iain! Unfortunatly, this is not possible (you can try it yourself on any snap):

$ snap run --shell hello
# in the subshell:
$ env | grep HOME
DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
JAVA_HOME=/usr/lib/jvm/java-8-oracle
HOME=/home/didrocks/snap/hello/20

You can see that $HOME is set to $SNAP_USER_DATA.
When doing the symlink for gsettings, I need to have the real $HOME for the apps, hence this line.

This was mentioned to upstream a few months back and said to be in the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment