Skip to content

Instantly share code, notes, and snippets.

@aL3xa
Created September 13, 2011 10:28
Show Gist options
  • 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