Issues with Gnome Keyring and KeePassXC

Do you know if the current proposal for F45 to replace gnome-keyring with oo7 will mitigate the problem with KeePassXC?

My impression is that it will stay the same, only that now instead of gnome-keyring becoming owner of the secret-service D-bus now it will be oo7… But I am happy to be proven wrong!

I think that ideally this should be fully configurable under users preferences: each user should have a way to set which is the software to use as a backend for the secret-service.

That is my impression as well. Gnome has a fixed list of systemd user services that is started at log-in time, and that is not really open to adjustments.

But what is the KeePassXC issue you are referring to?

My issue is that under XFCE I have configured KeePassXC to autostart at the beginning of the session. However, gnome-keyring starts before and owns the secret D-Bus service. So by the time KeePassXC has been initialized it cannot bind to the secret service.
This is despite I followed the instructions in the documentation to enable KeePassXC as the Secret Service provider: KeePassXC: User Guide

With xfce, the keyring is started by xfce4-session, but it can be disabled. Following script will disable starting the keyring and the ssh agent as well. The script is run as user as it is changing user settings.

xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /compat/LaunchGNOME -n -t bool -s false

Then it is up to you to start KeePassXC.

If you don’t need ssh agent, you can skip the rest.

If you need ssh agent, you can create a file /etc/X11/xinit/xinitrc.d/nosshagent.sh with the contents

#!/bin/sh

# Prevent xinit script from starting ssh-agent and set
# the gcr socket environment variable

SSH_AGENT_PID=none
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"

export SSH_AGENT_PID
export SSH_AUTH_SOCK

and then enable the gcr service

sudo systemctl --global enable gcr-ssh-agent.socket

The nosshagent.sh is a hack to prevent the ssh-agent to be start by the init scripts as we want to have the gcr-ssh-agent start the ssh agent. It sets the socket variable as well for gcr. The gcr-ssh-agent will load your ssh keys and get the secret key for unlocking them from the secret service.

By the way, it would have been better to have opened a new topic instead of appending your post to an old post.

Thanks a lot for sharing that information!