Last active
August 29, 2015 14:14
-
-
Save eniac111/00fcc0afd16e57172fce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# <blagovest ;at; petrovs d0t info> wrote this file. | |
# As long as you retain this notice youcan do whatever you want with | |
# this stuff. If we meet some day, and you thinkthis stuff is worth it, | |
# you can buy me a beer in return. Blagovest Petrov | |
# "~/.VirtualBox" is for the open source edition. | |
# Change it to "~/.config/VirtualBox for the Oracle edition. | |
( | |
echo "30" ; sleep 1 | |
echo "# Preparing the Virtual Machine to start"; sleep 1 | |
rm -rf ~/.VirtualBox | |
cp -r /var/vbox/WinXp/.VirtualBox ~/.VirtualBox | |
echo "50" ; sleep 1 | |
echo "# Configuring the Virtual Machine"; sleep 1 | |
sed -i "s/_CURRENTUSR_/$USER/g" ~/.VirtualBox/WinXP/WinXP.vbox | |
sed -i "s/_CURRENTUSR_/$USER/g" ~/.VirtualBox/VirtualBox.xml | |
echo "99" ; sleep 1 | |
echo "# Starting Windows..."; sleep 1 | |
VBoxManage startvm WinXP | |
echo "100" ; sleep 1 | |
echo "# Starting Windows..."; sleep 1 | |
) | | |
zenity --progress \ | |
--title="Starting Windows..." \ | |
--text="Preparing the Virtual Machine to start" \ | |
--percentage=0 \ | |
--auto-kill \ | |
--auto-close | |
if [ "$?" = -1 ] ; then | |
zenity --error --text "Starting canceled." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment