X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=blobdiff_plain;f=recipes%2Fpandora-system%2Fpandora-scripts%2Fop_startupmanager.sh;h=7c0c3362cf06d88239360febebecb17a6bf44dca;hp=ae17c8e624e5ce37d164b2e4e098d24e9f37837b;hb=ed9a9b80ae92acb9f8b86e0ffa1d4fb4b619d2c3;hpb=b6335a66ac65433ad5f5460f58991a2ea6a7b851 diff --git a/recipes/pandora-system/pandora-scripts/op_startupmanager.sh b/recipes/pandora-system/pandora-scripts/op_startupmanager.sh index ae17c8e..7c0c336 100755 --- a/recipes/pandora-system/pandora-scripts/op_startupmanager.sh +++ b/recipes/pandora-system/pandora-scripts/op_startupmanager.sh @@ -3,14 +3,16 @@ # Startup-Manager, v1.0, written by Michael Mrozek aka EvilDragon 2010 with some help by vimacs. # This scripts allows you to change various settings of the Pandora startup process. -while mainsel=$(zenity --title="Startupmanager" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="What do you want to do?" "gui" "Change Default GUI for current user" "login" "Enable/Disable Autologin" "user" "Select default user" "wifi" "Enable/Disable WiFi on Boot"); do +while mainsel=$(zenity --title="Startup manager" --width="400" --height="250" --list --column "id" --column "Please select" --hide-column=1 --text="What do you want to do?" "gui" "Change Default GUI for current user" "login" "Enable/Disable auto login" "user" "Select default user" "wifi" "Enable/Disable WiFi on boot"); do + case $mainsel in # Change default GUI "gui") user2=$(cat /tmp/currentuser) - selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity ---width=500 --height=300 --title="Change the Default GUI" --list --column "Name" --column "Description" --text "Please select the GUI you want to run as default startup" ) + selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity ---width=500 --height=300 --title="Change the default GUI" --list --column "Name" --column "Description" --text "Please select the GUI you want to run as default startup" ) + echo $selection gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}') @@ -24,21 +26,21 @@ case $mainsel in "login") if zenity --question --title="Autologin" --text="Do you wish to automatically login at startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes" --cancel-label="No"; then sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf - zenity --info --title="Changed Autologin" --text "Autologin is now enabled." --timeout 6 + zenity --info --title="Changed auto login" --text "Auto login is now enabled." --timeout 6 else sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf - zenity --info --title="Changed Autologin" --text "Autologin is now disabled." --timeout 6 + zenity --info --title="Changed auto login" --text "Auto login is now disabled." --timeout 6 fi;; # Select default user "user") if username=$(cat /etc/passwd | grep /home/ | grep -v root | awk -F\: '{print $1 }' | zenity --width=100 --height=200 --title="Select the default user" --list --column "Username" --text "Please select the default user\nor press Cancel to disable a default user.") ; then sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf - zenity --info --title="Changed Default User" --text "The default user is now $username." --timeout 6 + zenity --info --title="Changed default user" --text "The default user is now $username." --timeout 6 else echo sed -i "s/.*default_user.*/default_user/g" /etc/slim.conf - zenity --info --title="Changed Default User" --text "The default user disabeled" --timeout 6 + zenity --info --title="Changed default user" --text "The default user disabled" --timeout 6 fi;; # Enable / Disable WiFi on boot