I am interested in finding a window information from command line. The xprop command gives good results, however it requires that I either know the window id or select something using the mouse.

What I know is the pid that opened the window, and I know the window title (at least a regex pattern that could match).

So how can I either list all window ids or to find out which window was opened by a specific process?

1 Answer 1


You can use wmctrl to list the windows.

wmctrl -l

See man wmctrl to find what else it can do.

  • It comes in an extra package but does exactly what I need. Thank you. :-) May 24 at 7:30
  • You are welcome and good luck with wmctrl :-)
    – sudodus
    May 24 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.