#!/bin/sh # a script to wrap startx with single- or dual-head # server layout chooser since using generic vesa/vga-based # xorg.conf fails with dualhead chips (not dual-card setup) # because vga or vesa grabs the whole chip and e.g. radeon # configured for Screen1 will bail out taking the whole server # down; you should have preconfigured ServerLayout "DualHead" # # by Michael Shigorin , 2006 # use freely CARDS="`x11createconfig -c | grep ^card: | wc -l`" || { echo "$0: x11createconfig failed" >&2 exit 1 } case $CARDS in 2) LAYOUT="-layout DualHead";; *) LAYOUT=;; esac # try to do plain startx just in case; # needs fixed startx, see ALT bug #10245 startx -- $LAYOUT || startx