Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Automatic login on tty (Read 4815 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Automatic login on tty

Hello, this is my first time getting into runit and I am having issues trying to get auto login on tty to work. I have noticed in /etc/runit some agetty folders, but I don't really know hot to setup agetty. Could someone help?

Re: Automatic login on tty

Reply #1
I think you edit or add something to: /etc/runit/sv/agetty-tty1/conf

 

Re: Automatic login on tty

Reply #2
I edited /etc/runit/sv/agetty-tty1/conf. On the 4th line you will see:
Code: [Select]
GETTY_ARGS="--noclear"
Change this to:
Code: [Select]
GETTY_ARGS="--autologin <your username> --noclear"

The way I would do it would be to log out of tty1, switch over to tty2, create a copy of agetty-tty1 and rename it to agetty-autologin-tty1, and then edit the conf file in agetty-autologin-tty1. Next kill the agetty-tty1 service and enable the agetty-autologin-tty1 service. Finally, log out of tty2 and then switch back over to tty1. This way, if you don't want to autologin at some point, you can just disable and enable the appropriate services instead of  having to worry about editing files.

Re: Automatic login on tty

Reply #3
I edited /etc/runit/sv/agetty-tty1/conf. On the 4th line you will see:
Code: [Select]
GETTY_ARGS="--noclear"
Change this to:
Code: [Select]
GETTY_ARGS="--autologin <your username> --noclear"

The way I would do it would be to log out of tty1, switch over to tty2, create a copy of agetty-tty1 and rename it to agetty-autologin-tty1, and then edit the conf file in agetty-autologin-tty1. Next kill the agetty-tty1 service and enable the agetty-autologin-tty1 service. Finally, log out of tty2 and then switch back over to tty1. This way, if you don't want to autologin at some point, you can just disable and enable the appropriate services instead of  having to worry about editing files.

This worked, thank you very much Nostos !!