Skip to content

Instantly share code, notes, and snippets.

@wh5a
Created December 15, 2011 09:06
Show Gist options
  • Save wh5a/1480443 to your computer and use it in GitHub Desktop.
Save wh5a/1480443 to your computer and use it in GitHub Desktop.
systemd service for auto login X
# Based on slim.service
[Unit]
Description=Auto Login X
Requires=dev-tty7.device
After=dev-tty7.device systemd-user-sessions.service
[Service]
ExecStart=/bin/su wh5a -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
Restart=always
[Install]
WantedBy=graphical.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment