Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Can't autologin and can't autostart sway (Read 1578 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Can't autologin and can't autostart sway

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?

Re: Can't autologin and can't autostart sway

Reply #1
and which packages was updated with your recent update?

Re: Can't autologin and can't autostart sway

Reply #2
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.

Re: Can't autologin and can't autostart sway

Reply #3
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.

Re: Can't autologin and can't autostart sway

Reply #4
Thanks for the explanation and for the fix  :)