Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-19-2002, 05:00 PM   #1
LQ Newbie
Registered: Aug 2002
Posts: 25

Rep: Reputation: 15
how to Shutdown Xwindows

how to shutdown the Xwindows from runlevel 3 and 5 without shutting down system
something like endx like the oposite of startx???
Old 08-19-2002, 05:23 PM   #2
LQ Newbie
Registered: Aug 2002
Location: CA
Distribution: RH, MDK, YellowDog
Posts: 11

Rep: Reputation: 0
There are several ways I can think of:

1. Ctrl+Alt+Backspace

2. "ps -ef | grep X" - look for the pid (the first number) of the line ending with something like "/etc/X11/X ...", then type in "kill <pid>" where <pid> is the pid. (eg. "kill 1203")

3. "killall /etc/X11/X" (this may be different according to where the X executable is.

Also, if it keeps restarting, then comment out the line (usually the last one) in /etc/inittab that starts with "x" . Mine says:

x:5:respawn:/etc/X11/prefdm -nodaem

The "respawn" is telling it to start again after it's killed. You'd want to precede it with a pound sign (#).
Old 08-19-2002, 05:50 PM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
Also most desktop or window managers have a logout function.. that will get you out of X.
Old 08-19-2002, 05:59 PM   #4
Registered: Nov 2000
Location: A Mid-Atlantic state
Distribution: SuSE 8.1,Knoppix 3.2,Mandrake 9.1
Posts: 388

Rep: Reputation: 30
Just do an su and type in your root password.Then type:
init 3
You will then have to log in again.
Almost forgot!:
the above will kill x and put you in run level 3 ie,the command line.You can get x back by typing startx,but you're better off changing to root and rebooting from the command line:
shutdown -r now
If you do it this way it will boot back into x and you can log out graphically.

Last edited by lynch; 08-20-2002 at 05:36 AM.
Old 08-20-2002, 02:05 PM   #5
LQ Newbie
Registered: Aug 2002
Posts: 25

Original Poster
Rep: Reputation: 15
thanks everybody for responce


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
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 08:38 AM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 07:21 PM
unable to 'shutdown' from x... need to shutdown using 'halt' guitarnix Linux - Newbie 5 11-24-2003 02:00 AM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 11:44 AM
shutdown hang during eth0 shutdown kurtisw Linux - Networking 5 10-30-2003 03:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 AM.

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