summaryrefslogtreecommitdiff
path: root/kanotix-reset-plasma-panel
diff options
context:
space:
mode:
Diffstat (limited to 'kanotix-reset-plasma-panel')
-rwxr-xr-xkanotix-reset-plasma-panel10
1 files changed, 9 insertions, 1 deletions
diff --git a/kanotix-reset-plasma-panel b/kanotix-reset-plasma-panel
index 4974b52..79dbf9f 100755
--- a/kanotix-reset-plasma-panel
+++ b/kanotix-reset-plasma-panel
@@ -1,7 +1,15 @@
#!/bin/sh
+if [ "$(id -u)" = "0" ]; then
+ echo "Error: Do NOT run this script as root!" >&2
+ exit 1
+fi
+if [ -z "$DISPLAY" ]; then
+ echo "Error: This script does NOT run without X!" >&2
+ exit 2
+fi
echo "creating backup of ~/.kde/share/config/plasma-desktop-appletsrc"
rm -f ~/.kde/share/config/plasma-desktop-appletsrc.bak
cp ~/.kde/share/config/plasma-desktop-appletsrc ~/.kde/share/config/plasma-desktop-appletsrc.bak
echo "loading panel reset script to plasma desktop console"
-qdbus org.kde.plasma-desktop /MainApplication loadScriptInInteractiveConsole /usr/share/kde4/apps/plasma-desktop/updates/01-kanotix-default-setup.js 2> /dev/null
+qdbus org.kde.plasma-desktop /MainApplication loadScriptInInteractiveConsole /usr/share/kde-kanotix-settings/share/apps/plasma-desktop/updates/02-kanotix-default-setup.js 2> /dev/null
echo "to start plasma panel reset, press execute button"