Update scripts/resetgui.sh

This commit is contained in:
2026-01-18 20:17:37 -05:00
parent 7afe291d6e
commit 48d2db9e5a

View File

@@ -1,9 +1,10 @@
#!/bin/bash
NO_FORMAT="\e[0m"
C_RED="\e[38;5;9m"
if [ "$UID" -ne 0 ]; then
echo -e "${C_RED}This script must be run as root.${NO_FORMAT}"
exit 1
fi
systemctl start backtotty &&
sh /opt/scripts/initialisegui.sh
systemctl stop sddm
systemctl restart getty@tty1.service
pkill -u admin -9 2>/dev/null || true
pkill -f "lxqt" 2>/dev/null || true
pkill -u admin -f "lxqt-" 2>/dev/null || true
chvt 1
echo 'Restarting GUI'
sleep 2
systemctl start sddm