The Navigatrix has been updated. The new website can be found at

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Updated Netbook Screen Resolution

Joined: 04 Nov 2010, 20:51
Posts: 1062
If you run a netbook machine like me, you will find the screen resolution options, 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.

Give it a whirl; open the terminal:

make a local bin directory if you don't already have one:

mkdir bin

Create the script and Desktop Shortcut:

gedit bin/nxrez Desktop/alilbigger.desktop

Into the first file paste:

# 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

# 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

# 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
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"

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

  text="Default Resolution: $default"

if [ -z "$newrez" ]
   then   while true
         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 ;;
            exit 0

case $newrez in
   default)   xrandr --output VGA1 --auto --output LVDS1 --auto
         xrandr --output LVDS1 --mode $default --scale 1x1
         exit 0 ;;

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`

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

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

Into the second empty file paste:
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=A lil bigger screen
Comment=Change screen resolution for a large/smaller desktop
Exec= ./bin/nxrez

Save both files and exit the text editor.

Make the script executable:

chmod +x bin/nxrez

If you want a menu option in Preferences....
sudo cp Desktop/alilbigger.desktop /usr/share/applications/

...and test drive.

 Post subject: Re: Updated Netbook Screen Resolution
Site Admin

Joined: 05 Nov 2010, 01:00
Posts: 185
I never got this one to run .... but maybe its because i am using the external screen on a desktop computer.

 Post subject: Re: Updated Netbook Screen Resolution

Joined: 04 Nov 2010, 20:51
Posts: 1062
The external monitor I use for the boat is pretty basic and I can't control the backlight, and Redshit/Nightshift can't control it either. But it does have brightness button on the front...and it is 19 inches.

wadda@Baboo:~$ xrandr --prop
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 32767 x 32767
LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 223mm x 125mm
   BACKLIGHT: 9 (0x00000009)   range:  (0,9)
   Backlight: 9 (0x00000009)   range:  (0,9)
   scaling mode:   Full aspect
      supported: None         Full         Center       Full aspect
   1024x600       60.0*+
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 disconnected 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       59.8 
   1440x900       59.9*
as you see the script also has to control the proper video output as well. It might have to be altered for the other output.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Search for:

Credits © 2010 - 2024