Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

does anyone know how to kill all Programs on a specific X display?

In example, I need to kill all Programs on Display :1. How is this possible?

share|improve this question

migrated from Aug 2 '10 at 16:02

This question came from our site for professional and enthusiast programmers.

In what programming language? – 0xA3 Jul 31 '10 at 18:32
Bash Script - would be nice if this could be solved with built in commands ;) – Anonymous Jul 31 '10 at 18:34

xlsclients lists all clients with windows on the screen, and xkill kills them.

Why do you need this?

share|improve this answer
Im trying to build a screenshot factory for and i want to optimize the screenshooting process – Anonymous Jul 31 '10 at 18:48
xkill -displayname :1 -all

quoth the manual:

This option indicates that all clients with top-level windows on the screen should be killed. Xkill will ask you to select the root window with each of the currently defined buttons to give you several chances to abort. Use of this option is highly discouraged.


This command does not provide any warranty that the application whose connection to the X server is closed will abort nicely, or even abort at all. All this command does is to close the connection to the X server. Many existing applications do indeed abort when their connection to the X server is closed, but some can choose to continue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.