linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:38:13 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

BOOTING INTO GUI: VERSION 1.0


This is a mini-NHF that will show you how to have your Linux system boot into X right away, without you having to go through the command line login and then typing startx. Because this question is asked ever so often in the forums and chat lines, perhaps this will answer the questions once and for all. Then again maybe not...

ASSUMTPIONS
There are a couple of things I want to assume about you, the user. Here is a list of them. Please be sure you've met all the requirements before continuing. This will make life much easier for the both of us:

  • You have X running properly on your system.
  • You know how to use a text editor.

There, not too bad right? Check the appropriate HOW-TOs or NHFs for additional reference on the above if you do not meet the requirements.

XDM
xdm is a program that manages logins to the system via a graphical user interface (GUI). It does the exact same thing as when you login or telnet to a UNIX machine. You get asked for a login name, and then a password. It authenticates them both, and if they match, then you get into the system. The only difference is, xdm uses windows, and buttons instead of the traditional command line login interface. What are the benefits of having xdm boot up instead of the traditional command line interface? Well for one thing, it looks much more user friendly. For another, you get into X right away as soon as you log in.

ALTERNATIVES TO XDM
If you have actually seen xdm before you will have to agree that it is not very pretty. In fact to me, the command line login interface is much better. So are there alternatives? Yes there are. There are in fact two programs that offer a much better looking GUI login interface. They are gdm and kdm. Is there a price to pay? Well, both programs are free of charge. The catch is that they need to work with GNOME and KDE. That means you have to install one or the other to get them working. Installing either GNOME or KDE is beyond the scope of this NHF, so it will not be discussed. However, if you already have either GNOME or KDE installed, feel free to use GNOME's gdm or KDE's kdm in place of xdm. The only real difference is that gdm and kdm offer more features and look better.

RUNLEVELS
A runlevel is a number that tells Linux how to boot. This number can be found in your /etc/inittab file. Linux has in total 6 different runlevels. They are:

Number    Action
--------   ----------
0             Shutdown
1             Single User
2             Multiuser
3             Full Multiuser
4             X11?
5             X11?
6             Reboot

 

You may be wondering why runlevels 4 and 5 have a qustion mark beside them. The reason is that, depending upon your distribution, one of these could be the X runlevel. If you are using Slackware, then X is on runlevel 4 and runlevel 5 is unused. If you are using RedHat, then X is on runlevel 5 and runevel 4 is unused. If you are not sure what runlevel X should be using, a listing of what runlevel does what can be found in your /etc/inittab file. Just open it up on your text editor and scoll down. You should come across a chart similar to the one above.

Once you have the runlevel for X, you just need to make one modification to the /etc/inittab file. Look for the following line:

id:n:initdefault:

n is a number from 0 to 6. It will most likely be 3, and never 0 or 6. It is from here that Linux will check which runlevel to boot into. That means if you were to change n to 6, then the moment you booted into Linux, it would reboot, because runlevel 6 is reboot. Get it? So change n to the X runlevel. So if my X runlevel was 4, then this is what I would have:

id:4:initdefault:

Save the file when you have made the modifications.

TESTING THE GRAPHICAL LOGIN
>From here on, there is one of two things you can do. You can either reboot your system, and after Linux does all the usual checking, it will boot into X. The second thing you can do is to use the telinit command. This command takes one argument, and that is the runlevel for X. So once again, if my runlevel for X is 4, the command I run is:

telinit 4

Be sure you have saved all your work because this command will log you off and bring you to the GUI login screen. The difference here is that telinit will change your runlevel and not actually reboot the system. This is a very cool program. If you decide you do not want to use the X login interface, then you can return to the console by using the command telinit 3. Remember that runlevel 3 is multiuser. In fact, you could have just used the command telinit 4 to get the X login interface without having to modify any files at all. Why then did we not just run telinit in the first place to get into the X login interface? Well firstly, using telinit does not make any permanent changes. If you were at runlevel 3 and you switched to 4 via telinit, then the changes would disappear when you rebooted. Secondly, explaining how to modify the /etc/inittab helped to increase the length of this NHF, plus you learnt something about runlevels.

CONCLUSION
That pretty much covers it. If you were planning on using gdm or kdm instead of xdm you may have noticed that I left this section out. The reason is that the solution varies from distribution to distribution. If I can find the generic solution I will update this NHF. In the meantime, enjoy your new looking Linux system.

X_console shellscope@yahoo.com

[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif