keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.68k stars 1.43k forks source link

Ubuntu: poor file manager integration #2469

Closed DuncanLithgow closed 1 year ago

DuncanLithgow commented 5 years ago

Versions: Ubuntu 18.04.01

Expected Behavior

It should provide the same file manager destinations as the native OS

Current Behavior

When opening a file it should allow me to choose from all the same destinations as I am presented with in the OS native file manager.

... to choose from all the same destinations as I am presented with in the OS native file manager.

Possible Solution

Steps to Reproduce (for bugs)

  1. make sure you have some network destinations shown in the Ubuntu File Manager
  2. try and open a file from KeePassXC by navigating to a network destination

Context

I want to open my keepass file from a mounted (Gnome Online Accounts) google drive directory

Debug Info

KeePassXC - 2.3.1 (not the snap) Revision: ?

Libraries:

Operating system: Ubuntu 18.04.1 CPU architecture: x86_64 Kernel: 4.15.0-38-generic

Enabled extensions:

Attached screenshot shows KeePassX and KeePassXC side by side. Note the additional directories available in KeePassX screenshot from 2018-11-10 15-09-03

DuncanLithgow commented 5 years ago

Let me know if this bug should actually be against 'Files' in Ubuntu for not presenting this functionality to KeePassXC (which is how it looks to me)

droidmonkey commented 5 years ago

Did you go into "+ Other Locations"?? That is where the network drives hide in the wonderfully terrible Gnome file manager.

DuncanLithgow commented 5 years ago

I shouldn't need to once I've mounted it it should just be there. That's how 'Files' works now in Ubuntu

Den lør. 10. nov. 2018 kl. 16.08 skrev Jonathan White < notifications@github.com>:

Did you go into "+ Other Locations"?? That is where the network drives hide in the wonderfully terrible Gnome file manager.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keepassxreboot/keepassxc/issues/2469#issuecomment-437590293, or mute the thread https://github.com/notifications/unsubscribe-auth/ADEt9J6BB3DJRb4r6ijG45Ge-fQKeglDks5utuvigaJpZM4YYAWr .

-- With or without religion, good people can behave well and bad people can do evil; but for good people to do evil — that takes religion.

Steven Weinberg

droidmonkey commented 5 years ago

We don't do anything special with the file dialog besides calling Qt to display it. This is definitely an issue on the "Files" side.

DuncanLithgow commented 5 years ago

Are there no flags for defining how the file manager should be displayed? I'd like to get to the bottom of this somehow

droidmonkey commented 5 years ago

It could be a Qt issue. I noticed that the drive showed up when I used the TextEditor application to test.

I think I found it...

Qt Code specifically sets gtk_file_chooser_set_local_only to true: https://github.com/qt/qtbase/blob/5.11/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp#L427

Which may (have not tested) result in mounted network shares not being shown in the left side: https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-local-only

DuncanLithgow commented 5 years ago

@droidmonkey I would certainly suggest that keepassx considers going against this default setting. I think it's very normal for a password to be saved to an external location.

So this is non-optimal: "local_only | TRUE if only local files can be selected"

phoerious commented 5 years ago

I am not sure if that is something we can influence without reimplementing QFileDialog.

droidmonkey commented 5 years ago

Is this still an issue?

Stubenhocker1399 commented 5 years ago

Yes. Same issue still under KDE.

alfo1133 commented 4 years ago

This is still an issue on Ubuntu 19.10. Will this be solved please? Hard to use kpXC without being able to open remote location(s).

Debug Info: KeePassXC - Version 2.5.0 Revision: 1ab8a9f Distribution: Snap

Qt 5.9.5 Debugging mode is disabled.

Operating system: Ubuntu Core 18 CPU architecture: x86_64 Kernel: linux 5.3.0-19-generic

Enabled extensions:

Cryptographic libraries: libgcrypt 1.8.1

lautsevich commented 4 years ago

The same problem on Ubuntu 20.04.

pellcorp commented 3 years ago

Clicking on Other Locations to get to the mount point seems like a pretty reasonable work around, however this workaround does not work with the snap version, only the ppa installed version.

In the snap version I also had problems accessing the /media/$USER mount points, whereas ppa works fine. I guess sandbox issue, but I am no snap expert.

droidmonkey commented 3 years ago

Entirely related to the snap sandbox

phoerious commented 3 years ago

Besides setting local mode, Qt seems to be using the horrendous GtkFileChooserDialog instead of GtkFileChooserNative, which uses the slightly less horrendous Gnome file picker if running on a Gnome desktop. I wonder if we could work around that.

phoerious commented 3 years ago

I wonder why distributions are still shipping the broken Gtk2 platformtheme when there has been a gtk3 variant since Qt 5.7 in the repository.

svonjoi commented 1 year ago

Clicking on Other Locations to get to the mount point seems like a pretty reasonable work around, however this workaround does not work with the snap version, only the ppa installed version.

In the snap version I also had problems accessing the /media/$USER mount points, whereas ppa works fine. I guess sandbox issue, but I am no snap expert.

I dont see any "other locations" entry in kdbx picker dialog.

For a workaround I installed google-drive-ocamlfuse package and mount gdrive cloud in directory accesible with kdbx picker dialog, for example ~/Documents