Going Linux

   for computer users who just want to use Linux to get things done

Kill An Unresponsive Program Gracefully

Updated: 20-Mar-2008

A "crashed" program is one that somehow fails and is no longer running. This note is about how to shut down the other kind of failed program. One that is "hung." This is the kind of program that is stalled, busy, hung-up, or otherwise still running... but not responding.

There are command line methods of doing this. They involve opening a terminal window, running the top command to determine the process number of the problematic program, then using the kill command to terminate the troublesome thing. Since we like to do things using the graphical method here, we'll give you two ways to do this without resorting to the terminal.

The first method is to use Kill button from within the system process monitor. If you are using KDE, the quickest way to get there is to use the key combination Ctrl+Esc. This produces KDE System Guard's Process Table, listing all of the visible and invisible programs that are running. If you are using Gnome, choose the System menu, then Administration and System Monitor. Choose the Processes tab.

The KDE Process Monitor

Find the application that is not responding, highlight it in the list and click the Kill button (KDE) or End Process button (Gnome). If the process requires Root priviledges to shut it down, you will need to either start the System Guard from the command line using su or sudo, use the command line method mentioned above, or use the XKill method described below.

The Gnome System Monitor

The second method is a little more risky, but is very effective. If you are using the KDE desktop, press the Ctrl+Alt+Esc key combination and you will start an application called XKill. (Gnome users will need to run the xkill command from a terminal window.) Your mouse cursor will change (depending on your chosen icon set) to a skull and cross-bones, or another symbol that indicates "danger." XKill is indeed dangerous, if not used wisely. After pressing the Ctrl+Alt+Esc keys, the very next thing you click with the mouse will immediately terminate. And we mean ANYTHING you click! Click a Firefox window, it closes. Click a Konqueror window, it closes. Click the desktop, IT CLOSES! That's right. If you start XKill and then click your wallpaper, X Windows shuts down. Like we said, be careful. If you press Ctrl+Alt+Esc, then you change your mind, simply press Esc to cancel XKill.

Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. https://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.