
Use GNOME Keyring as SSH Agent on Manjaro XFCE
- Tehoor Marjan
- Linux
- December 30, 2024
Table of Contents
Using GNOME Keyring on XFCE on Manjaro is not complicated, but the documentation of ArchLinux doesn’t apply and you can scratch your head for a few hours before getting what you want. Well, loose no more hair, here are the simple steps.
Step 1: Stop XFCE from Hijacking ssh-agent
XFCE likes to start ssh-agent
on its own, but we need it to chill and let
GNOME Keyring step forward. Run this in your terminal:
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent
Step 2: Disable GNOME Services in XFCE
Make sure XFCE isn’t trying to start GNOME services itself. Go to Session and Startup > Advanced, and uncheck Launch GNOME services on startup. Like this:

Also in Application Autostart:

Step 3: Enable gcr-ssh-agent
Now, activate the GNOME Keyring SSH agent:
systemctl --user enable --now gcr-ssh-agent.socket
Step 4: Fix SSH_AUTH_SOCK
Despite what is written on the article about GNOME Keyring on the ArchWiki,
because XFCE is started by LightDM aside from your SystemD user session, it will
not pick up the SSH_AUTH_SOCK
environment variable. To do that, you need to
set it in ~/.xprofile
. (This file probably doesn’t even exists in your HOME.)
echo 'export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"' >> ~/.xprofile
Tip
Mind the use of single quotes, you don’t want the variable to expand (yet).
Step 5: Check GNOME Keyring Status
Ensure that gnome-keyring-daemon.service
is enabled on your user session (this
is normally the case).
systemctl --user status gnome-keyring-daemon.service
If not,
systemctl --user enable gnome-keyring-daemon.service
That’s it. Easy? Yeah, well… When you know how, sure.