Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-09-22 09:31:34

giancarlogiesa
Member
Registered: 2012-09-22
Posts: 4

[solved] how get the PID of the windows on top?

Hello,

how can i get the PID or the ID Window from the terminal of the windows that is on top or that have the focus?

sincerely, Giancarlo

Last edited by giancarlogiesa (2012-09-22 13:16:04)

Offline

#2 2012-09-22 11:29:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,990

Re: [solved] how get the PID of the windows on top?

You can use the xdotool utility to get the pid of the active window like this:

xdotool getactivewindow getwindowpid

or the currently focused window like this:

xdotool getwindowfocus getwindowpid

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2012-09-22 13:15:48

giancarlogiesa
Member
Registered: 2012-09-22
Posts: 4

Re: [solved] how get the PID of the windows on top?

thank you very much!

Offline

Board footer

Powered by FluxBB