You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy /etc/init/tty.conf to /etc/init/tty-autologin.conf and edit the new file as follows ("myuser" is the user we want to end up logged in automatically on TTY1):
# tty - getty## This service maintains a getty on the specified device.## Do not edit this file directly. If you want to change the behaviour,# please create a file tty.override and put your changes there.
stop on runlevel [S016]
respawn
instance $TTYexec /sbin/mingetty --autologin myuser $TTY# ADD THIS: ^^^^^^^^^^^^^^^^^^^
usage 'tty TTY=/dev/ttyX - where X is console id'
Copy /etc/init/start_ttys.conf to /etc/init/start_ttys.override and edit the .override file as follows:
## This service starts the configured number of gettys.## Do not edit this file directly. If you want to change the behaviour,# please create a file start-ttys.override and put your changes there.
start on stopped rc RUNLEVEL=[2345]
env ACTIVE_CONSOLES=/dev/tty[1-6]
env X_TTY=/dev/tty1
task
script
. /etc/sysconfig/init
forttyin$(echo $ACTIVE_CONSOLES);do
[ "$RUNLEVEL"="5"-a"$tty"="$X_TTY" ] &&continue
t = `basename "$tty"`case$numin
tty1) initctl start tty-autologin.conf TTY=$tty ;;
*) initctl start tty TTY=$ttyesacdone
end script
Thanks. It helped me a lot.