≡ Menu

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
/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.

Share this on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 12 comments… add one }
  • chika.tambun November 24, 2008, 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,


    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

  • nixCraft November 24, 2008, 4:27 am


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

  • mhymn November 24, 2008, 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.

  • DeBaan November 24, 2008, 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.

  • nixCraft November 24, 2008, 4:50 pm


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

  • luis November 28, 2008, 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 ;)

    • Alex July 8, 2011, 10:00 am

      For this to work you need kernel.sysrq = 1 in sysctl.conf. By default this option is set to 0 (at least on centos, fedora).

  • georges November 28, 2008, 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

  • Mike November 30, 2008, 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 :)

    • Alex July 8, 2011, 10:04 am

      I had the similar issue in KDE 3 on fedora 9. Experimentally I found out that keyboard started working again after right-clicking on a windows’ titlebar to bring up context menu with windows actions. Yes, that’s very strange but saved me tens of minutes, which otherwise would be spent on X restarts.

  • chika.tambun November 30, 2008, 8:15 pm


    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, ^^



  • Omar January 12, 2009, 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

   Tagged with: , , , , , , , , , ,