Originally Posted by
richardjl
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!
If the xrandr commands indeed work, that's great! I've never had much success adding new modes to xrandr.
To turn these commands into a script, first copy the code into a text file, and save it in ~/bin. If the folder doesn't exist, create it. Mark it executable by running
Code:
chmod +x ~/bin/your_script
It's easy to set the script to run at startup, but it depends what DE you're using. I wrote an article on adding startup scripts here.
Bookmarks