Low Orbit Flux Logo 2 D

Disable GNOME Keyring on Ubuntu

The GNOME Keyring can be really annoying especially when you have never even asked it to track your passwords for you. It can keep popping up over and over each time you kill it. It can be difficult to remove due to how many things depend on the package and the number of different ways in which it can be started.

My fix to disable GNOME keyring on Ubuntu :

sudo mv /usr/bin/gnome-keyring-daemon /usr/bin/gnome-keyring-daemon.bak 
sudo touch /usr/bin/gnome-keyring-daemon
sudo chmod a+rx /usr/bin/gnome-keyring-daemon
sudo reboot

This has worked for me and hasn’t caused any issues yet.

Why? Other Options?

Potential Fixes:

You can’t just remove the package because far too much depends on it.

It could be started by:

Why was this hard to find?

What I Checked

When checking systemd for system services related to the keyring nothing is found:

systemctl list-units --type=service | grep -i keyring

Some Googling lead me to the hint that it might be run by dbus as a systemd user service. It turns out that this was actually disabled though. You can check its status like this:

systemctl --user status gnome-keyring

You can find the status for the user instance of D-Bus here. It shows that one of the services running under it is gnome-keyring.

systemctl --user status dbus

D-Bus has configuration files for services in the directory listed below. These files tell D-Bus what to do when a service is requested. These are not systemd config files but may specify which systemd service to launch.


D-Bus will launch services when a client requests that a message be sent to that service. It may attempt to start that service even if it is disabled. In the case above it looks like D-Bus was actually calling the gnome-keyring binary directly and not even trying to start the systemd service.

You can see these services:

user1@zippy-zap:~$ ls /usr/share/dbus-1/services|grep keyring

They look like this:

user1@zippy-zap:~$ cat /usr/share/dbus-1/services/org.gnome.keyring.service
[D-BUS Service]
Exec=/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets

More Details on Disabling the GNOME Keyring on Ubuntu

There are two different systemd processes that may start the keyring:

/lib/systemd/systemd –user systemd proc that launches user services
/sbin/init top level systemd process (symlink)

There are also at least two different D-Bus instances. There is a system D-Bus instance and a user D-Bus instance. The user instance is what launches the gnome-keyring.

Here is the gnome-keyring-daemon running directory from systemd ( ppid 1 ):

user1@zippy-zap:~$ ps -ef |grep -i ring
user1       1480       1  0 12:27 ?        00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
user1       2538    2274  0 12:28 pts/1    00:00:00 grep --color=auto -i ring

Note that init is a symlink pointing to systemd and that this is process 0.

user1@zippy-zap:~$ ps -ef | awk '{ if( $2 == 1 ) { print $8 } }'
user1@zippy-zap:~$ ls -l /sbin/init
lrwxrwxrwx 1 root root 20 Jul 21 15:00 /sbin/init -> /lib/systemd/systemd

Here is the gnome-keyring running from the systemd proc that launches user services ( ppid 1541 in this case ):

user1@zippy-zap:/usr/share/dbus-1/services$ ps -ef |grep -i gnome-keyring
user1     432977    1541  0 Nov26 ?        00:00:01 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
user1     983213  868456  0 11:27 pts/2    00:00:00 grep --color=auto -i gnome-keyring

Here is the systemd user service process which runs directly under the main systed service:

user1@zippy-zap:/usr/share/dbus-1/services$ ps -ef |grep -i 1541
user1       1541       1  0 Nov24 ?        00:00:00 /lib/systemd/systemd --user
user1       1542    1541  0 Nov24 ?        00:00:00 (sd-pam)

The GNOME Keyring Package

These packages were installed on my system.

user1@zippy-zap:/usr/share/dbus-1/services$ dpkg -l |grep -i gnome-keyring
ii  gnome-keyring                                 3.36.0-1ubuntu1                       amd64        GNOME keyring services (daemon and tools)
ii  gnome-keyring-pkcs11:amd64                    3.36.0-1ubuntu1                       amd64        GNOME keyring module for the PKCS#11 module loading library
ii  libpam-gnome-keyring:amd64                    3.36.0-1ubuntu1                       amd64        PAM module to unlock the GNOME keyring upon login

Here I check which files were associated with one of these packages. A large number of these contain a command calling the keyring binary sometimes with different parameters. These seem to be spread all over the place.

user1@zippy-zap:/usr/share/dbus-1/services$ dpkg -L gnome-keyring