op_createsd.sh: New script to prepare SD Cards for the Pandora
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_switchgui.sh
1 #!/bin/bash
2
3 selection=$(cat /etc/pandora/conf/gui.conf | grep -v NOSWITCH | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Switch to a different GUI" --list --column "name" --column "description" --text "Select a GUI you want to switch to" )
4 echo $selection
5
6 gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}')
7 stopnew=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
8
9 echo $gui
10
11 if [ $gui ]; then 
12   echo "$gui" > /tmp/gui.load
13   echo "$stopnew" > /tmp/gui.stopnew
14   echo $selection will be started
15   /tmp/gui.stop
16 else
17   exit 0
18 fi