startup program on tty line

W. Paul Zola paulz at sco.COM
Thu Mar 14 08:38:40 AEST 1991


In article <154 at wcsn.csms.com> 
ken at wcsn.csms.com (Kenneth D. Fox WCSN ops eng) writes:

}I have a question about setting up a TTY line so that 
}everytime the system is brought up a specific program is initiated 
}on that line. 
}
}I am running SCO's Xenix 2.3.2 on an Epson 386. 
[deleted]
}Kenneth D. Fox--Senior Operations Engineer 
}WCSN - An International Broadcast Station of 
}The Christian Science Monitor Syndicate, Inc.


The following article from the SCO Information Tools database should help 
with your problem.  I'm posting since I think this may be of general 
interest.

################## cut here ################ cut here ##################

How can I get an application to be automatically invoked by Xenix?

KEYWORDS: auto invoke application app boot autoboot login xenix

RELEASE:  SCO XENIX System V Operating System Generic 

PROBLEM: How can I get Xenix to automatically invoke my application
     without requiring a user to login with his logname or password?

SOLUTION: Edit the file /etc/gettydefs and either modify an existing        
     line or create new line to look like this:

     p # B9600 CS8 SANE ICANON TAB3 IXANY # B9600 CS8 SANE TAB3
         IXANY #\r\n@!login: # p # AUTO /etc/login

     The above line should be entered as one continuous line even though   
     it will wrap around.  The lowercase letter 'p' is just an example.
     If there is already a line in /etc/gettydefs that starts with a 'p',
     a different letter should be chosen.

     Edit the file /etc/ttys and modify the line that corresponds to the
     port the application will be run on to look lke this: 

                              1ptty03
  
     The second letter on this line, in this case the letter 'p', should 
     match the letter used in /etc/gettydefs.  The port tty03 would be 
     replaced by whatever port the application would be run on.

     Use the mkuser command to create a new user with the same name as the
     port the application will be run on.  Using the above example, the new
     user would have the name tty03.  It is important that no password
     be specified when the user is created.  

     Modify the new user's .profile or .login to make sure the environment
     is set up correctly and to invoke the application.  To do this, the
     following stty options should be added to the .profile if the user is
     using the Bourne shell and the .login if the user is using the C-shell:

                        stty sane ixon ixoff

     The following command should be added to the very end of the user's 
     .login or .profile to invoke the application automatically:

                        exec application_name arg ...

     "application_name" should be replaced by the actual name of the application
     that will be run on this port and should be followed by whatever arguments
     the application accepts.

     Doing the above steps will basically dedicate the port to running the 
     application.  There is no way to log out on this port.  If a user tries
     to quit the application, it will be automatically invoked again by Xenix.

SEE ALSO: Automatically Invoking Applications, DiSCOver Magazine, mar/apr 88 
	(pg18)

################## cut here ################ cut here ##################

I hope this helps you with your problem.

-
Paul Zola			Software Support Engineer 
				paulz at sco.COM 
Gotta tend the earth if you want a rose.  - Emily Saliers
    DISCLAIMER: I speak for myself, and not for SCO.



More information about the Comp.unix.xenix.sco mailing list