Enable Automatic Login in Ubuntu 9.10 Server

Your Ad Here

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 desktop and no GDM. Here#8217;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>#038;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#8217;s more work to be done. Open your user#8217;s .bashrc file:
nano ~/.bashrc

Add the following to the end of the file:
if [ $(tty) == "/dev/tty1" ]; then<br /> startx<br /> 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 tombuntu]
 

Comments (51)

RSS Collapse / Expand
The comment has been deleted

+
0
Why do you always have to write something like a program everytime you're making changes in Ubuntu. Wouldn't be easier if we'll just click buttons?
avatar

sam_wilkent

  • 23 December 2010, 00:23
+
0
I've tried this on Kubuntu and it also worked. Great!
avatar

jeffcavil

  • 08 March 2011, 14:20
+
0
Thanks — Just the info I was looking for… My search ends here…
avatar

stelaharth

  • 15 April 2011, 09:38
The comment has been deleted

The comment has been deleted

The comment has been deleted

+
0
The automatic login is so good to use. It just makes the process so much easier. We have this setup at work which everybody loves. The idea behind it is so good.
avatar

jameslee

  • 14 January 2011, 17:58
+
0
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which we all need, thanks for all the enthusiasm to offer such helpful information here.
avatar

micheal

  • 20 January 2011, 12:50
+
0
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenter here! It's always nice when you can not only be informed, but also entertained!
avatar

micheal

  • 20 January 2011, 12:51
+
0
I agree. It makes it faster and easier to login.
avatar

bestmedicare

+
0
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.
avatar

auvanew

  • 02 August 2011, 15:41
+
0
Personally I am so satisfied that I have found this information about Ubuntu server. I am very interested in programming and development so this info is very valuable for me. I will definitely use all your advices in my work. Thanks a lot for this essential publication.
avatar

harold44

  • 19 January 2011, 13:43
The comment has been deleted

The comment has been deleted

+
0
Thank you very much. If i found this earlier i wouldve saved 9 hours and 4 red bulls ;=}
avatar

sidkof

  • 04 February 2011, 11:11
+
0
Hi Do you guys have a twitter fan webpage? I looked for for one on facebook or myspace but couldn’t locate it, I would love to become a fan!
avatar

nickadam

  • 10 April 2011, 11:22
+
0
I found your blog on Google and read a couple of of your different posts. I simply added you to my Google News Reader. Keep up the great work. Look ahead to reading extra from you in the future.
avatar

micheal

  • 06 February 2011, 05:55
+
0
Your article is really great and I truly enjoyed reading it. I will be waiting for some more great articles like this from you in the coming days. Thanks a lot.
avatar

micheal

  • 07 February 2011, 15:37
The comment has been deleted

+
0
It's really good written and I fully agree with You on main issue. I must say that I really enjoyed reading all of Your posts. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
avatar

micheal

  • 25 February 2011, 10:54
+
0
The automatic login is really very perfect in using. It makes the process so easy and simple.
avatar

SandraKeil

  • 26 February 2011, 05:57
The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

+
0
I appreciate all of your information. I have found white noise helpful in my insomnia issues.
avatar

felixrecherd

  • 23 April 2011, 10:48
The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

+
0
Really A great article to read I must say that you are good as your work
avatar

nabihahayat

  • 30 April 2011, 09:47
+
0
I have just enabled auto login in Jaunty — and the GUI has disapperared — just a black screen with a pointer. Lucky I have a laptop as well.
avatar

felixrecherd

  • 04 May 2011, 08:06
+
0
Since I' ve chanded to ubuntu, my life is a nighmare… few information and no friend that uses it...sio post like this are so udeful for me!
avatar

amorpeso

  • 06 May 2011, 09:46
+
0
I am so satisfied that I have found this information about Ubuntu server. I completely agree with you. I really like this article. It contains a lot of useful information. I can set up my new idea from this post. It gives in depth information. I am very interested in programming and development so this info is very valuable for me.
avatar

realestategroup

  • 10 May 2011, 11:57
+
0
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
avatar

ailhibbard

  • 14 May 2011, 22:25
+
0
Whats up, This is a wonderful summation, I located your blog checking google for any similar subject and observed this. I couldnt find as well significantly other tips and information on this posting, so it was fantastic to discover this one. I will almost certainly be returning to think about a number of other articles which you have written another time.
avatar

wdoutjah

  • 04 June 2011, 16:59
+
0
Great blog article about this topic, I have been lately in your blog once or twice now. I just wanted to say hi and show my

thanks for the information provided.
Last edited by simplewhite 21 june 2011, 18:10.
avatar

emmaheyden

  • 20 June 2011, 09:02
The comment has been deleted

+
0
It is a very good site.Here is something tells about any software.
avatar

johnwhite

  • 23 July 2011, 14:31
+
0
Good luck getting people behind it. Although some very exciting, you’re going to have to do more than raise a couple of things may be different from what we’ve heard already. What are you trying to say here? What do you think?energy billing software.It seems you can not really get behind a single thought. Anyway, that’s just my opinion
avatar

septian354

  • 13 August 2011, 13:32
The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted

The comment has been deleted


Only Registered and authorized users may post comments