Ask Your Question

Revision history [back]

Yes, you can use the xwininfo command to find the window ID associated with a particular process ID.

  1. First, find the process ID of the application with the ps command:
ps -ef | grep <process_name>
  1. Once you have the process ID, run the xwininfo command:
xwininfo -root -tree | grep "<pid>"

Replace with the process ID you obtained in step 1.

The xwininfo command will display information about all visible windows on the screen. The grep filter will narrow the output to display only the window IDs associated with the specified process ID.