2 #emacs: -*- mode: shell-script; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
3 #ex: set sts=4 ts=4 sw=4 et:
9 cfg_dir=/etc/neurodebian/guest/setupwizard_done
10 success_flag=$cfg_dir/setupwizard_done
11 nd_icon=/usr/share/pixmaps/neurodebian.svg
12 icon_opt="--window-icon=$nd_icon"
15 if [ ! -e $success_flag ]; then
19 if [ $first_run -eq 1 ]; then
20 zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
21 --text="Welcome to the NeuroDebian virtual machine!
23 This is the first time you have started this virtual machine. We will now perform a few simple steps to finalize its configuration. This includes upgrading the system to the latest available versions and installing additional software packages upon your request."
26 if ! zenity --question $icon_opt --title="NeuroDebian Setup Wizard" \
27 --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'.
29 Do you want to proceed with updating the system?
37 sudo update-software-center --debug 2>&1 | \
38 zenity $icon_opt --title="Updating Software Center Repository" \
39 --progress --pulsate --auto-close --auto-kill
41 popconf=/etc/popularity-contest.conf
42 if [ ! -e "$popconf" ] || grep -q -e '^PARTICIPATE.*no' "$popconf" ;
44 zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
45 --text="You will now be given the choice to participate in the package survey. If enabled, a list of installed packages will be anonymously sent to Debian (http://popcon.debian.org). Your participation is important for two reasons:
47 1) Popular packages receive more attention from developers, bugs are fixed faster and updates are provided quicker.
48 2) User statistics can help research software developers to acquire funding for continued development."
50 if [ -e "$popconf" ] ; then
51 # just reconfigure so user could get a chance to participate
52 sudo DEBIAN_FRONTEND=gnome dpkg-reconfigure popularity-contest
54 # install, but do not fail if something goes wrong
55 nd-autoinstall popularity-contest /etc/popularity-contest.conf || true
59 # install custom filter for synaptics
60 if [ $first_run -eq 1 ]; then
61 sudo mkdir -p /root/.synaptic
62 sudo bash -c 'cat << EOT >> /root/.synaptic/filters
63 filter "NeuroDebian" {
75 Origin; "neuro.debian.net"; false;
76 Maintainer; "team@neuro.debian.net"; false;
87 # essential things are done -- let's mark sucess
88 sudo bash -c "mkdir -p $cfg_dir && touch $success_flag"
91 # create symlink to shared folder into homedir
92 [ ! -e $HOME/host ] && ln -s /mnt/host $HOME/host
94 packages=$(zenity --list $icon_opt --checklist --column="Install" --column="Description" \
95 --column="Package Name" --print-column=3 --hide-column=3 --hide-header \
96 --separator=' ' --text="Please select any additional component that shall be installed.
98 Please note that this selection will not affect packages already installed
99 on the system. No installed packages will be reinstalled or removed, only
100 additional components will be installed." \
101 FALSE "Emacs" "emacs" \
102 FALSE "GNU Image Manipulation Program (Gimp)" "gimp" \
103 FALSE "Octave" "octave,qtoctave" \
104 FALSE "OpenOffice.org" "openoffice.org" \
105 FALSE "Scientific Python" "ipython,python-numpy,python-matplotlib" \
106 FALSE "TeX Live" "texlive" \
107 FALSE "Adobe Flash browser plugin" "flashplugin-nonfree" \
108 FALSE "Sun Java browser plugin" "sun-java6-plugin" \
111 if [ -n "$packages" ]; then
112 for pkgs in $packages; do
113 nd-autoinstall -f -p "${pkgs//,/ }" true
118 zenity --info $icon_opt --text="Wizard has finished."
121 x-www-browser http://neuro.debian.net/vm_welcome.html &