Skip to content

FileChooser cannot be opened when running under Wayland

Description:

When running KeepassXC in Sway, pressing the Open Database button, and any other button that triggers a File Chooser, does nothing.

I asked in the #keepassxc channel on libera and they said it wasn't a problem on their end, but with my environment instead.

Additional info:

Steps to reproduce:

  1. Run KeepassXC in Sway
  2. Press the Open Database
  3. See that it doesn't open

dbus-monitor logs:

method call time=1730043932.721391 sender=:1.65 -> destination=org.freedesktop.portal.Desktop serial=84 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.FileChooser; member=OpenFile
   string "x11:1"
   string "Open database"
   array [
      dict entry(
         string "directory"
         variant             boolean false
      )
      dict entry(
         string "filters"
         variant             array [
               struct {
                  string "KeePass 2 Database "
                  array [
                     struct {
                        uint32 0
                        string "*.kdbx"
                     }
                  ]
               }
               struct {
                  string "All files "
                  array [
                     struct {
                        uint32 0
                        string "*"
                     }
                  ]
               }
            ]
      )
      dict entry(
         string "handle_token"
         variant             string "qt2944820299"
      )
      dict entry(
         string "modal"
         variant             boolean true
      )
      dict entry(
         string "multiple"
         variant             boolean false
      )
   ]
method call time=1730043932.721809 sender=:1.28 -> destination=org.freedesktop.DBus serial=108 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetConnectionUnixProcessID
   string ":1.65"
method return time=1730043932.721820 sender=org.freedesktop.DBus -> destination=:1.28 serial=4294967295 reply_serial=108
   uint32 2504
error time=1730043932.722082 sender=:1.28 -> destination=:1.65 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=84
   string "Portal operation not allowed: Unable to open /proc/2504/root"
Edited by txtsd
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information