Forked from kasramp/host_vbox_custom_resolution.sh
Created
September 1, 2022 12:59
Star
You must be signed in to star a gist
Set screen resolution on Virtualbox (host machine)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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