[comp.windows.x] Running window managers & other clients in subwindows

epstein@trwacs.UUCP (Jeremy Epstein) (02/27/91)

We're trying to create a "virtual root" window which can then be
managed by a window manager, and run applications inside the
virtual root.  The goals are (1) to have application windows forced
to stay inside the virtual root, and (2) to have the applications
iconified (automatically) when the virtual root is iconified.

I know there was some discussion of this a few months ago...can
anyone suggest a resolution?  I'd like to avoid rewriting clients
(especially window managers) to do this.  I suppose that I could
create the virtual root, and then pass the window ID to the window
manager (and other clients) as a command line argument, but that
requires changing too much stuff.

As a further point, when override-redirect windows get recreated,
I'd like them to be clipped by the virtual root, not the "real" root.
Can I prevent the client from referencing the "real" root?  I guess
what I really want is a UNIX chroot() call in X!

Thanks for any help!
--Jeremy
-- 
Jeremy Epstein			UUCP: uunet!trwacs!epstein
Trusted X Research Group	Internet: epstein@trwacs.fp.trw.com
TRW Systems Division		Voice: +1 703/876-8776
Fairfax Virginia

toml@marvin.Solbourne.COM (Tom LaStrange) (02/27/91)

} We're trying to create a "virtual root" window which can then be
} managed by a window manager, and run applications inside the
} virtual root.  The goals are (1) to have application windows forced
} to stay inside the virtual root, and (2) to have the applications
} iconified (automatically) when the virtual root is iconified.
} 
} I know there was some discussion of this a few months ago...can
} anyone suggest a resolution?  I'd like to avoid rewriting clients
} (especially window managers) to do this.  I suppose that I could
} create the virtual root, and then pass the window ID to the window
} manager (and other clients) as a command line argument, but that
} requires changing too much stuff.
} 
} As a further point, when override-redirect windows get recreated,
} I'd like them to be clipped by the virtual root, not the "real" root.
} Can I prevent the client from referencing the "real" root?  I guess
} what I really want is a UNIX chroot() call in X!

About the only way you're going to be able to do it transparently is to
write a server extension.  Then you will be able to specify your virtual
root via the -display option.  Work was done on this at HP during the X11R3
time frame but was abandoned because of some problems that I don't know the
details of.

--
Tom LaStrange        toml@Solbourne.COM

mouse@lightning.mcrcim.mcgill.EDU (02/28/91)

> We're trying to create a "virtual root" window which can then be
> managed by a window manager, and run applications inside the virtual
> root.  [...]

> As a further point, when override-redirect windows get recreated, I'd
> like them to be clipped by the virtual root, not the "real" root.
> Can I prevent the client from referencing the "real" root?

It seems to me that it should be possible to build a program which
fronts as an X server, but makes it look to clients as though the root
window isn't the "real" root, sort of a protocol filter.

The only thing that immediately comes to mind as a problem is the
potential for clients speaking directly to the real server to reparent
windows into or out of the pseudo-root's tree.  If one ignores this
issue, it seems doable.  Can anyone think of any other problems?

> I guess what I really want is a UNIX chroot() call in X!

:-)  If UNIX had notifications on file creation, destruction, and
renaming corresponding to X's on window creation, destruction, and
reparenting, chroot() would be harder!

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu