Monday, 30 December 2013

Simple way to add custom resolution in Ubuntu 13.10


Some people in Ubuntu(or other flavors) are concerned about resolution just like me to get more screen space. In Ubuntu we don't get to select the highest possible resolution supported by the video driver automatically so we need to add it manually using the xrandr utility. People in Linux know the beautiful shell named bash and also know that we can create bash scripts to automate system tasks. So in this process I am going to use a simple bash script to execute 3 commands every time at user session start-up.

So let's get started..

1) Open Terminal and type cvt 1150 850. Replace these numbers with your preferred resolution and then enter.

You will see something like this:



   


copy the info stated after Modeline

2)Open any text editor I prefer gedit, vim will also be very good.
declare the text file as script by adding #!/bin/bash at the beginning of the file  and then add the 3 commands one after another

  •  xrandr --newmode 'paste the info here'
  •  xrandr --addmode VGA1(or your display type) 1152x810_60.0
  •  xrandr --output VGA1 --mode 1152x810_60.00
(Replace the 1152x810_60.00 with your preferred resolution)

Ex.


now save the file by any name with an .sh extension.

3) make the file executable either by terminal by entering chmod a+rx scriptname.sh
or
   gui by selecting the file Right Click>Properties>Permissions>Allow executing file as program.

(You can test the script from terminal by going to the destination where you saved the script and execute it by adding ./ before the script.)

4)Now move the script to your home folder


open up Startup Applications and add the script we created in it as described in the picture below


Press save log out and log back in for the changes to take effect.

Done.

If you have any question please do ask me and if you find any errors in this article do let me know. Thank you.

Here's the video:
http://youtu.be/ihv62nK4s7M

Oh do add comments.