Artix Linux Forum

Init systems => S6 => Topic started by: yolkano on 23 December 2020, 16:07:42

Title: [SOLVED] Can't autologin and can't autostart sway
Post by: yolkano on 23 December 2020, 16:07:42
After the recent update I can no longer autologin to tty1 and even after I login sway doesn't start automatically (I'm using fish).

I'm not sure what the purpose of `agetty-tty1` (in /etc/s6/sv) if there's already an early getty.

Here are the contents of the early-getty/run:

/usr/bin/agetty -8 -a user -L tty1 115200

where user is my username.

I also have:

if test (tty) = "/dev/tty1"
  exec sway
end

in .config/fish/config.fish and it was working before the update, now it doesn't work and even after I manually login, sway doesn't start unless I manually type in `exec sway`.

I'm suspecting this has to do with a recent change in the tty services structure, so what went wrong?
Title: Re: Can't autologin and can't autostart sway
Post by: alium on 23 December 2020, 16:09:08
and which packages was updated with your recent update?
Title: Re: Can't autologin and can't autostart sway
Post by: Dudemanguy on 23 December 2020, 16:47:17
What happens now is that the early getty gets killed and instead agetty-tty1 is spawned.

I'm confused by your "early-getty" service however. It looks like you're spawning another tty over the current one? If so, I'm not sure why this would fail for you.

Edit: However, autologin options should really be included as part of the provided agetty services. Users shouldn't need to write their own scripts for this. I'll add an option for it.
Title: Re: Can't autologin and can't autostart sway
Post by: Dudemanguy on 23 December 2020, 18:58:59
Okay, I just pushed a new version of s6-scripts to gremlins which allows autologin as an option. To enable it, just edit /etc/s6/sv/agetty-tty1/conf (or agetty-tty2, agetty-tty3, etc.) and put your username in USER. That should fix everything for you I think and you shouldn't need any custom script to just autologin into agetty. Sorry about the trouble.
Title: Re: Can't autologin and can't autostart sway
Post by: yolkano on 23 December 2020, 21:34:55
Thanks for the explanation and for the fix  :)