You are viewing fragglet

fragglet [userpic]

Using gnome-keyring-daemon without Gnome

January 8th, 2007 (08:21 pm)

I have a relatively old laptop, and it isn't powerful enough to run Gnome (my environment of choice). Instead, I've been running fluxbox on it. I've also recently started using the excellent NetworkManager which greatly simplifies the process of connecting to wireless networks in Linux.

One problem I found was that NetworkManager would re-prompt me for the wireless AP password every time I logged in. NetworkManager's nm-applet program (the GUI half of the system) uses Gnome's keyring system for storing passwords. Because I wasn't running in Gnome, however, the keyring daemon wasn't being run on startup. As a result, errors like these appear on the console:

** (nm-applet:6925): WARNING **: Error saving passphrase in keyring. Ret=2

These problems persisted even if I started gnome-keyring-daemon manually or added it to my .xsession file. Anyway, I found the solution to my problem. This is what my .xsession now looks like:
eval "`gnome-keyring-daemon`"

nm-applet &
(On startup, gnome-keyring-daemon prints two environment variables that must be added to the environment nm-applet runs in; I evaluate the output so that they are added).


Posted by: srlamb (srlamb)
Posted at: January 8th, 2007 10:05 pm (UTC)
Use eval

You don't need to use a temporary file:

eval "`gnome-keyring-daemon`"

Posted by: fragglet (fragglet)
Posted at: January 9th, 2007 03:40 am (UTC)
Re: Use eval

Quite right. I figured there was probably a more elegant way of doing this. I've updated the instructions. Thanks!

Posted by: ((Anonymous))
Posted at: September 19th, 2007 09:29 pm (UTC)
$(command) instead of `command`

in SuSE linux you must to use the new syntax:

eval $(gnome-keyring-daemon)

Posted by: fragglet (fragglet)
Posted at: September 19th, 2007 09:52 pm (UTC)
Re: $(command) instead of `command`
Chocolate Doom

Thanks for the comment. If backtics don't work, it sounds like your shell is broken though. backtics are a POSIX standard feature.

Posted by: ((Anonymous))
Posted at: September 24th, 2007 07:16 pm (UTC)

Thanks, this was driving me insane, especially with the ipw3945 driver tweaking out all the time, and thus constantly reconnecting to a WPA secured AP

Posted by: ((Anonymous))
Posted at: December 15th, 2009 07:37 am (UTC)

You saved my life. BTW, now it print 3 variables:

the new one is SSH_AUTH_SOCK

Posted by: ((Anonymous))
Posted at: February 3rd, 2010 03:29 pm (UTC)
What about saving svn https passwords?

Although I have the daemon and the system variables, I can not save svn https passwords in gnome-keyring-daemon. Running gnome I can do it.

Do you know if I need anything else?

I'm using subversion 1.6.4dfsg-1~bpo50+1 in debian linux (lenny+backports)



7 Read Comments