You are not logged in.

#1 2007-08-29 04:17:54

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Xorg auto configuration script for composit

Here's a script I've written which uses z4ziggy's great hwd script to generate xorg.conf and adds needed additions for xorg composite:

#!/bin/bash
hwd -x 2>&1 > /dev/null
XDRIVER=$(hwd -e | while read line
do
    if [ "`echo $line | grep "^VGA"`" != "" ]
    then
        read driverline
        echo $driverline | sed -e "s/ .*//"
        break
    fi
done)

if [ "$XDRIVER" == "" ]
then
    XDRIVER=vesa
fi

cat /etc/X11/xorg.conf.hwd | grep -v Modes | grep -v "Load .*ddc" | grep -v "Option .*DPMS" | grep -v DefaultColorDepth | sed -e "s/Driver .*vesa.*/Driver \"$XDRIVER\"/" > /tmp/xorg.conf 

echo "Section \"Extensions\"" >> /tmp/xorg.conf
echo "   Option \"Composite\" \"true\"" >> /tmp/xorg.conf
echo "EndSection" >> /tmp/xorg.conf

# Now build xorg.conf
rm -f /etc/X11/xorg.conf 2>&1 > /dev/null

cat /tmp/xorg.conf | while read line
do
    echo $line >> /etc/X11/xorg.conf

    if [ "$(echo $line | grep -i "^ *Section.*ServerLayout")" != "" ]
        then
        echo "Option \"AIGLX\" \"true\"" >> /etc/X11/xorg.conf
    fi

    if [ "$(echo $line | grep -i "^ *Section  *\"Device\"")" != "" ] 
    then
                echo "Option \"VBERestore\" \"true\"" >> /etc/X11/xorg.conf
            echo "Option \"DRI\" \"true\"" >> /etc/X11/xorg.conf
            echo "Option \"XAANoOffscreenPixmaps\" \"true\"" >> /etc/X11/xorg.conf
        fi
done

FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

Board footer

Powered by FluxBB