[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: App, !getty on /dev/tty1?

What I have done in the past is use scripts that run as part of the
system startup.  In the scripts you do an su to an account you want
to run the program.  It does not have to be a login account.  The
scripts do any stty commands if it is on a serial line.  nohup the
program and it just keeps going as the user you specified in the su

This doesn't have the advantage of restarting if the program blows up
like init would do.  However, you can loop in a script to simulate the
same thing.

I haven't had to do this on linux but it works on hpux.

example: start program foo as user bar
	make a script called foo in /etc/init.d  (make links in the
		rc?.d directories)
	inside /etc/init.d/foo have a line to start a start script
	such as su bar -c "/home/bar/bin/foo.startup"
	inside foo.startup set up the environment, do any other setup
		like stty, etc. (maybe even exec >/dev/tty1 ??) 
		Then have a "nohup foo ... &"

If the program is good about not dumping core and such, it will run
on the terminal you attached it to until you change run levels or
stop it manually.

As I said, this scheme works under hpux.  ymmv.


From: 	Kevin Traas[SMTP:ktraas@netmaster.ca]
Sent: 	Tuesday, July 28, 1998 10:02 AM
To: 	Debian-User@lists.debian.org
Cc: 	The recipient's address is unknown.
Subject: 	App, !getty on /dev/tty1?

I'm working on a solution where the client does not want their users to have
to login to Linux (at the console) before running a custom app.  It's a very
"vertical" solution with no need for security and there will be no need to
run anything else on the box.

What I want to do is replace getty on /dev/tty1 with the actual app....
This way, the system boots, the app starts, and that's it.  No login.  Dead

Can it be done?

I tried just replacing /bin/getty in /etc/inittab with the path/filename of
the app, but that hasn't worked....  The app seems to be running (vi ps
auwx); however, nothing shows up on-screen.

Any ideas?  Any words-of-wisdom?  Pointers to tfm are welcome.

Kevin Traas

Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Reply to: