Set up Gnome to use ssh-add on startup
- From within Gnome go to the Gnome Control Center via the Gnome
footprint with the Arrow and go to Programs->Settings->Gnome Control
Center->Session->Startup Programs.
- Click 'Add'.
- Enter '/usr/bin/ssh-add /home/lilys//.ssh/identity' on the command line for RSA (ssh version 1) or '/usr/bin/ssh-add ~/.ssh/id_dsa' for DSA (ssh version2). [If you just say '/usr/bin/ssh-add' it will default to the system default, which for us is currently SSH2/DSA.]
The default priority value of '50' is fine.
- Click 'Okay' in this panel.
- Click 'Okay' in the Gnome Control Center panel.
[* Alternatively you can just directly edit your
'~/.gnome/session-manual' file and add the following lines
0,Priority=50
0,Restartcommand=/usr/bin/ssh-add
Also make sure that the 'num_clients' line is incremented. If you had
nothing here previously, make sure you have the following line before
the above two.
num_clients=1
Similarly to above, if you're using ssh2 add
'~/.ssh/id_dsa' to the second line above.]
Edit your 'startx' file and comment out the present ssh-add lines.
Now you can go ahead and change your 'startx' alias to
alias startx "ssh-agent ~/startx & ; sleep 60 ; exit