lk/distros/void/autologin.md

34 lines
577 B
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
2022-01-16 19:28:02 +00:00
title: "Void Autologin"
2023-01-06 20:13:45 +00:00
tags: [ "Documentation", "Void" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
Make the autologin service:
> cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
2020-08-02 18:17:22 +00:00
```
if [ -x /sbin/agetty -o -x /bin/agetty ]; then
# util-linux specific settings
if [ "${tty}" = "tty1" ]; then
GETTY_ARGS="--noclear"
fi
fi
2020-01-02 00:04:35 +00:00
2020-08-02 18:17:22 +00:00
GETTY_ARGS="--autologin [ your username ] --noclear"
BAUD_RATE=38400
TERM_NAME=linux
```
2020-01-02 00:04:35 +00:00
Then stick this at the end of the bashrc:
```
# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
```