logo       

Re: automatic start of interactive programs: msg#00044

t2.devel

Subject: Re: automatic start of interactive programs

Hi,

On Sun, Jan 13, 2008 at 09:25:33AM -0500, Mikael Ostensson wrote:
> So I need a method of starting the program on startup that have full access
> to the tty as root.
> Any simple way to auto login or by pass the getty all together that will
> work?

Most programs have no problems if they are started directly from inittab
instead of getty. You just have to make sure in your program that it is
really running on tty1.

If you don't want to modify your program, there is always the solution
to autologin a specific user. mingetty has an option for this. From a PC
where this solution is used (someone else set it up and it works ;)),
here is the inittab entry:

1:23:respawn:/sbin/mingetty --autologin gast tty1

this user has the following snippet in his .bashrc:

# autostart ncmpc on tty1
if [ $(tty) = /dev/tty1 ]
then
exec ncmpc
fi

There once was another setup with rungetty and I don't know why it was
changed to this way. This was the inittab entry with rungetty:

1:23:respawn:/sbin/rungetty -u gast -g gast --autologin gast tty1 --
/usr/bin/ncmpc

There a probably a dozen more solutions to achieve the same things, but
this one works on a "production" system ;)

Greetings, Tobi

--
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
Registered FLI4L-User #00000003

Attachment: signature.asc
Description: Digital signature

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
lists@xxxxxxxxxxxxxx with a subject of: unsubscribe t2
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise