LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-04-2013, 08:57 AM   #1
ulkoma
Member
 
Registered: Feb 2012
Distribution: CentOS
Posts: 69

Rep: Reputation: Disabled
In run level 5 who gets loaded first, the shell/bash or the GUI?


How does the booting process work after init sets the run level ?


Regards
 
Old 11-04-2013, 09:30 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Depending on the system, it can be random. I believe they are both started with the same loop in the code, so startup of each is only microseconds apart. Whichever is listed first would be the first one started.. but with the system scheduling overhead, it would become nearly random as to which one actually gets any work done.

Because the shell/bash has much much lower overhead, it will always be ready first.

The GUI login requires the X server to be started. agetty doesn't require anything...
 
Old 11-04-2013, 09:47 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,104

Rep: Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515
Quote:
Originally Posted by jpollard View Post
Depending on the system, it can be random. I believe they are both started with the same loop in the code, so startup of each is only microseconds apart. Whichever is listed first would be the first one started.. but with the system scheduling overhead, it would become nearly random as to which one actually gets any work done.

Because the shell/bash has much much lower overhead, it will always be ready first.

The GUI login requires the X server to be started. agetty doesn't require anything...
All comes down to the rcx.d scripts and what order they are in. The Sxxx scripts start things in order from 0 to 99 and the Kxxx scripts kill things from 0 to 99.
 
2 members found this post helpful.
Old 11-04-2013, 02:10 PM   #5
ulkoma
Member
 
Registered: Feb 2012
Distribution: CentOS
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
All comes down to the rcx.d scripts and what order they are in. The Sxxx scripts start things in order from 0 to 99 and the Kxxx scripts kill things from 0 to 99.
Thank you very much, you've just taught how to fish
 
  


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
simple opensuse gui to run shell scripts zimbot Programming 12 08-13-2012 12:12 PM
[SOLVED] PCLinux 2011 KDE recent updates broke the GUI desktop, so it boots to run level 3 now james2b Linux - General 3 11-14-2011 03:28 AM
in bash shell how to run shell script during startup rammohan04 Red Hat 2 07-31-2009 03:07 AM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 04:31 AM
Cannot run the KDE GUI from the BASH shell onaeem Mandriva 5 07-05-2004 07:51 AM


All times are GMT -5. The time now is 07:17 PM.

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