i/o redirection to a non-getty tty?

rwl at umree.UUCP rwl at umree.UUCP
Wed Jul 13 02:20:00 AEST 1988


INTRO
I would like to allow i/o redirction to some graphics terminals & other
devices for display purposes from some regular ascii terminals.
e.g. "graphics_program > /dev/ttyxx"

THE PROBLEM
If the getty is on, it often munches the input mistaking it for a login.
If the getty is turned off, nothing gets through.  (Note: I have been able to
output with the getty off with a setuid root program that explicitly opens the
device, but I would like just to use the normal csh i/o redirection: > & < .)
The present *kludge* (see below) requires manual intervention after each reboot.

THE PRESENT KLUDGEY SOLUTION (from a public domain cad package from ucb)
(I'm not complaining, its crude but effective...)
Login with user id "sleeper", which runs a simple C program which sleeps.
The guts of the C program are:
	chmod(ttyname(1),0666);
	while(1) sleep(200000);
Here's the line from the password file:
sleeper::199:199:Beautiful Dreamer,,,,0018:/usr/cad:/usr/cad/bin/sleeper
(There's also a .hushlogin file in the home dir.)


A BETTER SOLUTION
Does anyone know how to do this elegantly?  I'd even settle for crudely
if it was automated.

Please reply directly & I'll be happy to summarize replies back to the group.

advTHANKSance,
Wayne Little
rwl at umree.UUCP
rwl at UMRUNIXA.BITNET



More information about the Comp.unix.wizards mailing list