xkill
Forcefully terminate a graphical program (X client)
TLDR
Display a cursor to kill a window when pressing the left mouse button (press any other mouse button to cancel)
Display a cursor to select a window to kill by pressing any mouse button
Kill a window with a specific ID (use xwininfo to get info about windows)
SYNOPSIS
xkill [-id resource] [-display displayname] [-all]
PARAMETERS
-id resource
Specifies the X resource ID of the client to kill. The resource ID can be obtained using tools like xwininfo or xprop.
-display displayname
Specifies the X server to connect to. If not specified, the value of the DISPLAY environment variable is used.
-all
Kills all clients connected to the X server. Use with extreme caution!
DESCRIPTION
The xkill command is a utility for forcibly terminating X Window System clients. Instead of gracefully asking a program to exit, xkill directly instructs the X server to close the connection to the specified client. This is achieved by allowing the user to select a window or interact with the client, or by specifying the client's X resource ID.
xkill is typically used when a client is unresponsive, frozen, or otherwise misbehaving. It's a last resort, as it doesn't allow the client to save its state or perform any cleanup. Using xkill is generally more disruptive than asking the program to quit normally. It should be used carefully to avoid data loss or other unintended consequences. When invoked, xkill changes the cursor to a special 'skull and crossbones' icon, indicating that it's waiting for the user to select a window to kill. Clicking on a window associated with the problematic client will terminate it. Alternatively, the user can cancel the operation.
CAVEATS
Using xkill -all can cause significant data loss and system instability. Avoid using it unless absolutely necessary. Killing essential system processes can crash the X server or the entire system.
SECURITY CONSIDERATIONS
While xkill can be useful, it's important to be aware of the security implications. Any user with access to the X server can potentially use xkill to terminate any client. In multi-user environments, it's crucial to properly configure X server access controls to prevent malicious use.
HISTORY
xkill has been a part of the X Window System since its early days. It provides a simple way to forcibly terminate misbehaving clients when more graceful methods fail. Its development has remained largely unchanged, reflecting its core functionality.