]> git.somenet.org - pub/jan/scripts.git/blob - runvm.sh
use bug to generate deltat-game-credits.
[pub/jan/scripts.git] / runvm.sh
1 #!/bin/bash
2
3 if [[ $1 == "startx" ]] ; then
4   VMNAME=$2
5   xhost +local:
6   sed -e 's/#VMNAME#/'$VMNAME'/g' ~/bin/runvm.xbindkeysrc.template > ~/.xbindkeysrc.template.$VMNAME
7   xbindkeys -f ~/.xbindkeysrc.template.$VMNAME
8 #  /usr/bin/synergyc -f --debug ERROR --name fujivm 10.11.0.1:24800 &
9   VirtualBox --startvm $VMNAME --fullscreen
10   rm ~/.xbindkeysrc.template.$VMNAME
11 else
12   VMNAME=$1
13   if [[ $2 != "" ]] ; then
14     VMNAME="$(echo $1 | sed -e 's/^'$2'//')"
15   fi
16   reset
17   echo "Security check completed."
18   echo "Continue to boot ${VMNAME}?"
19   read unused
20   echo "Booting ${VMNAME}"
21   startx $0 startx $VMNAME >/tmp/runvm.$VMNAME.log  2>&1
22 fi