#Write the current user into /tmp/currentuser for any scripts or programs who want to make use of it
whoami > /tmp/currentuser
id -u > /tmp/currentuid
-chmod 777 /tmp/currentuser
-chmod 777 /tmp/currentuid
+chmod +r /tmp/currentuser
+chmod +r /tmp/currentuid
# HUP pndnotifyd to make sure it picks up the users home.
-killall -1 pndnotifyd &
+# -- nope, we are not root and can't do it
+# killall -1 pndnotifyd &
# The following variable defines the session which is started if the user
# doesn't explicitely select a session in SLiM.
SESSION=$1
-if [ "$SESSION" == "" ]
-
- then
+if [ "$SESSION" == "" ]; then
SESSION=$(cat /tmp/gui.load)
fi
# This way, we can easily do a quick switch from any session to the next one by simply
# echo'ing the new session executable into /tmp/gui.load and exiting.
-nocleanwarn=$(cat /tmp/nocleanwarn)
+nocleanwarn=$(cat /tmp/nocleanwarn 2> /dev/null)
-if [ $nocleanwarn = "Yes" ]; then
+if [ "$nocleanwarn" = "Yes" ]; then
pnd_version=$(cat /tmp/pnd_version)
- if [ "$pnd_version" == "OMAP3630" ]; then
+ if [ "$pnd_version" = "OMAP3630" ]; then
safespeed="1000"
else
safespeed="600"
rm /tmp/gui.load
if [ "$SESSION" == "" ]
-
then
- exit 0;
+ exit 1
fi
$SESSION
- SESSION=$(cat /tmp/gui.load)
+ SESSION=$(cat /tmp/gui.load 2> /dev/null)
STOP_SESSION=$(grep $SESSION /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
echo $STOP_SESSION > /tmp/gui.stop
chmod +x /tmp/gui.stop