Skip to content

Instantly share code, notes, and snippets.

@nihilismus
Created April 7, 2015 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nihilismus/e08b6db3e44da03f09cb to your computer and use it in GitHub Desktop.
Save nihilismus/e08b6db3e44da03f09cb to your computer and use it in GitHub Desktop.
xrandr command for a gnu/linux virtual machine in qemu with -display=gtk
#!/bin/sh
# Based on https://wiki.archlinux.org/index.php/Xrandr#Adding_undetected_resolutions
# For a gnu/linux virtual machine in qemu with -display=gtk
mode="$(cvt 1280 720 | tail -1 | sed 's/Modeline //')"
xrandr --newmode $mode
mode="$(cvt 1280 720 | tail -1 | sed 's/Modeline //' | sed 's/ .*//')"
xrandr --addmode 'Virtual-0' ${mode}
xrandr --output 'Virtual-0' --mode ${mode}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment