[H-GEN] VNC for console apps??

ben.carlyle at invensys.com ben.carlyle at invensys.com
Fri May 16 02:12:11 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Trent WADDINGTON <s337240 at student.uq.edu.au>
Sent by: Majordomo <majordom at caliburn.humbug.org.au>
16/05/03 15:09
Please respond to general

 
        To:     <general at lists.humbug.org.au>
        cc: 
        Subject:        Re: [H-GEN] VNC for console apps??


On Fri, 16 May 2003, Russell Stuart wrote:

> Cool, I get it now :)  I think your two options are: get the user
> program to run in screen, then you can attach and detach it with a 
remote
> ssh/telnet connection.. or use ttysnoop to look at the tty and get the
> user to press whatever keys you want to press (or hack ttysnoop to do 
that
> also, but I don't like your chances).  I'm not aware of anything else, 
but
> hey, someone enlighten me.

from http://packages.debian.org/unstable/admin/ttysnoop.html:
"TTYSnoop allows you to snoop on login tty's through another tty-device or 
pseudo-tty. The snoop-tty becomes a 'clone' of the original tty, 
redirecting both input and output from/to it.".

ie, it works on a login tty like vnc does for a gui just as the author 
requested. You can both view and type into the terminal when you run 
ttysnoop after sshing into the appropriate machine.

If the remote user is running inside an X environment VNC can still be 
used and it sound like the original poster is already familiar with this 
concept. My personal recommendation would be to use ttysnoop over screen 
for the sake of simplicity and consistent user interaction, or VNC if the 
user is running in an xterm or some-such.

As I recall, the correct way to set up ttysnoop is to make getty run 
ttysnoops from the tty specifications /etc/inittab (use the -l option to 
getty). This should set you up so all consoles are cloned and can be 
attached to (with an appropriate /etc/snooptab, too). If you want telnet 
and other such programs to allow snooping also then you will have to give 
them appropriate options to run snoopttys instead of /etc/login, too.

/etc/snooptab should apparently look something like this:
* socket login /bin/login
(for all terminals allocate a dynamic tty to clone to, then run 
/bin/login)

Use snooptty <ttyname> to view the console as the user sees it.

Benjamin.



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list