Skip to content

Instantly share code, notes, and snippets.

@partoftheworlD
Last active May 31, 2021 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save partoftheworlD/a9747541b26e3e21827c122964551c57 to your computer and use it in GitHub Desktop.
Save partoftheworlD/a9747541b26e3e21827c122964551c57 to your computer and use it in GitHub Desktop.
#!/bin/bash
# USAGE: ./install_ubuntu_mini.sh $(which agetty) $USER
sudo apt install xinit rxvt-unicode snapd xfce4 network-manager xrandr -y
sudo systemctl start NetworkManager.service
sudo systemctl enable NetworkManager.service
sudo snap install midori
echo '[Service]' | sudo tee -a /etc/systemd/system/getty@tty1.service.d/override.conf
echo 'ExecStart=' | sudo tee -a /etc/systemd/system/getty@tty1.service.d/override.conf
echo "ExecStart=-$1 --autologin $2 --noclear %I $TERM" | sudo tee -a /etc/systemd/system/getty@tty1.service.d/override.conf
sudo systemctl enable getty@tty1
echo '[ $(tty) = /dev/tty1 ] && exec startx' >> ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment