Something other than getty/login on console?
I want the default login console to run something like /usr/games/worms -n100 or rsh host /opt/local/bin/xaos -driver aa -autopilot Instead of /usr/libexec/getty std.9600 I have tried changing it in /etc/ttys but this is not working. How can I go about doing this? It's for a mac68k ascii art lava lamp. The host it would rsh to is on a crossover cable, so it does not need to slow down by using ssh.
Re: Something other than getty/login on console?
da...@elven.com.au (David Diggles), 2012.06.15 (Fri) 00:20 (CEST): > I want the default login console to run something like > /usr/games/worms -n100 > or > rsh host /opt/local/bin/xaos -driver aa -autopilot the way I do it... $ grep ttyC0 /etc/ttys ttyC0 "/usr/local/libexec/getty.sh" vt220 on $ ls -al /usr/local/libexec/getty.sh -rwxr-xr-x 1 root wheel 210 Feb 15 19:01 /usr/local/libexec/getty.sh $ cat /usr/local/libexec/getty.sh #!/bin/ksh -e TERM=vt220 /usr/local/sbin/dostuff.sh < /dev/$1 > /dev/$1 $ ls -la /usr/local/sbin/dostuff.sh -rwxr-xr-x 1 root wheel - 2.2K Feb 18 11:28 /usr/local/sbin/dostuff.sh dostuff.sh has stdin/stdout connected to console, now. Bye, Marcus (nice project, btw!) > !DSPAM:4fda64d4121516375431200!
Re: Something other than getty/login on console?
Thanks Marcus! I have been sidetracked with a few things, but will give this technique a try soon. I take it dostuff.sh is where I could put something like #!/bin/sh while [ ! ]; do /usr/local/bin/ttyplay kickassci.demo done ? On Fri, Jun 15, 2012 at 09:36:43AM +0200, MERIGHI Marcus wrote: > da...@elven.com.au (David Diggles), 2012.06.15 (Fri) 00:20 (CEST): > > I want the default login console to run something like > > /usr/games/worms -n100 > > or > > rsh host /opt/local/bin/xaos -driver aa -autopilot > > the way I do it... > > $ grep ttyC0 /etc/ttys > ttyC0 "/usr/local/libexec/getty.sh" vt220 on > > $ ls -al /usr/local/libexec/getty.sh > -rwxr-xr-x 1 root wheel 210 Feb 15 19:01 /usr/local/libexec/getty.sh > > $ cat /usr/local/libexec/getty.sh > #!/bin/ksh -e > TERM=vt220 /usr/local/sbin/dostuff.sh < /dev/$1 > /dev/$1 > > $ ls -la /usr/local/sbin/dostuff.sh > -rwxr-xr-x 1 root wheel - 2.2K Feb 18 11:28 /usr/local/sbin/dostuff.sh > > dostuff.sh has stdin/stdout connected to console, now. > > Bye, Marcus > > (nice project, btw!) > > > !DSPAM:4fda64d4121516375431200!
Re: Something other than getty/login on console?
Hello David, da...@elven.com.au (David Diggles), 2012.06.25 (Mon) 07:10 (CEST): > Thanks Marcus! I have been sidetracked with a few things, > but will give this technique a try soon. please do not think I invented that wheel! See misc archives instead... > I take it dostuff.sh is where I could put something like yes. > #!/bin/sh I recommend the use of ``#!/bin/sh -e'', see ksh(1). > while [ ! ]; do I use ``while :; do'' in such cases; BUT: please read init(8), it will respawn your process anyways; read DIAGNOSTICS section carefully, especially the ``getty repeating too quickly'' part. Bye, Marcus > /usr/local/bin/ttyplay kickassci.demo > done > > On Fri, Jun 15, 2012 at 09:36:43AM +0200, MERIGHI Marcus wrote: > > da...@elven.com.au (David Diggles), 2012.06.15 (Fri) 00:20 (CEST): > > > I want the default login console to run something like > > > /usr/games/worms -n100 > > > or > > > rsh host /opt/local/bin/xaos -driver aa -autopilot > > > > the way I do it... > > > > $ grep ttyC0 /etc/ttys > > ttyC0 "/usr/local/libexec/getty.sh" vt220 on > > > > $ ls -al /usr/local/libexec/getty.sh > > -rwxr-xr-x 1 root wheel 210 Feb 15 19:01 /usr/local/libexec/getty.sh > > > > $ cat /usr/local/libexec/getty.sh > > #!/bin/ksh -e > > TERM=vt220 /usr/local/sbin/dostuff.sh < /dev/$1 > /dev/$1 > > > > $ ls -la /usr/local/sbin/dostuff.sh > > -rwxr-xr-x 1 root wheel - 2.2K Feb 18 11:28 /usr/local/sbin/dostuff.sh > > > > dostuff.sh has stdin/stdout connected to console, now. > > > > Bye, Marcus > > > > (nice project, btw!) > > !DSPAM:4fe7f2c2455333111015!