Use GNOME Keyring as SSH Agent on Manjaro XFCE

Use GNOME Keyring as SSH Agent on Manjaro XFCE

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:

XFCE disable GNOME services

Also in Application Autostart:

XFCE disable GNOME services in 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.

Related Posts

SWIG is a wrapper generator that is able to connect compiled libraries to a bunch of scripting languages. The process is mostly automatic, but to tackle some corner cases, you have to help the generator do the right thing. In my library, all functions would return an integer, which is an error code. A special function, following the same behavior as strerror_r, can be used to retrieve the meaning of a special error code. This is a pretty usual mechanism for C code. But that’s not the way scripting languages work. In their world, functions are rather supposed to raise exceptions.

Read More

Rust is a systems programming language that aims to provide memory safety, performance, and concurrency. It achieves this through a combination of features such as ownership, borrowing, and lifetimes, which allow it to enforce memory safety at compile time without needing a garbage collector. This makes Rust particularly suitable for performance-critical applications and systems programming, where manual memory management is typically required. Rust’s zero-cost abstractions promises that high-level features do not incur runtime overhead, further enhancing its performance. The language’s concurrency model is designed to be safe and efficient, making it easier to write concurrent code without the common pitfalls of data races.

Read More

Manjaro is a fantastic way to get a fully-featured Linux desktop up and running in minutes. Its graphical installer, sensible defaults, and curated package selection making it a great choice for both newcomers and power users. However, over time, I found that Manjaro’s repositories lagged behind Arch, and—at least for the XFCE flavor—stability was not what I expected. I wanted to keep my working setup, but move to a system that is easier and more stable to maintain: pure Arch Linux.

Read More