Working Dual Screen for my Aspire One with Fedora 10

OK, so I wanted to use my Aspire One to do presentations. However – getting dual screen to work was quite a lot of work.

I found a simple solution, which I am going to outline step-by-step for your convenience. This is all based on Fedora 10, 32bit, fully updated.

Result will be:

  • External VGA runs with 1024×768 @ 60 Hz, good enough for most projectors out there, with a single click
  • The display of the Aspire stays fully usable
  • The GNOME panels stay on the laptop

So step by step.

First – open a root shell because we will do some evil hacks.

We need to create an xorg.conf file, which normally doesn’t exist. so type

# Xorg -configure :1

Don’t be surprised. Your screen will flicker around. After a few seconds you will find a new file in your directory called xorg.conf.new. Copy tis file to the X11 directory:

# cp xorg.conf.new /etc/X11/xorg.conf

Now we need to make a few changes. First we need to switch down to 16 bit colors, due to the limited graphic memory of my Aspire One. Second we need to create a bigger virtual screen.

So find the section called

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"

Right there add a line with

Default Depth 16

This forces X to use 16bit colors, making sure the extended display will fit in the 8 MB of graphic memory.

Now go down in xorg.conf and find the section

SubSection "Display"
Viewport   0 0
Depth     16
EndSubSection

And add a line with

Virtual 2048 2048

so the whole section looks like this:

SubSection "Display"
Viewport   0 0
Depth     16
Virtual 2048 2048
EndSubSection

OK. Done with that part. Now the next part. We want to make sure that we can switch the layout in a very simple way. I am pragmatic. So no fancy GUI or stuff. What I need is to be able to present. So when I hook up a projector, I want to switch the VGA to a fixed 1024×768 resolution at 60 Hertz. This is compatible with most projectors. So I wrote a little shellscript that also makes sure that the top and bottom panels are at the right place – on my laptop.

I stored this under /usr/local/bin/vgaswitch:

#!/bin/sh
/usr/bin/xrandr | grep "VGA connected"
if [ $? = 0 ] ; then
echo "VGA connected, setting VGA to 1024x768 @ 60 Hz"
/usr/bin/xrandr --output LVDS --auto --output VGA --mode 1024x768 --rate 60 --right-of LVDS
# Now move the panels back to the laptop screen
gconftool-2 --set "/apps/panel/toplevels/bottom_panel/monitor" --type integer "1"
gconftool-2 --set "/apps/panel/toplevels/top_panel/monitor" --type integer "1"
else
echo "No VGA connected, back to single screen"
/usr/bin/xrandr --output LVDS --auto --output VGA --off
# Now move the panels back to the laptop screen
gconftool-2 --set "/apps/panel/toplevels/bottom_panel/monitor" --type integer "0"
gconftool-2 --set "/apps/panel/toplevels/top_panel/monitor" --type integer "0"
fi

Make the script executable with a chmod a+x /usr/local/bin/vgaswitch

The final step is to add a new panel launcher that calls the script. Done.

So now when I hook up a projector, I click on the icon that calls the script and – TADAAA! Remove the VGA cable, click it again, all back to normal. I am happy now 🙂

CC BY 4.0 This work is licensed under a Creative Commons Attribution 4.0 International License.

One thought on “Working Dual Screen for my Aspire One with Fedora 10”

  1. Hi Jan. Thank you for the useful tip.
    On my thinkpad x300 I have to add another line to your script, otherwise the bottom panel moves during the switch to top position. Have no idea why, probably a bug 🙂 Could probably make it conditional, but this is just a special case, anyway:

    — bin/vgaswitch.orig 2009-05-26 08:57:07.000000000 +0200
    +++ bin/vgaswitch 2009-05-26 08:56:53.000000000 +0200
    @@ -7,4 +7,5 @@
    gconftool-2 –set “/apps/panel/toplevels/bottom_panel/monitor” –type integer “1”
    gconftool-2 –set “/apps/panel/toplevels/top_panel/monitor” –type integer “1”
    + gconftool-2 –set “/apps/panel/toplevels/bottom_panel/orientation” –type string “bottom”
    else
    echo “No VGA connected, back to single screen”

    stanislav

Comments are closed.