View Single Post

   
  #2 (permalink)  
Old 02-16-2008, 06:24 AM
Bas Keur
 
Posts: n/a
Default Re: Remotely run a program, display on console

> I'd like to log into a box remotely and run a curses-based program, but
> have the output display on the console for a colleague to view. Is this
> possible?


*I might be very wrong here*
But my though is that unless you make use of the X server
for exporting Xterm consoles your stuck with screen as
far as the managing go's on terminals (Do note the *)

I'm running multiple serial console related tools in the background
for multiple users using screen,

Have a try
# ftp "ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/\
packages/`uname -m`/screen*static.tgz"
# pkg_add -v screen-*

---user a
$ screen top
press [ctrl] + [a] + [d]
[session detached]
---user b
$ screen -r

> If so, can it be sent to the console screen without anyone being logged
> in?


Try looking at the screen man page, it has loads of options.
It might have some sort of /etc/ttys redirect, mix that with ssh
and your problem should be solved.

> For example, I'd like to launch top, have it appear on the screen, and
> continually update normally, without scrolling.


If all fails dump top output to a file.

$ while true;do top -b -o cpu && sleep 1 && clear;done >> /tmp/output

Hope this helps.


--
] Bas Keur
] `Energizer Bunny arrested, charged with battery`


Reply With Quote