Custom XRandR settings @ KDE startup
Wednesday, 28. October 2009
In folgendem Beispiel wird konkret gezeigt wie man seinen kleinen Notebookdesktop um einen schönen grossen LCD auf die linke Seite erweitert (Bigdesktop)
xrandr --output LVDS --auto --output VGA-0 --auto --left-of LVDS
Das wars !! ^^ Vorrausgesetzt die Displaybezeichner stimmen. Dies kann man leicht vorher überprüfen durch den Befehl “xrandr“ das Attribut -h hilft !
Wer diese Einstellung permanent mache möchte und sicherstellen will dass diese bei jedem KDE Startup geladen wird erstellt folgende Datei und füllt sie mit nachstehendem Inhalt:
/etc/X11/Xsession.d/45custom_xrandr-settings
# If an external monitor is connected, place it with xrandr # External output may be "VGA" or "VGA-0" or "DVI-0" or "TMDS-1" EXTERNAL_OUTPUT="VGA-0" INTERNAL_OUTPUT="LVDS" # EXTERNAL_LOCATION may be one of: left, right, above, or below EXTERNAL_LOCATION="left" case "$EXTERNAL_LOCATION" in left|LEFT) EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT" ;; right|RIGHT) EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT" ;; top|TOP|above|ABOVE) EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT" ;; bottom|BOTTOM|below|BELOW) EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT" ;; *) EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT" ;; esac xrandr |grep $EXTERNAL_OUTPUT | grep " connected " if [ $? -eq 0 ]; then xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION else xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off fi
Dieses Script bietet einfache Konfigurationsmöglichkeiten und stellt sicher dass X auch startet falls kein zweiter Monitor angeschlossen ist.
Da KDE ein sehr freies Panelmanagment erlaubt kann man überall auf den beiden Screens (versteckte) Panels in verschiedenen Grössen platzieren und viele Vorteile aus einem solchen Setup ziehen. Selbstverständlich ist auch der Positionierung der Plasmoids keine Grenze gesetzt!
