updated debian files

This commit is contained in:
[yuri]
2025-11-10 11:23:02 +01:00
parent eb90ddf11a
commit f502cecaab
10 changed files with 598 additions and 588 deletions

View File

@@ -2,17 +2,27 @@
set -euo pipefail
##########################
# Color helpers
# Color helpers (no tput)
##########################
tput_reset() { tput sgr0; }
tput_black() { tput setaf 0; }
tput_red() { tput setaf 1; }
tput_green() { tput setaf 2; }
tput_yellow() { tput setaf 3; }
tput_blue() { tput setaf 4; }
tput_purple() { tput setaf 5; }
tput_cyan() { tput setaf 6; }
tput_gray() { tput setaf 7; }
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
GRAY='\033[0;37m'
BOLD='\033[1m'
RESET='\033[0m'
# Disable colors if output is not a terminal
if [ ! -t 1 ]; then
RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET=''
fi
color_red() { printf '%b' "$RED"; }
color_green() { printf '%b' "$GREEN"; }
color_yellow() { printf '%b' "$YELLOW"; }
color_cyan() { printf '%b' "$CYAN"; }
color_gray() { printf '%b' "$GRAY"; }
color_reset() { printf '%b' "$RESET"; }
##########################
# Use exported variables from main detection script
@@ -26,21 +36,19 @@ INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
##########################
# 4. Desktop Environment installation
##########################
tput_yellow
color_yellow
echo "Installing XFCE..."
tput_reset
color_reset
#detect if XFCE and SDDM are installed and if not install them
# Detect if XFCE and SDDM are installed and install if needed
if [[ -z "$DDE" ]]; then
tput_cyan
color_cyan
echo
echo "No Desktop Environment detected. Installing XFCE (light setup with SDDM)..."
tput_reset
color_reset
sudo apt update
sudo apt install -y --no-install-recommends sddm \
xfce4 \
xfce4-goodies
sudo apt install -y --no-install-recommends sddm xfce4 xfce4-goodies
# Enable SDDM as the display manager
sudo systemctl enable sddm
@@ -48,23 +56,23 @@ if [[ -z "$DDE" ]]; then
# Enable graphical target
sudo systemctl set-default graphical.target
tput_green
color_green
echo
echo "XFCE with SDDM installed successfully."
echo "You can reboot now to start XFCE."
tput_reset
color_reset
else
tput_cyan
color_cyan
echo
echo "You already have $DE installed."
tput_reset
color_reset
# Check if LightDM is installed and active
if systemctl is-active --quiet lightdm; then
tput_yellow
color_yellow
echo
echo "LightDM is currently active. Replacing with SDDM..."
tput_reset
color_reset
# Disable and remove LightDM
sudo systemctl disable lightdm
@@ -74,14 +82,14 @@ else
sudo apt install -y sddm
sudo systemctl enable sddm
tput_green
color_green
echo
echo "LightDM removed and replaced with SDDM."
tput_reset
color_reset
else
tput_cyan
color_cyan
echo
echo "No LightDM detected, leaving current display manager unchanged."
tput_reset
color_reset
fi
fi