Application can't see /media in file browser

So, the common theme of those two apps is Qt.

I tried installing the keepassxc snap, and its file chooser appears to be the fallback Qt one. In contrast, Qt apps outside of the sandbox show the familiar GTK file chooser. This seems to be due to the libqgtk3.so plugin from the qt5-gtk-platformtheme package, which doesn’t appear to be bundled with the keepassxc snap. It is possible that adding qt5-gtk-platformtheme to `stage-packages might help.

I don’t know if this would be enough to get the GTK file chooser to show mounted volumes though: that probably requires access to /etc/fstab (which requires the mount_observe snap interface), or talking to some gvfs daemon.

I think the best long term plan though would be to get snaps to work with xdg-desktop-portal: having the file chooser out of process as a trusted helper means it should look identical to what unconfined apps use, and can even adapt to the user’s chosen desktop (i.e. GTK file chooser on GNOME/Unity, Qt file chooser on KDE).

1 Like