Enable Ubuntu to automatically log on to the character Interface

Source: Internet
Author: User
Recently, I am studying the virtualization solution for the student data center. I chose the Ubuntu10.10Mini operating system. Everything is installed from the beginning, so I know what I have installed. Gui I just installed a simple Wmaker. However, there is a problem. at startup, the character interface always waits for the user to enter the user name and password. This problem has left me depressed for a long time! However, we finally solved the problem today through the following document. You do not need to enter the user name and password to log on to the graphic interface of the specified user.

Recently, I am studying the virtualization solution for the student data center. I chose the Ubuntu 10.10 Mini operating system. Everything is installed from the beginning, so I know what I have installed. Gui I just installed a simple Wmaker. However, there is a problem. at startup, the character interface always waits for the user to enter the user name and password. This problem has left me depressed for a long time! However, we finally solved the problem today through the following document. You do not need to enter the user name and password to log on to the graphic interface of the specified user. Isn't that cool! If you are interested, take a look at the following content. The reason why there is no translation is that I think E is inevitable. Haha!

Ubuntu makes it easy to enable automatic login if you're using a login manager such as TPD. I was recently setting up a minimal Ubuntu 9.10 system with an LXDE desktop and no TPD. 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 shoshould 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.