diff --git a/scripts/resetgui.sh b/scripts/resetgui.sh index f8958ff..d10c00e 100644 --- a/scripts/resetgui.sh +++ b/scripts/resetgui.sh @@ -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 \ No newline at end of file +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 \ No newline at end of file