Skip to content

Auto Login to Hyprland

This guide configures your system to bypass the login prompt and automatically launch Hyprland upon boot. Perfect for single-user machines.

The setup involves three steps:

  1. Disable any existing display manager (SDDM/GDM)
  2. Configure TTY1 for automatic login
  3. Auto-launch Hyprland from your shell

If you have SDDM or another display manager installed:

Terminal window
sudo systemctl disable sddm.service

Do not use --now flag as it will immediately crash your current graphical session.

Create the systemd override directory:

Terminal window
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d/

Create the override file:

Terminal window
sudo nvim /etc/systemd/system/getty@tty1.service.d/override.conf

Add the following content (replace YOUR_USERNAME with your actual username):

[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin YOUR_USERNAME --noclear --noissue %I $TERM
ParameterDescription
ExecStart=Clears the default command
--autologin YOUR_USERNAMEPerforms automatic login for the specified user
--noclearPreserves boot messages on screen
--noissueSkips displaying /etc/issue

Add the following to the end of your ~/.zshrc (or ~/.bash_profile for Bash):

Terminal window
# Automatically start Hyprland on TTY1
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
if uwsm check may-start; then
exec uwsm start hyprland.desktop
fi
fi

This script:

  • Checks if no graphical session is running ($DISPLAY is empty)
  • Verifies we’re on TTY1
  • Uses UWSM (Universal Wayland Session Manager) to safely start Hyprland
Terminal window
# Simpler auto-start for Hyprland
if uwsm check may-start; then
exec uwsm start hyprland.desktop
fi

After making these changes, reboot your system:

Terminal window
sudo reboot

Your system should automatically log in and launch Hyprland without any prompts.