Automagically loging in on all 11 of my tty's leaving tty12 for an X session
This is a two step process so be careful you have both processes complete before restarting init
Step 1. Modifying /etc/inittab
I have commented out all the lines similar too :
#1:12345:respawn:/sbin/getty 38400 tty1and replaced them with :
# # Start of Automagic logins # 1:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty1 2:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty2 3:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty3 4:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty4 5:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty5 6:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty6 7:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty7 8:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty8 9:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty9 10:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty10 11:2345:respawn:/sbin/getty -n -l /usr/bin/myloginscript 38400 tty11 # # End of Automagic logins #
I did dabble with rungetty & other processes which only required modifying this file but found them too limiting>
Step 2.
Create loginscript with your favourite editor to include :
#! /bin/sh
/bin/login -f {desired username here}
taking special note too use an existimng username and the same path/filename as that used in /etc/inittab for the loginscript
and too chmod +x /usr/bin/myloginscript after creating it
and voila you now have tty's 1-11 automagically logging in with {desired username here}
of course with term matching you could run different users on different tty's but I had no need for such and ran screen instead on them