GTK+3 doesn't show FUSE/GVFS, smb (SMB/CIFS), sftp (SFTP/SSH) network shares in file chooser

Bug #1714518 reported by Colin Leroy on 2017-09-01
142
This bug affects 57 people
Affects Status Importance Assigned to Milestone
GTK+
Confirmed
Medium
chromium-browser (Ubuntu)
Undecided
Unassigned
deja-dup (Ubuntu)
Undecided
Unassigned
firefox (Ubuntu)
Undecided
Unassigned
gdebi (Ubuntu)
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Low
Colin Leroy
meld (Ubuntu)
Undecided
Unassigned
remmina (Ubuntu)
Undecided
Unassigned
thunderbird (Ubuntu)
Undecided
Unassigned
transmission (Ubuntu)
Undecided
Unassigned
usb-creator (Ubuntu)
Undecided
Unassigned
vinagre (Ubuntu)
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Install any Gtk3 application such as Firefox or Chromium which use modern file-chooser dialog.
2. Mount network location through fstab or file-manager ("smb://" = SMB/CIFS, "sftp://" = SFTP/SSH and so on)
3. Try to save/open file to/from the remote location from Gtk3 application.

Expected results:
* user is able to find network folder and save/open file to/from it with GtkFileChooser dialog

Actual results:
* user is unable to find network folder and save/open file to/from it with GtkFileChooser dialog and many user applications are affected

-------------------------------------------------------------------------
Original bug description is below:

GTK+3 doesn't show FUSE network shares in file chooser - it used to do so in GTK+2, and the GTK+3 documentation still mentions it should do it.

In the mean time, every user of every application switching to GTK+3 -- including Chromium, at some point between 58 and 60 -- (a change which happened in 16.04 LTS!!), loses the functionality to open or save directly to a network share.

I had chosen 16.04 LTS for deploying our workstations at work, and my 50 users have been suddenly unable to do a simple operation they have to do dozens of times a day.
They now have to "buffer" these files to their local filesystem when saving them and before uploading them, and then copy them to the company's network shares.
They were already a little bit grumpy when it stopped working with Firefox, and are now really side-eyeing me when they apply updates and find Chromium broken.

I have reported the bug upstream and provided a patch to fix this. I hope you'll be able and willing to include it to Ubuntu's GTK+3 package.

Thanks in advance.

Colin

Colin Leroy (colin-colino) wrote :

Here's the patch.
It's also been provided upstream at https://bugzilla.gnome.org/show_bug.cgi?id=787128

description: updated

The attachment "gtk_3_fix_fuse_mounts.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Colin Leroy (colin-colino) wrote :

Here is a debdiff with that patch integrated. I hope it'll help.

Changed in gtk+3.0 (Ubuntu):
assignee: nobody → Colin Leroy (colin-colino)
status: Confirmed → In Progress
Jeremy Bicha (jbicha) wrote :

Why do you think showing network shares is supposed to be the default in GTK+ 3?

My understanding is that it is documented that only local files are shown:
https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-local-only

I think the comment about FUSE was more of "on some systems, you may get network files showing anyway even though we try to follow the setting."

Colin Leroy (colin-colino) wrote :

Hi,

No - I think the default is to show everything accessible via POSIX paths.

There is some code in GTK+2 that specifically verifies if volumes are accessible via POSIX paths in local only mode, and adds them if they are. This includes FUSE-mounted network shares.

in gtk/gtkfilechooserdefault.c: shortcuts_add_volumes() for example.

Colin Leroy (colin-colino) wrote :

I would also add that even though asking for GTK3 applications like Chromium, Firefox, Thunderbird to call gtk_file_chooser_set_local_only(FALSE) seems like an easy fix, it is not:

when such applications then call for gtk_file_chooser_get_filename() (and _get_filenames), they could end up with NULL for remote files that are not fuse-mounted.

Similarly, gtk_file_chooser_get_uri() (and _get_uris) behaves differently when local-only is set or not. With local-only set, _get_uri() returns a native file:/// path, without it returns a normal uri (smb:// ...)

My understanding of the "show FUSE mounts in local-only mode" is that it helps numerous applications easily handle I/O with remote volumes without having to use GIO everywhere.

Colin Leroy (colin-colino) wrote :

Hello,

Here is a (different) patch to fix the problem on Artful's GTK 3.22.

The difference with the previous patch for GTK 3.18 is that there is now an "Other Locations" entry in the sidebar, which displays mounts via GtkPlacesView. This puts them in the correct place.

Changed in gtk:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gtk+3.0 (Ubuntu):
importance: Undecided → Low
Norbert (nrbrtx) on 2017-10-31
tags: added: bionic xenial
Norbert (nrbrtx) wrote :

Some Ubuntu users are newbies, they do not know about GVFS, FUSE and so on, so they can't suppose to use /media folder for network filesystems.

This bug should be fixed as soon as possible. Xenial and Bionic are affected.
Most Gtk3 applications are affected - the most common are Firefox, Google Chrome.

description: updated
summary: - GTK+3 doesn't show FUSE network shares in file chooser
+ GTK+3 doesn't show FUSE/GVFS, SMB/CIFS, SFTP/SSH network shares in file
+ chooser

What is interesting gnome-mplayer shows my SMB/CIFS share.

Norbert (nrbrtx) wrote :

And baobab shows my SMB/CIFS share.

Norbert (nrbrtx) wrote :

Gedit and Evince show my SMB/CIFS share. So some applications have problems in their GtkFileChooser dialog code.

Norbert (nrbrtx) on 2017-10-31
description: updated
summary: - GTK+3 doesn't show FUSE/GVFS, SMB/CIFS, SFTP/SSH network shares in file
- chooser
+ GTK+3 doesn't show FUSE/GVFS, smb (SMB/CIFS), sftp (SFTP/SSH) network
+ shares in file chooser
Norbert (nrbrtx) wrote :

For meld see bug 1335457.

Norbert (nrbrtx) on 2017-10-31
description: updated
description: updated
Norbert (nrbrtx) on 2017-11-03
no longer affects: brasero (Ubuntu)
Colin Leroy (colin-colino) wrote :

Hi,
Yeah. That bug hits a lot of applications because GTK+3 does things differently than GTK+2 in this regard, which is why I submitted the bugreport (and a patch) to GTK+3 instead of all these applications.

Olivier Tilloy (osomon) on 2017-11-06
no longer affects: chromium (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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