Take the 2-minute tour ×  How to get pid from xid (X window
identifier). How to get list of xids for pid?  (Assuming all
applications run with DISPLAY=:0, without network transparency
being in use)  Expecing something like:    1. Dig in
/proc/$pid/fd/ to track connection to X server   2. Follow that
connection, dig in /proc/pidof X/fd   3. Dig inside X as it
should know how to map connections to it to windows.
share|improve this question In general: Not at all. The reason
is that the X-Window system is/supports inherently network
connection (even if you dont use it). The only viable way I
could think of, is your expected internal digging - which can be
different from x-server to x-server. –  flolo Apr 4 '11 at 20:04
X server is Xorg. I want solution than works in non-networked
case. Isn't it obvious that it is possible for any gived system?
–  Vi. Apr 4 '11 at 21:38 The "obvious" solution will involve
ugly plumbing and duct tape since this isn't the way X was
designed to work. –  Noufal Ibrahim Apr 5 '11 at 1