Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set screen resolution on Virtualbox (host machine)
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Pass VBox machine name and screen resolution"
echo "Example: 'OpenBSD New' '1920x1080x32'"
exit 1
VBoxManage setextradata "$1" CustomVideoMode1 "$2"
result=`VBoxManage getextradata "$1" CustomVideoMode1`
case "$result" in
*$2*) VBoxManage getextradata "$1" CustomVideoMode1 && echo success;;
* ) echo failure ;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment