It is primarily aimed at users of simple window manager environments rather then those who prefer fully-blown desktop environments as the latter usually have integrated display mangers to perform this function.
This guide only applies to those users who chose to run systemd as their init system.
If you have chosen to use SysVinit as PID1, refer to the "traditional" guides such as viewtopic.php?f=16&t=29333
This guide assumes an ability to edit system configuration files that may require root permissions to alter and will require correct configuration of the X server initialisation files at ~/.xsession or ~/.xinitrc (see startx(1) for more on this). If no ~/.xinitrc or ~/.xsession file is present then whatever is linked to /etc/alternatives/x-session-manager or /etc/alternatives/x-window-manager will be run instead (use the update-alternatives(1) command to change these).
For automatic login, run this command (as root):
- Code: Select all
systemctl edit getty@tty1
Then enter this text and save the file afterwards:
- Code: Select all
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin $username --noclear %I $TERM
Replace $username with your user name.
For automatic `startx` add this snippet to the end of the file at ~/.profile:
- Code: Select all
[ "$(tty)" = "/dev/tty1" ] && exec startx
Finally, set the correct default.target to ensure the system boots to the console (TTY) rather than to a display manager:
- Code: Select all
# systemctl set-default multi-user.target
To reverse this change, reset the default.target with:
- Code: Select all
# systemctl set-default graphical.target