Greetings.

My monitor support 1680*1050 resolution. However, when my ubuntu startup, it only provide two options 1024*768 or 800*600 and it is in 1024*768 by default.

I found some code which can enable the high resoltion. After excuting the following command, my screen shows the resoltion of 1680*1050 now.
cvt 1680 1050
xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA1 "1680x1050_60.00"
xrandr --output VGA1 --mode "1680x1050_60.00"

However, I hope the above script can be excuted automatically. I am expecting the script can be excuted after I login. I tried rc.local and it doesn't work. In which script should I put above code ?

Thanks!