diff --git a/desktop-environment/gnome.sh b/desktop-environment/gnome.sh index 1e9b951..5ebb391 100644 --- a/desktop-environment/gnome.sh +++ b/desktop-environment/gnome.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail # Don't allow users to run this script as root if ((EUID == 0)); then @@ -19,9 +20,10 @@ if [[ -e /etc/systemd/system/display-manager.service ]]; then fi fi -# Enables the GDM display manager so GNOME starts automatically on boot +# Enables the GDM display manager so GNOME starts automatically on boot. +# --force replaces an existing display-manager.service symlink when switching DMs. echo "Enabling GDM display manager" -sudo systemctl enable gdm.service +sudo systemctl enable --force gdm.service # Enables NetworkManager so networking works out of the box in GNOME echo "Enabling NetworkManager" diff --git a/desktop-environment/kde-plasma.sh b/desktop-environment/kde-plasma.sh index b0aed8b..4ff1d85 100644 --- a/desktop-environment/kde-plasma.sh +++ b/desktop-environment/kde-plasma.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail # Don't allow users to run this script as root if ((EUID == 0)); then @@ -18,9 +19,10 @@ if [[ -e /etc/systemd/system/display-manager.service ]]; then fi fi -# Enables the SDDM display manager so KDE Plasma starts automatically on boot +# Enables the SDDM display manager so KDE Plasma starts automatically on boot. +# --force replaces an existing display-manager.service symlink when switching DMs. echo "Enabling SDDM display manager" -sudo systemctl enable sddm.service +sudo systemctl enable --force sddm.service # Enables NetworkManager so networking works out of the box in Plasma echo "Enabling NetworkManager" diff --git a/intel/intel-drivers.sh b/intel/intel-drivers.sh index 330531d..2606ea2 100755 --- a/intel/intel-drivers.sh +++ b/intel/intel-drivers.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail # Don't allow users to run this script as root if ((EUID == 0)); then