pandora-first-run-wizard: Update first-run-wizard.
authorDavid-John Willis <John.Willis@Distant-earth.com>
Tue, 1 Dec 2009 20:21:50 +0000 (20:21 +0000)
committerDavid-John Willis <John.Willis@Distant-earth.com>
Tue, 1 Dec 2009 20:21:50 +0000 (20:21 +0000)
recipes/pandora-system/pandora-first-run-wizard.bb
recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh [deleted file]
recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh

index 0072ac1..d9ae28d 100755 (executable)
@@ -6,7 +6,7 @@ RDEPENDS = "hsetroot zenity dbus pandora-wallpaper-official tslib tslib-calibrat
 
 COMPATIBLE_MACHINE = "omap3-pandora"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = " \
           file://first-run-wizard.sh \
diff --git a/recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh b/recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh
deleted file mode 100755 (executable)
index 74ffa65..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/sh
-
-# notice: system dbus must be running
-
-export LANG=en_GB.UTF-8
-# for testing set display to something sane
-if [ "x$DISPLAY" = "x" ]; then
-       export DISPLAY=:0
-fi
-
-export MB_HUNG_APP_HANDLER='/usr/bin/hd-hung-app-handler'
-export GTK2_RC_FILES=/usr/share/themes/default/gtk-2.0/gtkrc:/usr/share/themes/default/gtk-2.0/gtkrc.maemo_af_desktop
-
-WALLPAPER=`grep File= /usr/share/backgrounds/default.desktop | cut -d"=" -f2`
-hsetroot -center $WALLPAPER
-
-export `dbus-launch --exit-with-session`
-
-#/usr/bin/maemo-launcher --daemon --booster gtk
-
-/usr/lib/gconf2/gconfd-2 &
-#/usr/lib/libgconf2-4/gconfd-2 &
-
-#/usr/lib/sapwood/sapwood-server &
-
-SHOW_CURSOR=yes
-
-#/usr/bin/matchbox-window-manager \
-#      -theme default \
-#      -use_titlebar yes \
-#      -use_desktop_mode plain \
-#      -use_lowlight no \
-#      -use_cursor $SHOW_CURSOR \
-#      -use_super_modal no &
-
-/usr/bin/x-window-manager
-
-#maemo-invoker /usr/bin/hildon-input-method.launch &
-
-#if /usr/bin/lshal | grep info.product | grep -i keyboard ; then
-#      /usr/bin/gconftool-2 -s -t bool /apps/osso/inputmethod/keyboard_available true 
-#fi
-
-
-##First we regenerate existing ssh keys:
-#rm -f /etc/ssh/ssh_host*
-#/usr/bin/ssh-keygen -t dsa -q -N "" -f /etc/ssh/ssh_host_dsa_key | \
-#      zenity --title="Please wait..." --text="Generating SSH DSA key." \
-#      --progress --pulsate --auto-close
-#/usr/bin/ssh-keygen -t rsa -q -N "" -f /etc/ssh/ssh_host_rsa_key |
-#      zenity --title="Please wait..." --text="Generating SSH RSA key." \
-#      --progress --pulsate --auto-close
-
-
-swap_part=$(sfdisk -l /dev/mmcblk? | grep swap | cut -d" " -f1)
-if [ x$swap_part != x ] ; then
-       use_swap=$(zenity --title="Enable swap?" --text "Swap partition found. Would you like to use it?" --list --radiolist --column " " --column "Answer" TRUE "Use swap on $swap_part" FALSE "Do not use swap")
-       if [ "$use_swap" = "Use swap on $swap_part" ] ; then
-               swapon $swap_part
-               echo "$swap_part none swap sw 0 0" >> /etc/fstab
-       fi
-fi
-
-while ! name=$(zenity --title="Type your name" --entry --text "Please type your full name.") || [ "x$name" = "x" ] ; do
-       zenity --title="Error" --error --text="Please try again."
-done
-
-username_guess=$(echo "$name" | cut -d" " -f1 | tr A-Z a-z)
-
-while ! username=$(zenity --title="Type your username" --entry --text "Please choose a short username.
-It should be all lowercase and
-contain only letters and numbers." --entry-text "$username_guess") || [ "x$username" = "x" ] ; do
-       zenity --title="Error" --error --text="Please try again."
-done
-
-while ! adduser --gecos "$name,,," --disabled-password "$username" ; do
-       username=$(zenity --title="Please check username" --entry --text "Please be sure that your
-username consists of only
-letters and numbers." --entry-text "$username")
-done
-
-password=""
-while [ x$password = x ] ; do
-       password1=$(zenity --title=Password --entry --text="Choose a new password." --hide-text)
-       password2=$(zenity --title=Confirm --entry --text="Confirm your new password." --hide-text)
-       if [ $password1 != $password2 ] ; then 
-               zenity --title="Error" --error --text="Passwords don't match.
-Please try again."
-       else if [ x$password1 = x ] ; then
-               zenity --title="Error" --error --text="Password can't be blank!
-Please try again."
-               else
-                       password=$password1
-               fi
-       fi
-done
-
-passwd "$username" <<EOF
-$password
-$password
-EOF
-
-for group in users admin adm audio video netdev plugdev ; do 
-       if ! grep ^$group: /etc/group ; then
-               addgroup --system "$group"
-       fi
-       adduser "$username" "$group" ; done
-echo "PREFERED_USER=$username" > /etc/default/autologin
-
-mkdir -p /etc/sudoers.d && echo '# Members of the admin group may gain root privileges' > /etc/sudoers.d/02ubuntu-admin
-echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/02ubuntu-admin
-update-sudoers
-while ! hostname=$(zenity --title="Choose a device name" --entry --text "Please choose a name for
-your OpenPandora. It should only contain
-letters, numbers and dashes." --entry-text "$username-pandora") || [ "x$hostname" = "x" ]; do 
-       zenity --title="Error" --error --text="Please try again."
-done
-
-echo $hostname > /etc/hostname
-echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts
-cat /usr/share/first-boot-wizard/hosts-template >> /etc/hosts
-hostname -F /etc/hostname
-
-killall maemo-launcher
-killall gconfd-2
index 0830fa2..307de34 100644 (file)
@@ -106,12 +106,14 @@ if zenity --question --title="Autologin" --text="Do you want to automatically lo
       sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
 fi
 
-# Setup which GUI will run as default. At the moment, it just creates a small file and puts Xfce or PMenu into it :)
+# Change the default session in SLiM.
 
 if zenity --question --title="Default Inteface" --text="Now you can choose whether you want to boot into a full desktop interface or a gaming console-like launcher by default.\n\nYou can always change this setting later." --ok-label="Full Desktop (Xfce)"  --cancel-label="Games console like Launcher (PMenu)"; then 
-       echo Xfce > /etc/bootup.cfg
-       else
+       echo Xfce4 > /etc/bootup.cfg
+       sed -i 's/.*sessions.*/sessions xfce4,pmenu/g' /etc/slim.conf
+        else
        echo PMenu > /etc/bootup.cfg
+       sed -i 's/.*sessions.*/sessions pmenu,xfce4/g' /etc/slim.conf
 fi
 
 zenity --info --title="Finished" --text "This concludes the First Boot Wizard.\nThanks for buying the OpenPandora. Enjoy the device!"