Created
May 24, 2013 13:16
-
-
Save lhotari/5643432 to your computer and use it in GitHub Desktop.
script for adding standard modes to beamer for presenting on linux
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/bash | |
# script for adding standard modes to beamer for presenting on linux | |
# use xrandr to find out screen name of external output port | |
# xrandr is in x11-xserver-utils package on debian/ubuntu | |
SCREENNAME=$1 | |
if [ -z "$SCREENNAME" ]; then | |
SCREENNAME=VGA-0 | |
fi | |
function addmode() { | |
xrandr --newmode `cvt $1 $2 |grep Modeline | sed -e 's/^Modeline //' | sed -e 's/\"//g'` | |
xrandr --addmode $SCREENNAME $1x$2_60.00 | |
} | |
addmode 1280 1024 | |
addmode 1024 768 | |
addmode 800 600 | |
#addmode 1920 1200 |
Probably doesn't work for me anymore. I have Nvidia 310.44 driver version and it seems to have an incompatible xrandr version on Ubuntu 12.04.
There is another solution for Nvidia: http://askubuntu.com/questions/269901/ubuntu-12-10-cant-add-custom-resolution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the monitor has to be connected before running the script. You can check with xrandr command if it was able to add the forced modes.