Skip to content

Instantly share code, notes, and snippets.

#!/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