Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Set screen resolution on Virtualbox (host machine)
#!/bin/sh
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Pass VBox machine name and screen resolution"
echo "Example: 'OpenBSD New' '1920x1080x32'"
exit 1
fi
VBoxManage setextradata "$1" CustomVideoMode1 "$2"
result=`VBoxManage getextradata "$1" CustomVideoMode1`
case "$result" in
*$2*) VBoxManage getextradata "$1" CustomVideoMode1 && echo success;;
* ) echo failure ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment