[one-liner]: Gnome’s VNC Server, Vino, prompts for the Gnome Keyring Password on Ubuntu 10.04

Background

Another day with Ubuntu and another nebulous error 8-). I recently setup my 2nd permanent Ubuntu system, which would be used exclusively by my wife. I used 10.04 and the install went fine. During the install one of the dialogs asked if I wanted to login automatically.

Ubuntu install dialog: who are you

Given this was going to be exclusively used by her, I went ahead and enabled it to automatically login.

Well apparently there’s a bit of a bug in the following use case:

  1. enable automatic login
  2. enable VNC server (Vino) with a password
  3. try to connect to box with a VNC client
  4. Doesn’t work!

Why? Well when I went to check on the Ubuntu box I saw that the Gnome Keyring Manager dialog was popped up waiting for me to put in my password to unlock Gnome’s Keyring. Kinda hard to do this when working remotely 8-).

gnome-keyring-manager dialog

Solution

This thread on launchpad provided a useful workaround. First open up the Passwords and Encryption Keys app (Applications -> Accessories -> Passwords and Encryption Keys) from Gnome’s top panel Applications pull down.

passwords encryption keys dialog

Right click on Passwords:login and unlock it.

unlock keyring password menu

Keyring Passwords:login item is now unlocked.

keyring password unlocked

Expand the Passwords:login item and then delete the entry, vino.local:5900 entry, this is your VNC password within the gnome keyring!

Passwords:login item

delete menu pick

Now close the Passwords and Encryption Keys dialog box and invoke gconf-editor.

1
% gconf-editor

Next navigate with gconf-editor’s tree to /desktop/gnome/remote_access.

gconf-editor: remote_access

Right click on vnc_password, and an edit key dialog box will pop up.

gconf-editor: edit key

In a terminal window, run the following command to base64 encode your desired VNC password. For example:

1
2
3
4
5
6
# NOTE: YOU MUST USE THE -n SWITCH!
#       Otherwise the trailing carriage return and linefeed emitted by 
#       the echo command will also be part of the encoded string!
 
me@scully:~$ echo -n "my_vnc_password" | base64
bXlfdm5jX3Bhc3N3b3Jk

Take the resulting string and paste it into the Edit Key dialog box. Take care not to include any extra charcters such as carriage returns of linefeeds.

gconf-editor: edit key w/ base64 password

Finally close gconf-editor and test out your VNC server by connecting to it with a VNC viewer such as vncviewer. The only drawback with this approach is that your VNC password is weakly stored, Base64 encoded, within a gconf xml file.

1
2
3
4
5
6
7
8
9
10
11
% pwd
/home/me/.gconf/desktop/gnome/remote_access
% ls -l
%gconf.xml
% more %gconf.xml 
<?xml version="1.0"?>
<gconf>
	<entry name="vnc_password" mtime="1289286946" type="string">
		<stringvalue>bXlfdm5jX3Bhc3N3b3Jk</stringvalue>
...
...

Useful Links

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.

This entry was posted in linux, one-liner, remote desktop, Syndicated, sysadmin, tip, tips & tricks, Ubuntu, VNC. Bookmark the permalink.

Comments are closed.