On Sunday 30 March 2003 15:06, Ted Harding wrote: <SNIP>
On the other hand, if "program1" expects its input to come from the window/terminal _within_ which it is running, then you will need (under X windows) to explicitly open a separate window to run it in. Example:
xterm -e vim myfile &
will open a new X window, enclosing an "xterm", within which vim will start up, opening the file "myfile" for editing, and (because of the "&") all this will again be detached from the originating command line. In this case it is strictly speaking the program "xterm" which gets detached; the program "vim" hangs off "xterm", so to speak, and the "xterm" will stay alive so long as the program which depends on it is still in use. The moment you finish with your "vim" session, closing the document you are editing and quitting "vim", the "xterm" will also close down.
Can this be achieved on a text console, I imagine causing a program to start on a different console? So that I can issue a command on console 1 and have the program start in console 2. Would I have to already be logged in to this console? Yes and no. Assume that tty2 is the command console 2. vim myfile < /dev/tty2 > /dev/tty2 2>&1 & If you are not logged on, you will get a permission denied error. If you are logged on, it will happily start vim, but it will interleave
On Sun, 30 Mar 2003 15:29:09 +0100
Dylan