Artix Linux Forum

Init systems => runit => Topic started by: jormungandr on 19 August 2020, 10:03:08

Title: [SOLVED] Automatic login on tty
Post by: jormungandr on 19 August 2020, 10:03:08
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?
Title: Re: Automatic login on tty
Post by: ####### on 19 August 2020, 22:26:34
I think you edit or add something to: /etc/runit/sv/agetty-tty1/conf
Title: Re: Automatic login on tty
Post by: Nostos on 20 August 2020, 02:04:34
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.
Title: Re: Automatic login on tty
Post by: jormungandr on 21 August 2020, 10:22:11
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 !!