]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd-vmsetupwizard
reenable Language -- many people already use it
[neurodebian.git] / tools / nd-vmsetupwizard
index 03900eedb413e498a3e62ae4330cfdf722cf69ab..539fb350a09c0afc2f8af42ec984c5cca219d37c 100755 (executable)
@@ -6,7 +6,8 @@
 set -e
 set -u
 
-success_flag=/etc/neurodebian/guest/setupwizard_done
+cfg_dir=/etc/neurodebian/guest/setupwizard_done
+success_flag=$cfg_dir/setupwizard_done
 nd_icon=/usr/share/pixmaps/neurodebian.svg
 icon_opt="--window-icon=$nd_icon"
 
@@ -23,7 +24,7 @@ This is the first time you have started this virtual machine. We will now perfor
 fi
 
 if ! zenity --question $icon_opt --title="NeuroDebian Setup Wizard" \
---text="The setup procedure requires network access to download packages from the Debian archive. If you do not have network access right now, you can re-start this wizzard at any time from the NeuroDebian menu.
+--text="The setup procedure requires network access to download packages from the Debian archive. If you do not have network access right now, you can re-start this wizard at any time from the NeuroDebian menu. If you proceed you may have to enter the superuser password with is by default 'neurodebian'.
 
 Do you want to proceed with updating the system?
 "; then
@@ -31,7 +32,7 @@ Do you want to proceed with updating the system?
 fi
 
 # initialize apt
-#update-manager -c
+update-manager -c
 
 if [ ! -e /etc/popularity-contest.conf ]; then
        zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
@@ -44,22 +45,65 @@ if [ ! -e /etc/popularity-contest.conf ]; then
        nd-autoinstall popularity-contest /etc/popularity-contest.conf || true
 fi
 
-# essential things are done -- let's mark sucess
+# install custom filter for synaptics
 if [ $first_run -eq 1 ]; then
-       sudo touch $success_flag
+       sudo mkdir -p /root/.synaptic
+       sudo bash -c 'cat << EOT >> /root/.synaptic/filters
+filter "NeuroDebian" {
+  section {
+    inclusive false;
+    sections {
+    };
+  };
+  status {
+    flags 0x1ffff;
+  };
+  pattern {
+    andMode 0;
+    patterns {
+      Origin; "neuro.debian.net"; false;
+      Maintainer; "team@neuro.debian.net"; false;
+    };
+  };
+  priority {
+  };
+  reducedview {
+    enabled false;
+  };
+};
+EOT
+'
+       # essential things are done -- let's mark sucess
+       sudo bash -c "mkdir -p $cfg_dir && touch $success_flag"
 fi
 
-packages=$(zenity --list --checklist --column="Install" --column="Description" \
+# create symlink to shared folder into homedir
+[ ! -e $HOME/host ] && ln -s /mnt/host $HOME/host
+
+packages=$(zenity --list $icon_opt --checklist --column="Install" --column="Description" \
           --column="Package Name" --print-column=3 --hide-column=3 --hide-header \
-          --separator=' ' --text="This is the manual
-" \
-FALSE "one" "ipython" \
-FALSE "two" "vim" \
-FALSE "three" "bc dc")
+          --separator=' ' --text="Please select any additional component that shall be installed.
+
+Please note that this selection will not affect packages already installed
+on the system. No installed packages will be reinstalled or removed, only
+additional components will be installed." \
+FALSE "Emacs" "emacs" \
+FALSE "GNU Image Manipulation Program (Gimp)" "gimp" \
+FALSE "OpenOffice.org" "openoffice.org" \
+FALSE "Scientific Python" "ipython,python-numpy,python-matplotlib" \
+FALSE "TeX Live" "texlive" \
+FALSE "Adobe Flash browser plugin" "flashplugin-nonfree" \
+FALSE "Sun Java browser plugin" "sun-java6-plugin" \
+|| true)
 
 if [ -n "$packages" ]; then
-       nd-autoinstall -f -p "$packages" true
+       for pkgs in $packages; do
+               nd-autoinstall -f -p "${pkgs//,/ }" true
+       done
 fi
 
+# some sane ending
+zenity --info $icon_opt --text="Wizard has finished."
+
 # and start greeter
 x-www-browser http://neuro.debian.net/vm_welcome.html &