Changing Login from Console to X at Startup


Question: How do I change my login from the shell prompt to the graphical screen?

Instead of logging in to your system at the console and typing the startx command to start the X Window System, you can configure your system so that you can log in directly to X and bypass the shell prompt altogether.

To do this you must edit the /etc/inittab file by changing just one number in the runlevel section. When you are finished, reboot the computer. The next time you log in, you will have a graphical login prompt.

Open a shell prompt. If you're logged in to your user account, su to root by typing

su Password: yourrootpassword

Now, type pico /etc/inittab to edit the file with pico. The file /etc/inittab will open. On the first screen, you will see the runlevel section of the file, which looks like the following:

# Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have  networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:3:initdefault:

To change from a system prompt to a graphical login, you should change the number in the following line:

id:3:initdefault: from a 3 to a 5.
Warning

Change only the number of the default runlevel from 3 to 5.

Your changed line should look like the following:

id:5:initdefault:

When you are satisfied with your change, save and exit the file using the Ctrl-x keys. You will see a message telling you that the file has been modified, and asking you to confirm your change. Press y for yes.

Now, your next login after reboot will be from the graphical screen.




The Red Hat Documentation Team - Official Red Hat Linux User's Guide
The Red Hat Documentation Team - Official Red Hat Linux User's Guide
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net