Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!newstop!sun!frisbee!jcb From: jcb@frisbee.Sun.COM (Jim Becker) Newsgroups: comp.windows.x Subject: Re^2: Shell in an X-Window Message-ID: <119408@sun.Eng.Sun.COM> Date: 3 Aug 89 20:03:51 GMT References: <18116@paris.ics.uci.edu> <8908021850.AA05206@expo.lcs.mit.edu> Sender: news@sun.Eng.Sun.COM Lines: 51 kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) writes: ->> Is it possible to open a shell in an X-window. ->I know of not way to do this with or without a toolkit. There is nothing ->on the Core distribution that supports this type of operation, short ->of ripping apart xterm to get the code that you would need. I believe that it would be very simple to add a little functionality to xterm that would allow this. If there was a parameter added that allowed the XID of the desired (existent) window to be used instead of a freshly created one then xterm could run within the confines of another's window. Since windows are a sharable resource in the X world this would work correctly. The programmatic invokation of xterm as a child process would then define the working window for xterm to do it's stuff in. For example, "xterm -window 0x9000f2" would start up xterm and use the pre-created window with XID 0x9000f2 rather than creating a fresh window for use. Since it will still ask for the same events, and get them with a different display connection, it will function as if it were a child of the root or window manager. (There may be some problems with window properties or other nits, but I would assume that they could be hashed out.) In general this is an underlying strength of The X Window System that hasn't gotten any press. If there is a defined method used to tell a single window application the window in which to live, thus logically reparenting it, one automatically ends up with something similiar to a multi-threaded environment. Each process could take care or it's own business in it's window, getting and processing events of interest, whilst adding to the whole of the UI appearance and behaviour. Seems like the buzz words `Object-Oriented' and `Multi-Threaded' could actually take on some real-life application with the use of this concept. :-) If this approach was taken, creating entire building blocks and combining them into more complex wholes, the X community could offer lots of software in a short period of time. [I know that this is an existing goal, and rws was just kidding about widgets being created to sell more memory.. :^) -- at least I think.. ] -> Chris D. Peterson -> MIT X Consortium -Jim Becker jcb@sun.com