Thursday, August 13, 2015

Vino VNC asks for keyring password

When you try to connect with VNC to your Ubuntu desktop which has Vino configured and running, it may trigger a gnome keyring password prompt on the local display, and the login process hangs on the remote end. There are many solutions around, and most of them leave the system somewhat dirty. Here's a procedure I've gathered which fixes the problem, even remotely, and leave the system clean.

First of all, we need to shut down the gnome keyring daemon. But I've found that all application trying to gain access to the keyring will cause it to launch. So I found the only way to stop it without removing it is to rename it. Temporarily, don't worry:

sudo mv /usr/bin/gnome-keyring-daemon /usr/bin/gnome-keyring-daemon.bak
sudo reboot

Then you should be able to connect to the remote machine with VNC. But let's not stop here and do things proper. First, reenable gnome keyring daemon and launch it so it is available to the next step:

sudo mv /usr/bin/gnome-keyring-daemon.bak /usr/bin/gnome-keyring-daemon
gnome-keyring-daemon

Make sure seahorse is installed and launch it from the VNC session. It's in System / Preferences / Passwords and Keys.

Now there's this "Login" folder. Unlock it by right clicking and choosing Unlock.

In the login folder, you will find an item named Vino. Right click on it and delete it.

And that's it. You can make sure everything is fixed by rebooting and trying to connect with VNC again.

I believe you have to leave the VNC password blank. Otherwise it'll create this item in the keyring. Feel free to confirm this in the comments. I've pulled too much hair out for this already ;)