From be63211e6b8487995049e335d90f4660d1316b72 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 8 Nov 2025 12:47:48 -0500 Subject: [PATCH] Make sure that lgm is not ran as root. --- linux-game-manager.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index f1d076c..4f18140 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -802,6 +802,12 @@ migrate_launcher() { } +# Make sure this is not ran as root +if [[ "$(whoami)" == "root" ]]; then + echo "Please do not run ${0##*/} as root." + exit 1 +fi + # Detect dialog interface type BEFORE potentially setting DISPLAY # This must happen before we modify DISPLAY to preserve console detection if [[ -z "$DISPLAY" ]]; then