|
|
|
|
@ -1,18 +1,18 @@ |
|
|
|
|
#!/bin/sh |
|
|
|
|
# |
|
|
|
|
# DEFAULT KDE STARTUP SCRIPT ( @PROJECT_VERSION@ ) |
|
|
|
|
# DEFAULT Plasma STARTUP SCRIPT ( @PROJECT_VERSION@ ) |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
# When the X server dies we get a HUP signal from xinit. We must ignore it |
|
|
|
|
# because we still need to do some cleanup. |
|
|
|
|
trap 'echo GOT SIGHUP' HUP |
|
|
|
|
|
|
|
|
|
# Check if a KDE session already is running and whether it's possible to connect to X |
|
|
|
|
# Check if a Plasma session already is running and whether it's possible to connect to X |
|
|
|
|
kcheckrunning |
|
|
|
|
kcheckrunning_result=$? |
|
|
|
|
if test $kcheckrunning_result -eq 0 ; then |
|
|
|
|
echo "KDE seems to be already running on this display." |
|
|
|
|
xmessage -geometry 500x100 "KDE seems to be already running on this display." > /dev/null 2>/dev/null |
|
|
|
|
echo "Plasma seems to be already running on this display." |
|
|
|
|
xmessage -geometry 500x100 "Plasma seems to be already running on this display." > /dev/null 2>/dev/null |
|
|
|
|
exit 1 |
|
|
|
|
elif test $kcheckrunning_result -eq 2 ; then |
|
|
|
|
echo "\$DISPLAY is not set or cannot connect to the X server." |
|
|
|
|
|