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