How to Adjust screen resolution on Ubuntu
Dynamically testing different resolutions
You can either use the Screen Resolution GUI tool to experiment with different resolutions, or the more powerful xrandr command-line tool this shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each.
You can direct xrandr to set a different resolution using the following command
Add undetected resolutions
Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected
If the mode already exists, but just isn't associated for the particular output using the following command
--addmode VGA 1024×768
Note:-These changes you make using xrandr only last through the current session.
Set xrandr changes persistently
There are several ways to make xrandr customizations permanent from session to session:
A user's ~/.xprofile file is executed on Xorg startup if it exists and is executable. You can copy and paste xrandr command line strings into this file so they're executed when you log in
Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/, while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts.
This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using .xprofile, and will apply to all users including the login screen.
See man xorg.conf for full details on how to use an xorg.conf file.Check man page from here