TechFRP Search

Custom Search

Monday, September 27, 2010

XRandR - Desktop Scaling for Ubuntu

     I picked up an HP Mini 210 Netbook over the summer and installed the full Ubuntu 10.04 desktop on it Dual Booting Windows 7. The result was, in a word, "Awesome". I absolutely love it but as time went on I found that the 1024x600 screen resolution was not usable with all applications in some situations. For example, Evolution's Preferences window refused to size properly with scrolling bars on the side, so all of the options were not accessible. I searched and searched for a resolution but nothing was obvious until I came across the utility XRandR.

     XRandR is a utility for resizing and setting characteristics for displays in Linux, in this case Ubuntu. What I found was that this could be used with the "panning" option to set Virtual Desktop sizes on the attached display. To do this, first I needed to open a Terminal window and enter "xrandr" which is the built in utility with Ubuntu. After pressing Enter I saw something like this:

@ubuntumini:~$ xrandr
Screen 0: minimum 320 x 200, current 1024 x 600, maximum 4096 x 4096
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1024x600+0+0 (normal left inverted right x axis y axis) 222mm x 125mm
   1024x600       60.0*+
   800x600        60.3 
   640x480        59.9 

     What this shows is the capabilities of your attached Displays. Screen 0 shows the current capabilities of the PC both minimums, maximums and current. I had no external displays attached so the connector VGA1 shows disconnected. The three resolutions listed below LVDS1 shows the physical resolutions that the display is capable of. In my case the builtin screen is called LVDS1. This is important to remember as you need to name this Display when making changes with XRandR and your Display may have a different name. The important "number" here is the maximum. This shows that the largest Display size you can set is 4096x4096, huge. For my needs I just wanted to increase the Desktop slightly within standard resolutions to 1280x720.

      Once you have the Display name and the minimums and maximums you can enter the following at a terminal command line.

xrandr --fb 1280x720 --output LVDS1 --panning 1280x720

     What this says is set the resolution to 1280x720 on display LVDS1 enable panning at 1280x720. The panning enables the oversized desktop. You can enter any resolutions here that you would like to experiment with, however I would stick with standard monitor resolutions or you could experience unexpected results. BTW, it needs to be said at this point that if you play with these settings and mess up your display, I am not responsible. These settings have worked as shown perfectly for me but your mileage may vary.

      For me, this solved my problem with Evolution and all other applications experiencing the same issues. When I opened Evolution's Preference's it now displayed correctly with all Option settings reachable through scrolling. To set the desktop back I used the following which resets it back to my original settings.

xrandr --fb 1024x600 --output LVDS1 --panning 1024x600

     In my case this is exactly what I wanted. To be able to change the resolution on demand between oversized "panning" and the standard desktop resolution. To make it even simpler I've created a quick launcher for the command in Cairo's GL Dock so I don't even have to enter it in a terminal. Easy Peasy.

     This can be set permanently as the default desktop preference several different ways but that wasn't what I was looking for and will have to be something for a future discussion.

    If you found this tip useful, let me know, leave a comment.

Thanks for stopping by.


  1. Hmmm ... the title is 'Scaling' but you are describing the 'panning' function in xrandr. How about a discussion of using scaling?

  2. Good point. Technically it is Panning.

  3. This is exactly what I was looking for. Used to do the same thing with the xconfig file and ctrl alt +/- but this is easier and simpler.

  4. many thanks, worked as a charm

  5. To scale your laptop screen:
    xrandr --output LVDS1 --scale 1.3x1.3
    will scale a netbook screen from 1024x600 to 1332x760.