Quote:
Originally Posted by spermwhale_warrior
thanks, that was very clear.
And, are wsconsole attached to file descriptor,
like exec 4 < /dev/something ? I want to be able to say : from this wsconsole, open that program, but send the errors in that one, and normal output in that one.
|
I may not properly understand the question, but I'm not aware of them being attached to standard file descriptors the way stdin (0), stdout (1) and stderr (2) are. But maybe you don't need that for what you want to do, anyway.
If you're working in a terminal, you can get the name of that terminal using the
tty(1) command, e.g.,
$ tty
/dev/ttyE2
Actually this is the device file that corresponds to the terminal you're working in (a text wsconsole).
Now, suppose you want to send the stdout of a program to a different terminal, say ttyE3. Then you can direct it there like this:
$ echo foo > /dev/ttyE3
and you should see "foo" displayed on the other terminal,
provided you have write permission on that terminal. You can check this from the permissions shown in
$ ls -l /dev/ttyE3
You may need to be logged in on ttyE3 to have the necessary permissions.
Similarly you could send stderr to another terminal, or take input from another terminal.
Does this help with what you want to do?
I also wanted to mention some man pages:
ttys(5)
wscons.conf(5)
ttyaction(5)
These are files in
/etc that are used to configure terminal things. The pages refer to other useful pages too.