This is a script I wrote so a headless linux system would use the
resolutions available on my remote screen. Should be able to
adapt this to what you want, or just xrandr manually to set new
resolutions.
Note that this will change the way linux addresses your screen.
It does not guarantee that your display can work in that mode.
#!/bin/sh
#file name is ar.sh
#don't forget to make it executable
#script to add video modes to the dropdown box in the display settings menu
#if there's no hardware display,
#put 75-ohm terminating resistors on the VGA port RGB so the OS will
enable a
#display in default resolution. Otherwise don't get a frame buffer.
#this allows you to run a headless system and change the resolution from VNC
clear
#determine the name of your video output by running xrandr.
#edit the script below to change all occurrences of DVI-0
#to whatever you got from xrandr.
#setup output. Edit this for other ports, see man xrandr
xrandr --output DVI-0
echo done output
#create new modes
#use cvt to generate strings for additional new modes. Paste here and
addmode.
#modes that duplicate an existing mode name string will produce errors.
xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200
1203 1209 1245 -hsync +vsync
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080
1083 1088 1120 -hsync +vsync
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024
1027 1034 1063 -hsync +vsync
xrandr --newmode "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771
775 798 -hsync +vsync
echo done newmodes
#add modes to selection list
xrandr --addmode DVI-0 "1920x1200_60.00"
xrandr --addmode DVI-0 "1920x1080_60.00"
xrandr --addmode DVI-0 "1280x1024_60.00"
xrandr --addmode DVI-0 "1024x768_60.00"
echo done adddmodes
echo
echo New Display resolutions have been added to your display resolution
settings menu.
echo These may not work on your display.
#activate new mode
#substitute the startup mode you really want in the line below
xrandr --output DVI-0 --mode "1920x1080_60.00"
#echo done activating the mode
#If you run this more than once, it spits out confusing errors 'cuz the
modes already
#exist.
#must be run from the shell and user that it's modifying. Running as
root won't work.
#unless it's the root shell.
#debugged in Debian squeeze 8/30/2013 on HP Pavillion a6200n with
onboard nvidia No gurarantees!