mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
updated secondary check for disable other login managers
This commit is contained in:
parent
fce608265f
commit
20194ad4e1
@ -13,6 +13,15 @@ sddm2=(
|
|||||||
qt6-svg-dev
|
qt6-svg-dev
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# login managers to attempt to disable
|
||||||
|
login=(
|
||||||
|
lightdm
|
||||||
|
gdm3
|
||||||
|
gdm
|
||||||
|
lxdm
|
||||||
|
lxdm-gtk3
|
||||||
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
# Determine the directory where the script is located
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
@ -39,7 +48,7 @@ for PKG2 in "${sddm2[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Check if other login managers are installed and disable their service before enabling SDDM
|
# Check if other login managers are installed and disable their service before enabling SDDM
|
||||||
for login_manager in lightdm gdm3 gdm lxdm lxdm-gtk3; do
|
for login_manager in "${login[@]}"; do
|
||||||
if sudo apt list --installed "$login_manager" > /dev/null; then
|
if sudo apt list --installed "$login_manager" > /dev/null; then
|
||||||
echo "Disabling $login_manager..."
|
echo "Disabling $login_manager..."
|
||||||
sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1
|
sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1
|
||||||
@ -47,7 +56,16 @@ for login_manager in lightdm gdm3 gdm lxdm lxdm-gtk3; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating sddm service........\n"
|
# Double check with systemctl
|
||||||
|
for manager in "${login[@]}"; do
|
||||||
|
if systemctl is-active --quiet "$manager" > /dev/null 2>&1; then
|
||||||
|
echo "$manager is active, disabling it..." >> "$LOG" 2>&1
|
||||||
|
sudo systemctl disable "$manager" --now >> "$LOG" 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${INFO} Activating sddm service........\n"
|
||||||
sudo systemctl enable sddm
|
sudo systemctl enable sddm
|
||||||
|
|
||||||
wayland_sessions_dir=/usr/share/wayland-sessions
|
wayland_sessions_dir=/usr/share/wayland-sessions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user