fix deb xfce
This commit is contained in:
@@ -78,34 +78,24 @@ enable_graphical_target() {
|
||||
##########################
|
||||
# Start installation
|
||||
##########################
|
||||
color_yellow
|
||||
echo "Starting XFCE installation..."
|
||||
color_reset
|
||||
echo "${YELLOW}Starting XFCE installation...${RESET}"
|
||||
|
||||
CURRENT_DE="$(detect_de)"
|
||||
CURRENT_DM="$(detect_display_manager)"
|
||||
|
||||
if [[ -z "$CURRENT_DE" ]]; then
|
||||
color_cyan
|
||||
echo "No Desktop Environment detected. Installing XFCE (light setup with SDDM)..."
|
||||
color_reset
|
||||
echo "${CYAN}No Desktop Environment detected. Installing XFCE (light setup with SDDM)...${RESET}"
|
||||
|
||||
install_packages sddm xfce4 xfce4-goodies
|
||||
|
||||
enable_graphical_target
|
||||
|
||||
color_green
|
||||
echo "XFCE with SDDM installed successfully. You can reboot now to start XFCE."
|
||||
color_reset
|
||||
echo "${GREEN}XFCE with SDDM installed successfully. You can reboot now to start XFCE.${RESET}"
|
||||
else
|
||||
color_cyan
|
||||
echo "Detected existing Desktop Environment: $CURRENT_DE"
|
||||
color_reset
|
||||
echo "${CYAN}Detected existing Desktop Environment: $CURRENT_DE${RESET}"
|
||||
|
||||
if [[ "$CURRENT_DM" == "lightdm" ]]; then
|
||||
color_yellow
|
||||
echo "LightDM is currently active. Replacing with SDDM..."
|
||||
color_reset
|
||||
echo "${YELLOW}LightDM is currently active. Replacing with SDDM...${RESET}"
|
||||
|
||||
sudo systemctl disable lightdm
|
||||
sudo apt purge -y lightdm lightdm-gtk-greeter
|
||||
@@ -114,26 +104,16 @@ else
|
||||
|
||||
enable_graphical_target
|
||||
|
||||
color_green
|
||||
echo "LightDM removed and replaced with SDDM."
|
||||
color_reset
|
||||
echo "${GREEN}LightDM removed and replaced with SDDM.${RESET}"
|
||||
else
|
||||
color_cyan
|
||||
echo "Current display manager: ${CURRENT_DM:-none}. Leaving unchanged."
|
||||
color_reset
|
||||
echo "${CYAN}Current display manager: ${CURRENT_DM:-none}. Leaving unchanged.${RESET}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Force XFCE X11 session for SDDM
|
||||
# Force SDDM to use X11 session
|
||||
sudo mkdir -p /etc/sddm.conf.d
|
||||
sudo tee /etc/sddm.conf.d/override.conf > /dev/null <<'EOF'
|
||||
[Autologin]
|
||||
#User=$USER
|
||||
#Session=xfce.desktop
|
||||
|
||||
[General]
|
||||
DefaultSession=xfce.desktop
|
||||
EOF
|
||||
echo -e "[Autologin]\nSession=xfce.desktop" | sudo tee /etc/sddm.conf.d/10-xfce.conf >/dev/null
|
||||
echo -e "[General]\nSession=xfce.desktop" | sudo tee /etc/sddm.conf.d/10-xfce-session.conf >/dev/null
|
||||
|
||||
# End of script
|
||||
color_green; echo "XFCE / SDDM setup completed."; color_reset
|
||||
echo "${GREEN}XFCE / SDDM setup completed.${RESET}"
|
||||
Reference in New Issue
Block a user