Screen Resolution (Ubuntu)

I tried the linked instructions and pasted the lines into my /etc/rc.local script

It did not help. I still got 1920 x 1080 output when hooked up to my 1280 x 800 monitor and after a few seconds the screen was a mess. This messed up screen also showed up after a few seconds when connected to a 1920 x 1080 display.

I deleted the lines and the screen is once again stable (still no 1280 x 760 support)

Any help would be appreciated!