Wednesday, 28 September 2011

How-to: Linux XKill Terminates Programs

Xkill is an installed component of the X11 Utilities package present in many Linux distributions including Ubuntu and Linux Mint.

It's a tool for terminating badly behaved X clients or unresponsive programs which just stop. Sometimes the only thing to do is kill them!

You can run it in several ways.


1. From a Terminal session, on the command line use
xkill

which returns the message
Select the window whose client you wish to kill with button 1....

Your mouse pointer will turn into an X. Click on an application window with the X for Xkill to, well, kill it.

2. Create a keyboard shortcut key to launch xkill

Go to Gnome Menu > Applications > Preferences > Keyboard Shortcuts.

Click the Add button to create a custom shortcut.

Enter xkill as both the Name and Command line, then click the Apply button.

Your xkill shortcut will show up in the list as a Disabled shortcut. Click once on this Disabled row in the Keyboard Shortcuts window; the Disabled status will change to New shortcut.

Press a new short-key combination, for example, Ctrl+Shift+X, which willthen be activated as the keyboard shortcut to invoke xkill.

Click the Close button.

If you activate xkill accidentally, you can right-click to cancel it; the mouse pointer should change from an X back to your standard shape.


3. If you are using Gnome Panel, right-click on a blank area of the panel, select Add to Panel.

Search for 'Force Close' or 'Force Quit' (the xkill equivalent name in the Graphical interface) to add the icon.

A borderless window pops up wih the following message:

Click on a Windows to force the application to quit. To cancel press the escape key <ESC>


Xkill is ready to use. Press the key combination to turn the cursor to an X-sign, drop the X-sign onto the application to close and left-click once. It will terminate the unresponsive program. Note you will lose any unsaved data in that application.

To cancel a force-quit, right-click. RC