UNIX Hints & Hacks

ContentsIndex

Chapter 7: Displays and Emulations

 

Previous ChapterNext Chapter

Sections in this Chapter:

   

7.1 Terminal Types

 

7.5 Testing ASCII Terminals

 

 

7.11 Control the Mouse with the Keyboard

7.2 Setting Terminal Types

 

7.6 Troubleshooting ASCII Terminals

 

7.9 Killing Resources with xkill

 

7.12 Display from a Remote X Server

7.3 Make Use of stty

 

7.7 Sharing STDIN/STDOUT on Two Terminals

 

7.10 Setting xterm Titlebars

 

7.13 ASCII Table in UNIX

7.4 Hotkeys

 

 

 

 

 

 

 

7.9 Killing Resources with xkill

7.9.1 Description

7.9.1 Description

There is a way to kill an actual resource, which is quite a bit different from killing a process.

Flavors: AT&T, BSD

Syntax:

xkill

The command xkill doesn't kill an entire X session but it does kill a client by the X resource that is attached to it.

% xkill

When xkill is executed it displays a unique cursor that is a prompt to the user to select a window to be killed. This is a great way to kill the windows that the regular kill command doesn't close after you kill their PID. Yes, if you kill the PID of a process that opens another window, it should close it. The reality is that sometimes it doesn't. Using xkill is one more way to clean up your X session without reinitializing X.

The types of windows that can be killed can be opened by applications or xterms. They are not specific to any one type of window. If a nonroot window is clicked on, the server closes its connection to the client that created the window. If you run the xcalendar program and click on a day to add data to, a new window appears. If xkill is executed and you click on the parent window or the window that relates to a specific calendar date, both windows will be killed, not simply the parent window or the child window.

Warning - A premature click of the button can kill an important window by mistake. Make sure that the window is in the foreground when it is killed.


Reason

The method of killing windows with xkill makes it easy to not have to worry about the process IDs that are associated with the window or the process that is controlling it.

Real World Experiences

There are occasions when you have a window that will not die from a remote X server displayed on your local workstation. Even if you can kill the process on the remote server, the window still doesn't disappear. The xkill is your last chance to get rid of the window. Keep in mind that, in certain situations, the window might die with the use of the xkill command but this doesn't mean that the process exits and dies as well. There is still a chance that the process will be left in a zombie state even after the window is gone. Whenever possible, always confirm the window's process ID both before and after the xkill is fully executed.

Other Resources

Man page:

xkill

UNIX Hints & Hacks

ContentsIndex

Chapter 7: Displays and Emulations

 

Previous ChapterNext Chapter

Sections in this Chapter:

   

7.1 Terminal Types

 

7.5 Testing ASCII Terminals

 

 

7.11 Control the Mouse with the Keyboard

7.2 Setting Terminal Types

 

7.6 Troubleshooting ASCII Terminals

 

7.9 Killing Resources with xkill

 

7.12 Display from a Remote X Server

7.3 Make Use of stty

 

7.7 Sharing STDIN/STDOUT on Two Terminals

 

7.10 Setting xterm Titlebars

 

7.13 ASCII Table in UNIX

7.4 Hotkeys

 

 

 

 

 

 

 

© Copyright Macmillan USA. All rights reserved.