LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-19-2002, 04:00 PM   #1
Alexop
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, 04:23 PM   #2
heiseltc
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, 04:50 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Also most desktop or window managers have a logout function.. that will get you out of X.
 
Old 08-19-2002, 04:59 PM   #4
lynch
Member
 
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.
lynch

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

Original Poster
Rep: Reputation: 15
thanks everybody for responce
 
  


Reply



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

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

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