Tuesday, January 15, 2013

Changing the Resolution in Ubuntu

Well, after having this set up, I wanted to be able switch resolutions (the screen is really tiny, and it drops the frame-rate of games rather significantly)  I tried all of the standard xorg.conf configuration, addmode, newmode, all of that.  But nothing worked.

Today, I stumbled on a solution:  xrandr's --scale option.  This allows you to scale that screen to almost any resolution you want.

 for example:
  • xrandr -q 
(this returns certain names e.g. mine is DP-2. Another is HDMI-0.  One will say "connected" and that's the one you need.
  • xrandr  --output DP-2 --scale .5x.5 
This scales it to a 1440x900 resolution.

One thing to note.  Sometimes trying to go from one scaled resolution to another will fail with an error.  Don't panic:  just change the scale back to 1x1, and the next scale you choose will work. The scaling numbers don't have to be simple: I managed to get ~1650x1050 by putting the scale value as .5729x.5729.


Here's a link to the script:  https://gist.github.com/4552263/

This script takes one parameter: the width in pixels of your screen.

Sample run:

   sh ./Res.sh 1680

The result is a 1680x1050 scaled screen.

EDIT:  I found a way to fix the trackpad settings.
I followed this advice here:  uselessuseofcat.com/?p=74ls,
but it didn't quite help with the trackpad's tap-click.
I then found this package: gpointing-device-settings

    sudo apt-get install  gpointing-device-settings

This installs a utility that is launched by running
gpointing-device-settings
in the terminal.

This is a graphical configuration for your trackpad, so you should be able to customize your mouse however you want.