WINDOWPATH environment variable?
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Sun Dec 4 18:34:21 PST 2005
On Mon, 5 Dec 2005 02:32:19 +0100 Samuel Thibault
<samuel.thibault at ens-lyon.org> babbled:
> We are building a framework for braille accessibility and have an issue
> about knowing where applications run.
> For instance, say I have a running :0 X server on VT7 of my linux box.
> I also have a :1 Xnest server running in some window 31457308 of the :0
> X server. Some xterm is running in some window 2097171 of the :1 Xnest
> server. And some applications are running in the xterm (possibly through
> We'd need these applications to be able to determine where they live
> logically, i.e. here to know the `path' 7 31457308 2097171. The very
> last part (2097171) can be obtained through the WINDOWID environment
> variable that gets set by all xterms I know. But the leading part can't
> be known.
> What we propose is to define at X session startup a WINDOWPATH
> environment variable (whatever the name, we can discuss about it)
> which would here contain "7" at :0 X server startup. Applications
> running in the session would inherit it, including the :1 Xnest server
> startup script, which would just append the window ID that Xnest got,
> and hence redefine WINDOWPATH to "7:31457308". Applications running
> in the :1 Xnest session would then inherit it, including xterms and
> text applications running in it. Applications (even through ssh
> thanks to appropriate environment propagation) would then be able, by
> concatenating WINDOWPATH and WINDOWID, to know precisely where it lives.
> What do people think about this?
in the case of xnest this is not feasible. basically apps within the xnest
should have no knowledge of the world OUTSIDE the xnest xserver root. secondly
you will have ID conflicts. it is possible the window id's of the xnest server
could be the same as the parent - it IS possible. xnest happens not to do that,
BUT it is possible to create a nested xserver that does have the samme root
window id as the parent xserver. this is valid. the nested xserver is meant to
live in isolation to its environment it runs in and whatever is inside should
have no knowledge of the world outside of it.
now given that, i suspect you are trying to attack a problem the wrong way. why
do you need such a path as an environment variable? what are you trying to do,
why do you need such a window id chain?
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
Tokyo, Japan (東京 日本)
More information about the xorg