I like to set up my Ubuntu workstation to automatically log into my account and then immediately lock the screen. This allows all my processes to start up and also allows me to VNC into the main console session via the Remote Desktop (vino) server. There are a few ways to set this up:
First, set up auto-login:
System > Administration > Login Window > Security tab
Check ‘Enable Automatic Login’ and choose your username. Click ‘Close’.
As for locking the screen after login, you can try adding the following command to System > Preferences > Sessions:
gnome-screensaver-command --lock
or
xdg-screensaver lock
I found that these commands worked for me when logging in and out of the box. However, I found that they did not work for me when I rebooted my workstation. If any of the other commands listed Sessions utilize gnome-keyring, such as ‘mail-notification’, the gnome-keyring password prompt seems to keep the screen from being locked. To work around this, I created a script called ‘lockstartup’. This script does the following:
1. Pauses for 10 seconds (a step I found necessary in order to get the script to work correctly)
2. Locks the screen
3. Pauses for another 10 seconds (again, a step I found necessary)
4. Starts any applications that use gnome-keyring
Here is what my script looks like:
#!/bin/sh
sleep 10
xdg-screensaver lock
sleep 10
mail-notification
After you save the script, make it executable:
$ chmod +x lockstartup
And then add it to System > Preferences > Sessions. If you reboot, you should be automatically logged in and then see the screen lock. Once you unlock the screen you should be presented with the gnome-keyring password prompt.
I am using this on Ubuntu 8.10 Intrepid Ibex. I have not tested this on any other releases.
For me Linux is great because the development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified.m10m
ReplyDelete