Open mythsunwind opened 4 years ago
cc @NixOS/darwin-maintainers
Can you somehow rule out an upstream bug?
Can you somehow rule out an upstream bug?
Yes, I would say it is not an upstream bug because it did not work in 2.5.4 for me and I found a bug ticket on upstream which shows that selecting auto-type from the right-click menu worked for 2.5.4 on macOS Catalina (the macOS version i use) for upstream users:
I checked again and the issue still exists on 2.6.1 in the nix package but upstream version of 2.6.1 is fine.
Additionally the nix version of keepassxc 2.6.1 renders parts of the Qt UI with black icons on a black background now :(
I marked this as stale due to inactivity. → More info
@mythsunwind
I cannot reproduce this on my machine. Auto-type works for me. My system:
"x86_64-linux"
Linux 5.4.77, NixOS, 21.03pre252083.2deeb58f494 (Okapi)
yes
yes
nix-env (Nix) 2.3.8
"musnix, nixos-21.03pre268206.536fe36e23a, nixos-hardware"
"home-manager"
/nix/var/nix/profiles/per-user/root/channels/nixos
Possibly you could try to update your system and see whether bug persists? Also, what window manager do you use? Are you in KDE?
I believe that this is not a specific bug in keepassxc, but rather in the nixpkgs-Qt story in general. There have been bugs in the past with Qt introducing state in home directories and whatnot. Perhaps @ttuegel can share his wisdom what to look out for?
I marked this as stale due to inactivity. → More info
This bug is ongoing with KeePassXC 2.7.9 on KDE Plasma 6.2.2. No Auto-Type settings tab is shown and autotype does not work. I think it is because of some Wayland limitation.
I have found and tested 3 workarounds, as per KeePassXC docs. They all force the app to relay on X11 instead of Wayland.
Solution 1: Start KeePassXC from terminal with -platform xcb
flag.
Full command is simply: keepassxc -platform xcb
Solution 2: Install KeePassXC as a Flatpak. (How to enable Flatpaks is below the picture.) Open (KDE Plasma) System Settings -> Application Permissions -> Flatpak Permissions -> KeePassXC -> Advanced Permissions -> Sockets Disable (untick) Wayland windowing system. Click Apply and restart KeePassXC.
Solution 3: Install KeePassXC as a Flatpak. (How to enable Flatpaks is below the picture.)
Open (KDE Plasma) System Settings -> Application Permissions -> Flatpak Permissions -> KeePassXC -> Advanced Permissions -> (on bottom) Environment -> Add New
Set Name exactly: QT_QPA_PLATFORM
Set Value exactly: xcb
Click Apply and restart KeePassXC.
Flatpak workarounds work on other distros also! I tested on Debian Bookworm. If not on KDE Plasma, download and use Flatseal to set advanced Flatpak permissions on your system.
How to enable Flatpak on NixOS: Simplest and reproducible way is to configure flake.nix as per https://github.com/gmodena/nix-flatpak:
{
inputs = {
# ...
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch. Use github:gmodena/nix-flatpak/?ref=<tag> to pin releases.
};
outputs = { nix-flatpak, ... }: {
nixosConfigurations.<host> = nixpkgs.lib.nixosSystem {
modules = [
nix-flatpak.nixosModules.nix-flatpak
./configuration.nix
];
};
};
}
Then add this to your configuration.nix:
# FLATPAK
services.flatpak.enable = true;
services.flatpak.update.onActivation = true; # updates flatpaks at nixos-rebuild
services.flatpak.update.auto.enable = true;
services.flatpak.update.auto.onCalendar = "7d";
# PACKAGES
services.flatpak.packages = [
"org.keepassxc.KeePassXC"
# here you can declare other flatpaks to install
];
Run nixos-rebuild switch, and you're done!
Extra: If you want a GUI package store, search for kde.Packages.discover and nix-software-center.
No matter which workaround the user picks, it does not make a reproducible system because it requires manual intervention after installation. Furthermore, this is another app where I ended up using the Flatpak version instead of the native nixpkgs because of a broken feature and more integrated workaround.
Can you please attempt to enable auto-type feature by setting cmake build flag -DWITH_XC_AUTOTYPE=ON
as @mythsunwind suggested, if that is still a valid flag of course?
Or consider finding a solution with QT_QPA_PLATFORM=xcb
or platform -xcb
.
I am also interested in any other easily-reproducible solutions!
I hope I was of help and a fix will be implemented. Thanks and all best, Klemen
Describe the bug The feature to auto-type in a password is not working on 2.6.0 version of keepassxc on macOS. I also saw the issue with the a former version 2.5.x.
To Reproduce Steps to reproduce the behavior:
Auto-Type tab is greyed out and disabled. No menu item.
Expected behavior There should be a menu item for auto-type on the entry and also an Auto-Type tab on the bottom of keepassxc. None of them exist, even though the extension is enabled according to the debug info (see below).
Screenshots
More info cmake contains flag to build auto-type feature with
-DWITH_XC_AUTOTYPE=ON
. I can attach full build log if needed.Keepassxc debug info KeePassXC - Version 2.6.0
Qt 5.12.7 Debugging mode is disabled.
Operating system: macOS 10.15 CPU architecture: x86_64 Kernel: darwin 19.5.0
Enabled extensions:
Cryptographic libraries: libgcrypt 1.8.6
Notify maintainers @jonafato @turion
Metadata $ nix-shell -p nix-info --run "nix-info -m"
"x86_64-darwin"
Darwin 19.5.0, macOS 10.15.5
yes
no
nix-env (Nix) 2.3.6
"nixpkgs-20.09pre237079.d418434d127"
"nixpkgs-20.09pre228165.00df2371122"
/nix/var/nix/profiles/per-user/root/channels/nixpkgs
Maintainer information: