[snap] File dialogs show snap's home directory instead of user's

Bug #1798450 reported by Samuel Kaiser on 2018-10-17
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Medium
Unassigned
libreoffice (Ubuntu)
Medium
Unassigned

Bug Description

How to reproduce:

- Find a web page that has a file chooser (you can just paste `<input type="file">` into an empty HTML page)
- Click the "Choose File" button
- Click "Home" if you didn't start here
- See that Chromium uses `/home/$USER/snap/chromium/500` as the home folder

Expected behavior:

The file picker should use the user's home folder, not the snap's, because everything else would be confusing for end users.

Versions:

snap 2.35.4+18.10
snapd 2.35.4+18.10
series 16
ubuntu 18.10
kernel 4.18.11-surface-linux-surface

Chromium 70.0.3538.67 snap

Samuel Kaiser (samuel-kaiser01) wrote :
Olivier Tilloy (osomon) wrote :

This also affects the libreoffice snap, and more generally all snaps using the desktop helpers (and it should be fixed there).

tags: added: snap
Changed in chromium-browser (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in libreoffice (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Olivier Tilloy (osomon) wrote :

And I filed https://github.com/ubuntu/snapcraft-desktop-helpers/issues/167 to track the issue where it belongs.

affects: df-libreoffice → snapcraft
Changed in snapcraft:
status: Unknown → New
Sergio Schvezov (sergiusens) wrote :

This is a runtime thing, not build time

affects: snapcraft → snapd
Paweł Stołowski (stolowski) wrote :

I don't think we want (or can) change HOME in snapd (due to undesired consequences and breaking many snaps), it works as designed, i.e. gives snaps dedicated areas where they can freely write data to, including hidden files; access to real user $HOME may not even be allowed unless home interface is connected. I see an alternative approach that only affects file picker is already discussed in the snapcraft-desktop-helpers issue above, for now marking it invalid for snapd.

no longer affects: snapd
Fritz Hudnut (este-el-paz) wrote :

Just adding that this issue has recently affected my work flow trying to upload a file to social media site in hopes of generating actual deniro . . . but could not get my own files to show up in what I was hoping would be my /home directory . . . but was instead a "snap" "virtual home" directory, so that it showed as "empty" . . . ?? very disruptive to routine uses . . . ??? I posted to wxl that if this was to prevent me from uploading his files to my social media then that "makes sense" . . . but to prevent me from simply uploading my own files n the system I'm booted and logged into . . . non-sensical . . .

So the issue is somewhat still present with newest snap system. I'm on 20.04 LTS.

The file picker in Chromium opens up in the snap directory but you can easily switch to your home directory.

I've uploaded this screenshot using Chromium snap.

Correction it seems that you can select an image from your Images folder but it doesn't actually get uploaded.

I'm trying again to upload the image. Maybe this time it will work.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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