0

In manpage of xdotool

getwindowpid [window]

Output the PID owning a given window. This requires effort from the application owning a window and may not work for all windows. This uses _NET_WM_PID property of the window. See "EXTENDED WINDOW MANAGER HINTS" below for more information.

When a process is said to own a window, what does that mean? I have several guesses about it:

  • Is the process the one which has created the window?

  • A window is not a process, so ownership can't imply the parent-child relation between processes.

  • what is the relation between a window of a process and the controlling terminal of the same process ('s session)? Is a window of a process related to terminal related signals (SIGINT, SIGHUP, SIGQUIT)?

Thanks.

  • 3
    It doesn't mean anything; any X11 client can set the _NET_WM_PID property on any window to whatever it likes, eg. xprop -id $WINDOWID -f _NET_WM_PID 32c -set _NET_WM_PID 1 will not make your terminal window owned by init. Processes and/or X11 clients do not own windows. – mosvy Dec 5 '18 at 17:38
0

From mosvy's comment:

any X11 client can set the _NET_WM_PID property on any window to whatever it likes, eg. xprop -id $WINDOWID -f _NET_WM_PID 32c -set _NET_WM_PID 1 will not make your terminal window owned by init. Processes and/or X11 clients do not own windows

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.