Using an X window as an X display (or screen?)
Author |
Message |
DtY
![](http://compsci.ca/v3/uploads/user_avatars/8576159234be48b7a8b0e8.png)
|
Posted: Tue Dec 29, 2009 7:53 pm Post subject: Using an X window as an X display (or screen?) |
|
|
I know the topic sounds weird, but stay with me,
I was reading about X, and it sounds like the whole display could be inside another window, as in, instead of normally creating windows inside of the root window, any new windows would be created inside a different window, a normal X window. Since it would look like a display, you could run a whole window manager, inside a window. You would be able to run any X windows manager, desktop environment even, on Windows (if you wanted to, for whatever reason).
Since X windows can have their parent changed whenever (I think), you could pull X windows in and out of this sub-window manager.
Admittedly, this would be pretty useless. So far, I've only come up with two possible uses for this;
(1) Put cygwin, X, and your favourite window manager on a thumb drive, and whenever you need to use a windows computer, you have the environment of your choice on with you. (This might be possible now, to use Cygwin/X to create a root window, I haven't used Cygwin in a long time)
(2) Developing window managers, I have no idea how you would go about writing a window manager, without reopening all the files you're editing when you restart it after each change (Maybe do it on a different computer?).
What I was thinking (unless there's some way to just do this in X), would be to write a program that:
- Connect to the X server, on the appropriate display (from $DISPLAY), and create a new window.
- Listens for incoming connections on one of the X ports, the window manager would be started by export DISPLAY=localhost:10; windowmanager, or some other display number.
- Create a new connection to the X server for each client that connects
- Bounce everything between the X server and the clients, but replace all references to the root window going to the X server with the new window ID, and replace all references to the new window with the root window ID (So that the window manager thinks that these windows are being created inside the root window and will put their frame on them)
If I wrote a program like that, would it do what I expect? Is there already a way to do what I'm trying? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
Posted: Wed Dec 30, 2009 3:53 am Post subject: RE:Using an X window as an X display (or screen?) |
|
|
I don't know that much about X besides compling it and setting it up for noraml use. Tho it sounds like somthing X could already do.
I know it is possible to run virtual x sessions, basically a x session for each terminal (just startx -- :1 for a new session in the next display (:0 is the defult first display)). Thats not quite an x session in a window tho. It is also possible to run a different x session on each display (multiple monitors).
Some googling found Xephyr, http://www.freedesktop.org/wiki/Software/Xephyr , which might be of some help. It sounds alot like what you want to do.
Also a howto: http://ubuntuforums.org/showthread.php?t=620003 |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
![](images/spacer.gif) |
DtY
![](http://compsci.ca/v3/uploads/user_avatars/8576159234be48b7a8b0e8.png)
|
Posted: Wed Dec 30, 2009 12:23 pm Post subject: RE:Using an X window as an X display (or screen?) |
|
|
That looks like what I want, thanks, that's pretty cool |
|
|
|
|
![](images/spacer.gif) |
|
|