LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2006, 08:24 AM   #1
coolguy_iiit
Member
 
Registered: Aug 2004
Posts: 51

Rep: Reputation: 15
Can gui start only in init 5?


Hi,
I am using FC4.I have a doubt whether GUI can start only in init 5? or it can start in init 3 also.Because in my comp i run the startx in init 3 and it works.What is the significance of runlevels?

With Regards,
CoolGuy
 
Old 07-31-2006, 08:39 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Runlevels are different states of your machine.
For instance, your machine boots up in a specific runlevel, shuts down in another one, etc.

ie runlevel 0 is for halt, 6 for reboot and 1 for "single user mode".

The other runlevels are not reserved, as far as I know, but are all used for different multi-user modes.

However, when the system enters/exits a runlevel, it executes certain scripts (typically in /etc/rc.d or something like that). These scripts are used, for instance, to automatically start services (like vsftd, httpd, etc) when you enter certain runlevels in a fixed order.
So, different runlevels mean different programs running in the background (different services).
This makes it possible to define, for instance, a multi-user mode where you don't have any networking, where certain devices or services are disabled, etc.

Typically, runlevel 3 is used for a non-graphical mode and 5 for a heavier, graphical mode.
But you can easily customize these multi-user runlevels to suit your needs, or define your own.

Of course, you can run any program (or executable), like startx, from whatever single or multi-user runlevel you are in, but the "environment" may be different in the sense that some services may not have been started automatically. Because of this, the program you are starting may fail or may not behave exactly as you want.

Check out "man init" for details on runlevels, "man chkconfig" for configuring services to start services in certain runlevels.

Use "telinit" to change runlevel.
 
Old 07-31-2006, 11:36 AM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
If you view your /etc/inittab it will give a short description of what each runlevel does. I am currently using debian on my laptop and runlevel 2 - 5 all start a windows system. As said above the differences in runlevel are the services started. So say you wanted a web server. You have two options, 1) just install the necessary components or 2) take a default install and just edit on of the run level's to only run the web server service.

That right their alone is what makes linux so great. The fact that you can edit your environment to your specifications.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable GUI boot on Init 5 rickylim Linux - Enterprise 4 05-30-2006 02:01 PM
To start init 2 at boot satimis Fedora 3 10-05-2004 04:02 AM
init to Start Oracle GAVollink Linux - Software 0 08-18-2003 03:41 PM
start services at init.d mikeshn Linux - General 1 12-24-2002 05:43 PM
INIT problem, won't start x bulliver Linux - General 7 11-06-2002 11:42 PM


All times are GMT -5. The time now is 08:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration