Kill a Frozen or Crashed UNIX / Linux X Desktop

Here is a quick tip to kill a crashed Linux / UNIX X desktop system. Many new user do not know this simple tip and end up hitting computer reboot button. Press CTRL + ALT + Backspace to kill GUI and get back to login screen. There are more ways to kill a crashed desktop without restarting your computer.

If CTRL + ALT + Backspace refused to work, try to login to console by pressing CTRL +ALT + F1. To kill GDM (Gnome Desktop) manger, enter:
killall gdm
You can also run the following:
/etc/init.d/gdm stop
To start GDM again, enter:
/etc/init.d/gdm start
To kill KDM (KDE Desktop), enter:
killall kdm
OR
/etc/init.d/kdm stop
To start KDM again, enter:
/etc/init.d/kdm start
This is useful for killing desktop session. You can always kill indidual process such as a web server or firefox using kill / killall command line option. Under X windows you can use xkill command kill a client by its X resource and not by process ID.

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 10 comments… read them below or add one }

1 chika.tambun 11.24.08 at 3:00 am

whew… after i read this thread… i did it in short time… bummmphhhhhh… login screen with people smiling appear….

fortunately, i’ve done burning dvd-disc… oh god really2 love me.

viva ubuntu,

chika.tambun

nb: vivek wht abt my question abt make dvd slideshow from photoes i have… c’mon i’ve tried mandvd, manslide…. but none of them works well

2 vivek 11.24.08 at 4:27 am

Chika,

I never tried creating slideshow from photoes; so really can’t help you out!

3 mhymn 11.24.08 at 9:08 am

‘killall -9′ would be a better choice imo, and particularly ‘killall -9 X’ that will reset the DM too.
i’d also recommend ‘Ctrl + Alt + Esc’ to end the not responding program or window.

4 DeBaan 11.24.08 at 4:45 pm

I use gdm and gnome; periodically, my mouse pointer disappears, and I lose the ability to change focus of windows (alt-tab doesn’t work, but alt-f4 does). Ctrl-alt-f1 works, as does ctrl-alt- backspace, but killing X closes all my open programs.

Xeyes shows that the system is still tracking my mouse, but the pointer is gone, and clicking (right or left) does nothing. I have to ctrl-alt-backspace to kill X and have my pointer come back.

Unplugging my usb mouse and keyboard does not have any effect.

Any ideas?

I originally thought it was a pointer grabbing issue from all my vncviewer and rdesktop windows, but then I saw it happen when my mouse was only on the gnome-panel.

I use xscreensaver with a timeout, and it appears not to register input when I’m in a rdesktop or vncviewer windows, so X starts to go black for screensaver, then comes back. I wondered if that was related.

Out of ideas.

5 vivek 11.24.08 at 4:50 pm

@DeBaan,

Any specific error message in a log file – /var/log/Xorg.0.log?

6 luis 11.28.08 at 12:09 pm

and if the system is realy crashed and the above solution wont work… hold down Alt + SysRq and with those keys pressed, type reisub
and system will reboot ;)

7 georges 11.28.08 at 3:01 pm

thanks for the tip.
I tried it in Fedora/gnome and it works fine.

What I do is use ctrl/alt/F1
log in as root.
do some analysis or cleaning (top, ps -edf, kill, etc …)
then type ctrl/alt/f7
And I am back in gnome

8 Mike 11.30.08 at 12:19 am

A problem I’ve been having lately is not so much the GUI locking up, but the keyboard stops responding the mouse is OK. Is there a GUI only methods d for this, almost feel dirty asking for a GUI tip :)

9 chika.tambun 11.30.08 at 8:15 pm

@mike….

it’s easy … since there is no keyboard virtual like m$ on intrepid CMIIW… go to
ubuntu logos >> System >> Administration >> System monitor(go to processes tab >> choose bash or X process then kill them… LoL)

Whew… cool enough, ^^

br,

chika.tambun

10 Omar 01.12.09 at 7:13 pm

DeBaan, I am getting exactly the same thing you are getting, running Linux version 2.6.9-67.EL

So far nothing definitive came up in my google searches on this problem, though I saw a post about restarting mice which suggested doing Ctrl-Alt-F5 to switch to text mode login, then Ctrl-Alt-F7 to go back to the GUI. This doesn’t kill your windows, it just restarts whatever processes that bring up the graphics. I’m not too optimistic this will fix the problem, but it’s worth a try next time it happens…

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , ,

Previous post: GNU/GCC Compiler Techniques Used in Linux Kernel

Next post: Nvidia Launches: Affordable Personal Multi Teraflops Supercomputer