Either you can open the
/etc/X11/xorg.conf
file manually and break your head or simply reconfigure X server by using the following command$sudo dpkg-reconfigure xserver-xorg
This would start a configuration wizard. All you need to do is keep clicking "Yes" and then at the end select the correct resolution supported by your monitor like "1280 x 1024", save the configuration file and restart the X server.
Hopefully your shall be able to get back to the old resolution.