LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-22-2006, 04:06 AM   #1
windycity_linux
Member
 
Registered: Mar 2006
Distribution: rhel 5
Posts: 74

Rep: Reputation: 15
Question INIT issues, failure to change runlevel


I am using Redhat ES and i have selected 3 as my default runlevl (it boots in text mode). But if i start GUI by typing "startx" in the comand prompt how do i go back to text mode (aka run level 3). I have typed init 3 or telinit 3 at the terminal as a root but nothing happens (no error message nothing it just returns #). Right now the only way i can go back to text mode is by killing X (by pressing Ctrl+Alt+Backspace) but is there any other way? any help will be appreciated.

here is the copy of the /etc/inittab file:

id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf:owerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345owerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
 
Old 11-22-2006, 09:29 AM   #2
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
When you start up X you are still in runlevel 3. This is why "init 3" has no effect - you are already at runlevel 3 so nothing changes.

If the only way you have to exit X is to to ctrl-alt-backspace then it sounds like you are running a basic window manager, like TWM, yes? If you are running something proper like KDE then there ought to be an 'exit' option in the graphical environment somewhere.

If this does not work then it means you have your .xinitrc file set up incorrectly. This script resides in your home directory. Please post it here for us if you still have trouble.
 
Old 11-22-2006, 09:35 AM   #3
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
To clarify, what I mean is that "startx" does not change your runlevel to 5. That is clearly what you are thinking, but actually that is not the case.

Runlevel 3, as typically set up, does not mean "no X window system," it just means that the system boots into a console. Runlevel 5 by contrast means that the system boots straight into an X-based graphical login.
 
Old 11-23-2006, 02:48 AM   #4
windycity_linux
Member
 
Registered: Mar 2006
Distribution: rhel 5
Posts: 74

Original Poster
Rep: Reputation: 15
thanx for ur reply. I am using GNOME and after seeing ur reply i tried log out from the desktop/gui and it does put me back to text mode.

thanx again
 
  


Reply

Tags
init, level, runlevel



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
debian runlevel init 3 joyman555 Linux - Software 10 04-15-2008 01:47 AM
INIT: No more process left in this runlevel robinp Linux - Software 9 03-15-2006 11:53 PM
init runlevel problem phatbastard Slackware 4 12-08-2005 12:51 AM
Init and runlevel commands CliffLandin Linux - General 2 11-22-2003 05:01 PM
init runlevel adam171771 Linux - General 3 07-05-2001 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 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
Open Source Consulting | Domain Registration