SNAP_REAL_HOME causes problem

Bug #2017587 reported by Soumyadeep Ghosh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned
snapd
New
Undecided
Unassigned

Bug Description

If a snap has `$SNAP_REAL_HOME` set in `$HOME` variable, when the snap is opened, it changes the permission of empty folders, making them unusable. More about this is discussed in the snapcraft forum.
https://forum.snapcraft.io/t/snap-real-home-is-kinda-buggy/
A further investigation is requested by the snapd team. Thank you.

Soumyadeep Ghosh(সৌম্যদীপ ঘোষ)

Tags: snap
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Hi, could you please add more context about why you need to set the HOME env var as SNAP_REAL_HOME?
Which is the use case?
thanks

Revision history for this message
Soumyadeep Ghosh (soumyadghosh) wrote :

There are two use cases for this:

1. There are still a lot of apps, that doesn't use portals. When these apps open file chooser, it takes to the $SNAP_USER_COMMON, when a user clicks `home`, I don't think this is a very pleasant experience for a user.

2. There is a project that I'm snapping, it saves the current configuration of the desktop. It uses the $HOME to find out and copy the config files, themes, icons etc and again saves it. For that it need the $HOME to point out to the real home.

This is the project https://github.com/vikdevelop/SaveDesktop

Alex Murray (alexmurray)
affects: snap → snapcraft
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

It was answered by kenvandine in the forum topic. Please let me know if that answer works for you.

Revision history for this message
Soumyadeep Ghosh (soumyadghosh) wrote :

No, I saying the same that I said there..

> The current code is small, so, as per I have checked, this app directly calls python subprocess to save files in ~/ or copy from those config files.
> https://github.com/vikdevelop/SaveDesktop/blob/main/src/main_window.py#L501
> Also, there are calls by it done to the {path.home}/ I need the call done to home itself, not to something assigned as home. The script fixes the assign, and the app follows it and searches for config files under SNAP_USER_DATA

https://forum.snapcraft.io/t/snap-real-home-is-kinda-buggy/34463/15

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.