Kill a Frozen or Crashed UNIX / Linux X Desktop

Posted on in Categories Gnome, Kde, Linux, Linux desktop, UNIX, X server last updated November 23, 2008

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.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

12 comment

  1. 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. ‘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.

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

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

  5. 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 🙂

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

  6. @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

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