Skip to content

Instantly share code, notes, and snippets.

@aL3xa
Created September 13, 2011 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aL3xa/1213555 to your computer and use it in GitHub Desktop.
Save aL3xa/1213555 to your computer and use it in GitHub Desktop.
Virtualbox custom startup script
#!/bin/bash
if [ -z $(lsmod | grep vboxdrv) ]; then
# load virtualbox module
gksudo modprobe vboxdrv
fi
# virtualbox module loaded
vm=`VBoxManage list vms | zenity --list --title="Virtualbox machines" --column="Machine"`
if [ ! -z "$vm" ]; then
VBoxManage startvm $vm
# zenity --info --text=$vm
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment