Changing Login from Console to X at Startup

Q: Changing to Graphical Login

How do I change my login from the console to the graphical screen?

A. Edit /etc/inittab

If you find yourself logging into your system at the console, only to type the startx command to start the X Window System, changing your login from console to graphical will save you a step or two.

You must edit one file, /etc/inittab, by changing just one number in the runlevel section. When you're finished, log out and, the next time you log in, you'll have a graphical screen.

Open an Xterm window. If you're in 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. Within the first screen, you'll see a section of the file which looks like this:

# 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 console to a graphical login, you should change the number in the line id:3:initdefault: from a 3 to a 5.

WarningBe careful!
 

Change only the number of the runlevels from 3 to 5.

Your changed line should look like:

id:5:initdefault:
	      

When you're satisfied with your change, save and exit the file by using the Ctrl-X keys. You'll see a message telling you that the file has been modified, and asking you to confirm your change. Type Y for yes.

When the file is closed, exit from root by typing exit, and close the Xterm window by typing exit.

That's it. Your next login will be from the graphical screen.