If you run a netbook machine like me, you will find the screen resolution options ...um...ah, lacking.
My 'normal' choices are 1024x600; 800x600; or 640x480.
I honestly can't find a reason to use the last two options. I frequently find a need for more real estate with 1280x800 or even the eye squinting 1440x900.
However, if you upgrade to the latest X11 version traditional scaling breaks and the cursor is imprisoned within the confines of your 'normal choices'.
A script was written to deal with this new reality, but sometimes I'm just a point 'n' click sort of guy and so I modified it to suit me.
#!/bin/bash
# Marc Brumlik, Tailored Software Inc,
[email protected]# Wed Jan 2 05:23:54 CST 2013
# newrez v 1.0
# use xrandr to scale the display to a new resolution
# rewriten to handle mouse boundaries when scaled
# this requires setting a new resolution to the unused VGA1 device
# then scaling that for B display on the LVDS1 device
# modified by Moe because he's lazy and doesn't like to type.
umask 000
# resolution can optionally be specified on command line
newrez=$1
# we MUST be running xrandr 1.3 or higher
if xrandr -v | grep "RandR version 1.[012]"
then zenity --info --title="XRandR version is too old" --text="You must be running Xrandr
version 1.3 or newer!
Time to upgrade your system :-)"
exit 0
fi
# find the currently connected devices, make a list
devices=`xrandr -q | grep connected | grep -v disconnected | cut -d"(" -f1`
# there MUST be a "connected" LVDS1 and a "disconnected" VGA1
current=`xrandr -q`
if echo "$current" | grep "LVDS1 connected" >/dev/null
then : OK
else zenity --info --title="PROBLEM" --text="Current display must be LVDS1"; exit 0
fi
if echo "$current" | grep "VGA1 disconnected" >/dev/null
then : OK
else zenity --info --title="IMPORTANT" --text="The VGA1 display resolution may be affected by this change"
fi
default=`echo "$current" | grep -A 1 "^LVDS1" | tail -1 | awk '{print $1}'`
H=`echo $default | cut -d'x' -f1`
V=`echo $default | cut -d'x' -f2`
HZ=`echo $default | awk '{print $2}' | tr -d '[*+]'`
# echo DEFAULT: $default $H $V
title="Resolutions"
text="Default Resolution: $default"
if [ -z "$newrez" ]
then while true
do
newrez=$(zenity --title="$title" --list \
--height=250 --width 250 --text="$text" \
--radiolist --column="X" --hide-column=2 --column="Resolution" --column="Screen Size" \
TRUE default Default \
FALSE 1280x800 "1280 X 800 -- 125%" \
FALSE 1440x900 "1440 X 900 -- 140%" )
# additional settings can be added here
# changing the above ")" to a "\"
# with the last one in the list ending with ")"
# For example:
# FALSE 1440x900 "1440 X 900 -- 140%" \
# FALSE 4096x2400 "4096 X 2400 Maximum" )
case $newrez in
default|[0-9]*x[0-9]*) break ;;
esac
exit 0
done
fi
case $newrez in
default) xrandr --output VGA1 --auto --output LVDS1 --auto
xrandr --output LVDS1 --mode $default --scale 1x1
exit 0 ;;
esac
newH=`echo $newrez | cut -d'x' -f1`
newV=`echo $newrez | cut -d'x' -f2`
modeline=`cvt $newH $newV $HZ | grep Modeline`
newmode=`echo "$modeline" | sed 's/^.*"//'`
cvtrez=`echo "$modeline" | sed -e 's/_.*//' -e 's/^.*"//'`
if [ "$newrez" != "$cvtrez" ]
then newrez=$cvtrez
newH=`echo $newrez | cut -d'x' -f1`
newV=`echo $newrez | cut -d'x' -f2`
fi
scaleH=`echo -e "scale=10\n$newH / $H\nquit" | bc`
scaleV=`echo -e "scale=10\n$newV / $V\nquit" | bc`
if echo "$current" | grep -A 100 "^VGA1" | grep $newrez >/dev/null
then : already there
else xrandr --newmode "$newrez" $newmode
xrandr --addmode VGA1 $newrez
fi
if xrandr --output VGA1 --mode $newrez --output LVDS1 --fb $newrez --scale $scaleH"x"$scaleV 2>&1 | tee -a /tmp/xrandr.err
then : success
else zenity --info --title="Xrandr produced this error" --text="`cat /tmp/xrandr.err`"
The problem could be that Your video driver
does not support xrandr version 1.3
rm -f /tmp/xrandr.err
fi
Save both files and exit the text editor.
If you want a menu option in Preferences....
...and test drive.