]> git.donarmstrong.com Git - neurodebian.git/commitdiff
First draft of a welcome wizard for the VM.
authorMichael Hanke <michael.hanke@gmail.com>
Wed, 3 Nov 2010 18:08:09 +0000 (14:08 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Wed, 3 Nov 2010 18:08:44 +0000 (14:08 -0400)
debian/changelog
debian/neurodebian-guest-additions.install
etc/xdg/autostart/vmsetupwizard.desktop [new file with mode: 0644]
tools/nd-vmsetupwizard [new file with mode: 0755]
xdg/desktop/neurodebian-vmsetupwizard.desktop [new file with mode: 0644]

index 6d4e290a86e7929ebba7e829409f4044048414aa..203ad280a1dc7b5c308b673b2f4e292fa712e401 100644 (file)
@@ -1,5 +1,5 @@
-neurodebian (0.3) squeeze; urgency=low
+neurodebian (0.4) squeeze; urgency=low
 
   * Initial release.
 
- -- Michael Hanke <michael.hanke@gmail.com>  Fri, 29 Oct 2010 10:31:03 -0400
+ -- Michael Hanke <michael.hanke@gmail.com>  Wed, 03 Nov 2010 14:08:27 -0400
index 20d2d81fd7fd338a64197749a81cbcbdb7989153..ec6c292c9da5e3a3180948823b70808633be961e 100644 (file)
@@ -1,3 +1,4 @@
 etc/sudoers.d/nopasswd etc/sudoers.d/
 etc/xdg/autostart/* etc/xdg/autostart/
 etc/gconf/* usr/share/gconf/defaults/
+tools/nd-vmsetupwizard usr/bin
diff --git a/etc/xdg/autostart/vmsetupwizard.desktop b/etc/xdg/autostart/vmsetupwizard.desktop
new file mode 100644 (file)
index 0000000..c6ccdd5
--- /dev/null
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=NeuroDebian VirtualMachine setup wizard
+Comment=Runs once to perform final configuration steps
+Exec=[ ! -e /etc/neurodebian/guest/setupwizard_done ] && nd-vmsetupwizard
+Terminal=false
+Type=Application
diff --git a/tools/nd-vmsetupwizard b/tools/nd-vmsetupwizard
new file mode 100755 (executable)
index 0000000..03900ee
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/bash
+#emacs: -*- mode: shell-script; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+#ex: set sts=4 ts=4 sw=4 et:
+
+# play save
+set -e
+set -u
+
+success_flag=/etc/neurodebian/guest/setupwizard_done
+nd_icon=/usr/share/pixmaps/neurodebian.svg
+icon_opt="--window-icon=$nd_icon"
+
+first_run=0
+if [ ! -e $success_flag ]; then
+       first_run=1
+fi
+
+if [ $first_run -eq 1 ]; then
+zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
+       --text="Welcome to the NeuroDebian virtual machine!
+
+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."
+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.
+
+Do you want to proceed with updating the system?
+"; then
+       exit 0
+fi
+
+# initialize apt
+#update-manager -c
+
+if [ ! -e /etc/popularity-contest.conf ]; then
+       zenity --info $icon_opt --title="NeuroDebian Setup Wizard" \
+               --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:
+
+1) Popular packages receive more attention from developers, bugs are fixed faster and updates are provided quicker.
+2) User statistics can help research software developers to acquire funding for continued development."
+
+       # install, but do not fail if something goes wrong
+       nd-autoinstall popularity-contest /etc/popularity-contest.conf || true
+fi
+
+# essential things are done -- let's mark sucess
+if [ $first_run -eq 1 ]; then
+       sudo touch $success_flag
+fi
+
+packages=$(zenity --list --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")
+
+if [ -n "$packages" ]; then
+       nd-autoinstall -f -p "$packages" true
+fi
+
+# and start greeter
+x-www-browser http://neuro.debian.net/vm_welcome.html &
diff --git a/xdg/desktop/neurodebian-vmsetupwizard.desktop b/xdg/desktop/neurodebian-vmsetupwizard.desktop
new file mode 100644 (file)
index 0000000..5e98ab8
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=VirtualMachine Setup Wizard
+Exec=nd-vmsetupwizard
+Type=Application
+Terminal=false
+Icon=system-run
+Categories=X-NeuroDebian