Advertise Here

Support our Sponsors

Monday, February 1, 2010

Enable Automatic Login in Ubuntu 9.10 Server

Ubuntu makes it easy to enable automatic login if youá��re using a login manager such as GDM. I was recently setting up a minimal Ubuntu 9.10 system with an LXDE desktopand no GDM. Hereá��s how I enabled automatic login.

Note: This was tested on Ubuntu 9.10. Previous versions of Ubuntu require different procedures because of changes to the way Ubuntu boots.
Open /etc/init/tty1.conf as root:
sudo nano /etc/init/tty1.conf
Change the last line of this file to (where USERNAME is the username of the user you want to log in):
exec /bin/login -f USERNAME < /dev/tty1 > /dev/tty1 2>&1
Reboot, and the user you chose should be logged in automatically after boot. If something goes wrong, you can switch to a different TTY with CTRL+ALT+F2 and log in normally.
If you want this user to be logged into a graphical environment instead of just a shell, thereá��s more work to be done. Open your userá��s .bashrc file:
nano ~/.bashrc
Add the following to the end of the file:
if [ $(tty) == "/dev/tty1" ]; then
startx
fi
This code will start X (the graphical environment) whenever the user logs in on TTY1. You can add more code after startx that will be executed if the user logs out of X.
[Via Link]

No comments:

Post a Comment

Get Thousands of Visitors for Your Website

autosurf

Get Free Dot Tk Domain

Earn Money by Just Shortening URL