April 11, 2009

 Inittab (note to self)

Run something right before login prompt with inittab. In my case it's setterm which clears the screen and changes the tty font color to «old-school» bold green as i like.

Open /etc/inittab and find this block of code:


1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6


Add the following right after 'getty' on each line:


-I `setterm -clear all -foreground green -bold -store`


So it looks like this:


1:2345:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty1
2:23:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty2
3:23:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty3
4:23:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty4
5:23:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty5
6:23:respawn:/sbin/getty -I `setterm -clear all -foreground green -bold -store` 38400 tty6


Reboot and enjoy!



Be the first to comment!


Post a Comment

newer older home