Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
iainlane opened this issue Feb 16, 2017 · 3 comments
Closed

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

iainlane opened this issue Feb 16, 2017 · 3 comments

Comments

@iainlane
Copy link
Member

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).

@didrocks
Copy link
Member

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.

@merlijn-sebrechts
Copy link
Member

merlijn-sebrechts commented Jul 13, 2018

Looks like this has been fixed a while ago; it now uses getent to get the user's home dir.

https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/common/init#L17

@didrocks can you confirm and close this issue?

@didrocks
Copy link
Member

Indeed, closing.

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

No branches or pull requests

3 participants