how to redirect the output of a terminal?
Hi there!
I have a linux box on which I'm gonna install a web server + ssh server. That computer is next to the one I have for common use - another linux box as well :P. What i would like to do is to put a screen dedicated to my server computer but no keyboard. I'll admin it by ssh from my other computer but seeing the result on the other screen. It will allow me, for example, to start a network protocol analyser or a sniffer and let it running to see what's going on while i'm working on something else with my other computer. The easy way is to add a keyboard to the server or... forget that idea and doing all remotely without screen and keyboard... but why do not put some challenge ;) Ok... maybe it's very easy and i'm just not good enough... I'm waiting for your suggestions! |
I think that what you want can be done if ...
1. You run ssh in the machine with no keyboard / monitor 2. You use ssh (client) in the second machine to access the first 3. You issuse the following connamd when logging into the keybordless computer (assuming the name of that machine is "nokeyboard"): <command> ssh -X your_login@nokeyboard </command> Now when you login into the machine you want to remote administer you can run GUI applications. Hope this helps. R |
I don't think that's what he wants. That would allow you to run gui applications on the machine without keyboard, with the gui being shown on your normal machine. He seems to want the output on the machine without keyboard.
The way I see it, there are two choices. If you need text-based output only, I'd try something like Code:
top > /dev/ttySomething If you want to use gui's, I suggest you investigate VNC Groetjes, Kees-Jan |
thx kees-jan!
it works and it's simple. but i have a another question... At first, i thought i had to redirect to /dev/stdout. now i know that /dev/tty_something correspond to the virtual consoles but what about /dev/stdout. i don't understand how /dev/stdout works. On my computer, it's a symbolic link to /proc/self/fd/1. What's that exactly? |
/proc/123 for example represents the process number 123.
/proc/self represents the process that is currently accessing /proc. Each /proc/xxx/ is a directory with various documented files (cmd is the command that started this process, exe is the actual binary...), and among those is fd: a sub-directory pointing at all file descriptors opened by the process. Given the fact that 0 is always standard input, 1 standard output, and 2 standard error, you see that /dev/stdout is a link to a link to the the standard output of the process currently accessing /dev/stdout. Logical. Yves. |
nice!
yep it's logical :cool: |
All times are GMT -5. The time now is 08:29 PM. |