Linux:Command to shut down X

arcenite

Lifer
Dec 9, 2001
10,660
7
81
Thanks :)

Update: Thanks for all of the information... It seems though when I do an ini 3, it goes to the console and starts some services and then just hangs there.... Any ideas?

Bill
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Ctrl+Alt+Backspace.

Or if you want to type in a command then type top, look for the xserver and the pid for it (i think the name varies per distro), hit q to get out of top, and type kill along with the process id of the xserver.
 

arcenite

Lifer
Dec 9, 2001
10,660
7
81
Thanks for your response. That doesn't seem to do exactly what I am trying to do... the instructions to install my video card drivers are...

....After you have downloaded NVIDIA-Linux-x86-1.0-4496-pkg1.run,
begin installation by exiting X, cd'ing into the directory containing
the downloaded file, and run:....

When I do what you instructed it just sends me back to the login screen....

Bill
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Oh ok, just try typing init 3 as a super user. That's probably the best way to go.

edit: grr :p
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: SleepWalkerX
Ctrl+Alt+Backspace.

Or if you want to type in a command then type top, look for the xserver and the pid for it (i think the name varies per distro), hit q to get out of top, and type kill along with the process id of the xserver.
Off topic now, but you can kill processes from within gnu top. OpenBSD top too it seems.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
How do you make it not come back? Ctrl+Alt+Backspace always makes it want to bring it back. Do you have to reinit Linux with init 3?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: xtknight
How do you make it not come back? Ctrl+Alt+Backspace always makes it want to bring it back. Do you have to reinit Linux with init 3?

You can do that, or kill the [xgk]dm. Kill the login manager, and you're set.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Originally posted by: n0cmonkey
Originally posted by: xtknight
How do you make it not come back? Ctrl+Alt+Backspace always makes it want to bring it back. Do you have to reinit Linux with init 3?

You can do that, or kill the [xgk]dm. Kill the login manager, and you're set.

So I take it the xdm just listens for X to die and when it does it just brings it back? Killing the 'X' process does the exact same thing as Ctrl+Alt+Backspace? Are there any other things to help 'release' the system from a freeze? I find a lot of my 3D games freeze and ctrl+alt+backspace or ctrl+alt+f1 doesn't do anything. I'm forced to reset the PC. (I wish I knew why they were freezing in the first place.)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: xtknight
Originally posted by: n0cmonkey
Originally posted by: xtknight
How do you make it not come back? Ctrl+Alt+Backspace always makes it want to bring it back. Do you have to reinit Linux with init 3?

You can do that, or kill the [xgk]dm. Kill the login manager, and you're set.

So I take it the xdm just listens for X to die and when it does it just brings it back? Killing the 'X' process does the exact same thing as Ctrl+Alt+Backspace? Are there any other things to help 'release' the system from a freeze? I find a lot of my 3D games freeze and ctrl+alt+backspace or ctrl+alt+f1 doesn't do anything. I'm forced to reset the PC. (I wish I knew why they were freezing in the first place.)

It depends on whether you can SSH into the system or not.

Can you get to a virtual terminal (ctrl alt F2)?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You can do that, or kill the [xgk]dm. Kill the login manager, and you're set.

Not necessarily, on most Linux distributions the display manager is started by init and will be restarted if you kill it. On Debian and Ubuntu it's simple to stop the DM by typing '/etc/init[xgk]dm stop' but on most other distributions you have to resort to switching runlevels (with telinit 3) to stop the DM from being restarted.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Originally posted by: n0cmonkey
It depends on whether you can SSH into the system or not.

Can you get to a virtual terminal (ctrl alt F2)?

SSH would be alive? It's odd that I'd be able to access my PC anywhere except at my PC. :p There needs to be some way to kill a process that's using 100% of your CPU and hanging up other processes. Kinda hard since the kernel would never get its slice of time that way, but it should never get to that predicament in the first place...

No I can't get to ctrl alt f1 so I assume not f2 either.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
There needs to be some way to kill a process that's using 100% of your CPU and hanging up other processes. Kinda hard since the kernel would never get its slice of time that way, but it should never get to that predicament in the first place..

The kernel always gets a slice of time, every timer interrupt. If nothing else asks to run the kernel puts the same process back on the CPU, so it looks like that one process is eating all of the CPU even though it is sharing CPU time with the kernel.
 

arcenite

Lifer
Dec 9, 2001
10,660
7
81
Thanks for all of the information... It seems though when I do an ini 3, it goes to the console and starts some services and then just hangs there.... Any ideas?