.xinitrc: Changed so that it uses a config file for the GUI selection
authorMichael Mrozek <EvilDragon@openpandora.org>
Tue, 6 Apr 2010 22:37:56 +0000 (00:37 +0200)
committerMichael Mrozek <EvilDragon@openpandora.org>
Tue, 6 Apr 2010 22:37:56 +0000 (00:37 +0200)
recipes/pandora-system/pandora-skel/.xinitrc

index 0be7790..77a9664 100644 (file)
@@ -48,6 +48,7 @@ kill -1 pndnotifyd &
 # doesn't explicitely select a session in SLiM.
 
 DEFAULT_SESSION=startxfce4
+STOP_SESSION="xfce4-session-logout --logout"
 
 # Write the default session into a temporary file.
 # This way, we can easily add new sessions in the future by just
@@ -65,6 +66,10 @@ if [ "$SESSION" == "" ]
        SESSION=$(cat /tmp/gui.load)
 fi
 
+STOP_SESSION=$(grep $SESSION /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
+echo $STOP_SESSION > /tmp/gui.stop
+chmod +x /tmp/gui.stop
+
 # Starts our session and checks if a new session should be loaded
 # after the old one is quit by simply executing the command that's in /tmp/gui.load
 
@@ -82,7 +87,9 @@ do
        fi
 
        $SESSION
-
+        
        SESSION=$(cat /tmp/gui.load)
-
+       STOP_SESSION=$(grep $SESSION /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
+        echo $STOP_SESSION > /tmp/gui.stop
+        chmod +x /tmp/gui.stop
 done