Showing posts with label customization. Show all posts
Showing posts with label customization. Show all posts

Friday, April 2, 2010

Panning screen at 1024x768

Sometimes I encountered the problem that I had a dialog on the screen which was too large for the display's native 1024x600 resolution. In windows the EeePC tools offer a panning mode that switches to a virtual 1024x768 resolution where the visible section of the screen follows the mouse pointer. So I thought it must be possible to do the same with xrandr. Some playing around with xrandr was a success. Searching for solutions of others led me to a convenience script:

#!/bin/bash

function pan-mode {
echo `xrandr --prop | grep "current"`
}

function pan-enable {
echo Enabling VGA output
xrandr --output LVDS1 --panning 1024x768
}
function pan-disable {
echo Disabling VGA output
xrandr --output LVDS1 --panning 1024x600
}

### MAIN ###
case $1 in 
on)  pan-enable ;;
off) pan-disable ;;
status)  pan-mode ;;
*)   echo "*usage: $0 on|off|status"    ;;
esac
Create an executable shell script in the bin dir:
  1. gedit ~/bin/panning (then paste the script into the file and save)
  2. chmod a+x ~/bin/panning
Now you can switch with panning on or panning off in the console.


If you want to make the panning default create or edit the file ~/.xprofile and add the following line to it:
xrandr --output LVDS1 --panning 1024x768
Next time you reboot or restart X the screen will be in panning mode.

Window Buttons to the right side

After install of lucid I thought c'mon give it a try with the left hand window buttons but now I have enough. I just can't get used to it. Some search led me to a nice page with screenshots of all needed steps. But it's so easy that for somebody who hasn't just started with ubuntu doesn't need such instructions. It boils down to some metacity settings:

  1. Fire up gconf-editor via ALT-F2
  2. Navigate to apps->metacity->general
  3. Change the value of button_layout to :maximize,minimize,close

In other words: just move the colon from the right side of the button names to left side.