Home‎ > ‎Tom's Ideas And Notes‎ > ‎

Fedora 10 External Monitor on my Asus EeePC

posted Jan 30, 2009, 7:06 PM by Tom Gutwin   [ updated Feb 20, 2009, 7:10 PM ]
I got around to trying the external monitor port on my EeePC 1000.  It worked but I had to play with the settings because the GNOME System>>Preferences>>Hardware>>Screen Resolution did not seem to change the external monitor.   I had to use the command line tool xrandr to get where I needed to go.

Here is a script that calls xrandr once for each monitor (the LCD Screen and the VGA external port)...

#!/bin/bash
xrandr --output VGA --mode 1024x768 -r 60 --pos 0x0
xrandr --output LVDS --mode 1024x600 -r 65 --pos 0x0
# use  xrandr --output VGA --off
# to go back to normal


This gets both displays on at a time

Here is a toggle script that I have mapped to my F8 key.
II am using the xbindkeys app to do the key binding.

#!/bin/bash
# this cycles through three states for the lcd/vga external display
#  1) LCD only
#  2) LCD and VGA diisplayed
#  3) VGA Only
# This script is bount to the Control F8 key using xbindkey app

if [ -f ~/.lcdOn ]; then
    if [ -f ~/.vgaOn ]; then
        # current state is 2) VGA only
        # next state is 3) VGA only
        xrandr --output VGA --mode 1024x768 -r 60 --pos 0x0
        xrandr --output LVDS --off
        touch ~/.vgaOn
        rm ~/.lcdOn
    else
        # current state is 1) LCD only
        # next state is 2) LCD & VGA
        xrandr --output VGA --mode 1024x768 -r 60 --pos 0x0
        xrandr --output LVDS --mode 1024x600 -r 65 --pos 0x0
        touch ~/.vgaOn
        touch  ~/.lcdOn
    fi
else
    if [ -f ~/.vgaOn ]; then
        # current state is 3) VGA only
        # next state is 1) LCD only
        xrandr --output VGA --off
        xrandr --output LVDS --mode 1024x600 -r 65 --pos 0x0
        rm ~/.vgaOn
        touch  ~/.lcdOn
    else
        #nothing has been setup so just have the LCD on
        xrandr --output VGA --off
        xrandr --output LVDS --mode 1024x600 -r 65 --pos 0x0
        rm ~/.vgaOn
        touch  ~/.lcdOn
    fi
fi


Each time you run it it toggles between 3 states  LCD/LCD&External/ExternalOnly
Comments