Skip to content

Instantly share code, notes, and snippets.

@ekarudianto
Created October 5, 2019 12:39
Show Gist options
  • Save ekarudianto/59e9f301f008cd6ca0cf12b44e154e84 to your computer and use it in GitHub Desktop.
Save ekarudianto/59e9f301f008cd6ca0cf12b44e154e84 to your computer and use it in GitHub Desktop.
Set a custom screen resolution for ubuntu virtualbox 1920x1080
#!/bin/bash
# Add new mode
xrandr --newmode "1920x1080.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
# Add the mode into registered monitor display
xrandr --addmode Virtual1 "1920x1080.00"
# Apply the resolution to pointed monitor display
xrandr --output Virtual1 --mode 1920x1080.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment