Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JPvRiel/dfa9acb5c9af4cc2802c907549a8a86e to your computer and use it in GitHub Desktop.
Save JPvRiel/dfa9acb5c9af4cc2802c907549a8a86e to your computer and use it in GitHub Desktop.
Find out which process has created an X window

Overview

W window has a _NET_WM_PID property set by the applicaiton. To really validate if the application has set this correctly is more work (see reference).

Simple Example

Run command and click the window

$ xprop _NET_WM_PID
_NET_WM_PID(CARDINAL) = 11524

Get process info

$ ps -p 11524 -f
UID        PID  PPID  C STIME TTY          TIME CMD
a211278l 11524     1  1 11:10 tty2     00:00:06 /usr/bin/gnome-system-log

Reference

StackExchange - What process created this X11 window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment