27Jan/105
Password protected auto login on Ubuntu : auto lock screen after login
If you have one single user on your Ubuntu box and want to allow auto login to speed up boot process and avoid typing your user name every time you boot, but feel concerned about security, this is for you.
In fact, if auto login is activated, everybody can turn on your box and use it. This is even more annoying when you have a laptop.
To prevent that, you can lock the screen as soon as gnome desktop gets started. This will lock your screen, but Ubuntu will load in background while you type in your pass, so there is no time loss.
Here we go :
- First activate auto login in Ubuntu :
Go in Ubuntu Menu > System > Administration > Login Window and select a user for auto login - Then add auto lock at Gnome start up :
press Alt + F2
type "gedit .profile"
paste following lines at the end of the file :if [ !"$AUTOLOGINDONE" ] then export AUTOLOGINDONE=true gnome-screensaver gnome-screensaver-command --lock gnome-screensaver-command --poke fi
- Save the file and restart your computer, the system will auto login and ask for password while finishing loading Gnome.
October 1st, 2010 - 22:45
This did not work for me in 10.04
October 6th, 2010 - 21:00
This worked great for me in Ubuntu 10.04.1! Thanks! I’ve been looking for something like this for a while now.
May 7th, 2011 - 21:35
Brilliant
June 6th, 2011 - 08:27
Unless you are running 11.?
My system went down and is staying down after I did this
June 21st, 2011 - 14:29
I am still on 10.10 (don’t like the new unity thing).
If it messes up your ubuntu, just boot on a rescue Ubuntu cd or usb stick and revert the file to its original state.
Will test it on 11.04 asap .