YAKA Créations : CV | YAKA | BETA | GALERIE | mini BLOG

12/04/2007 par Wanders

No Gravatar

C’est maintenant chose faite grace à Xinerama et aux conseils de JB un nouveau collègue.



Comme je suis sur un portable qui a un deuxième écran au bureau je me suis fais un petit switcher afin de passer de la configuration bi écran à la configuration mono écran sur le portable.

Vous trouverez ci dessous mes fichiers de configurations Xorg ainsi que le switcher.

xorg.conf.laptop

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type “man /etc/X11/xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section “Files”
        FontPath        “/usr/share/fonts/X11/misc”
        FontPath        “/usr/X11R6/lib/X11/fonts/misc”
        FontPath        “/usr/share/fonts/X11/cyrillic”
        FontPath        “/usr/X11R6/lib/X11/fonts/cyrillic”
        FontPath        “/usr/share/fonts/X11/100dpi/:unscaled”
        FontPath        “/usr/X11R6/lib/X11/fonts/100dpi/:unscaled”
        FontPath        “/usr/share/fonts/X11/75dpi/:unscaled”
        FontPath        “/usr/X11R6/lib/X11/fonts/75dpi/:unscaled”
        FontPath        “/usr/share/fonts/X11/Type1″
        FontPath        “/usr/X11R6/lib/X11/fonts/Type1″
        FontPath        “/usr/share/fonts/X11/100dpi”
        FontPath        “/usr/X11R6/lib/X11/fonts/100dpi”
        FontPath        “/usr/share/fonts/X11/75dpi”
        FontPath        “/usr/X11R6/lib/X11/fonts/75dpi”
        # path to defoma fonts
        FontPath        “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”
EndSection

Section “Module”
        Load    “i2c”
        Load    “bitmap”
        Load    “ddc”
        Load    “dri”
        Load    “extmod”
        Load    “freetype”
        Load    “glx”
        Load    “int10″
        Load    “vbe”
EndSection

Section “InputDevice”
        Identifier      “Generic Keyboard”
        Driver          “kbd”
        Option          “CoreKeyboard”
        Option          “XkbRules”      “xorg”
        Option          “XkbModel”      “pc105″
        Option          “XkbLayout”     “fr”
        Option          “XkbVariant”    “latin9″
EndSection

Section “InputDevice”
        Identifier      “Configured Mouse”
        Driver          “mouse”
        Option          “CorePointer”
        Option          “Device”                “/dev/input/mice”
        Option          “Protocol”              “ImPS/2″
        Option          “Emulate3Buttons”       “true”
EndSection

Section “InputDevice”
        Identifier      “Synaptics Touchpad”
        Driver          “synaptics”
        Option          “SendCoreEvents”        “true”
        Option          “Device”                “/dev/psaux”
        Option          “Protocol”              “auto-dev”
        Option          “HorizScrollDelta”      “0″
EndSection

Section “Device”
        Identifier      “Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller”
        Driver          “i810″
        BusID           “PCI:0:2:0″
EndSection

Section “Monitor”
        Identifier      “Écran générique”
        Option          “DPMS”
EndSection

Section “Screen”
        Identifier      “Default Screen”
        Device          “Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller”
        Monitor         “Écran générique”
        DefaultDepth    24
        SubSection “Display”
                Depth           1
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           4
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           8
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           15
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           16
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           24
                Modes           “1400×1050″
        EndSubSection
EndSection

Section “ServerLayout”
        Identifier      “Default Layout”
        Screen          “Default Screen”
        InputDevice     “Generic Keyboard”
        InputDevice     “Configured Mouse”
        InputDevice     “Synaptics Touchpad”
EndSection

Section “DRI”
        Mode    0666
EndSection

xorg.conf.office

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type “man /etc/X11/xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section “Files”
        FontPath        “/usr/share/fonts/X11/misc”
        FontPath        “/usr/X11R6/lib/X11/fonts/misc”
        FontPath        “/usr/share/fonts/X11/cyrillic”
        FontPath        “/usr/X11R6/lib/X11/fonts/cyrillic”
        FontPath        “/usr/share/fonts/X11/100dpi/:unscaled”
        FontPath        “/usr/X11R6/lib/X11/fonts/100dpi/:unscaled”
        FontPath        “/usr/share/fonts/X11/75dpi/:unscaled”
        FontPath        “/usr/X11R6/lib/X11/fonts/75dpi/:unscaled”
        FontPath        “/usr/share/fonts/X11/Type1″
        FontPath        “/usr/X11R6/lib/X11/fonts/Type1″
        FontPath        “/usr/share/fonts/X11/100dpi”
        FontPath        “/usr/X11R6/lib/X11/fonts/100dpi”
        FontPath        “/usr/share/fonts/X11/75dpi”
        FontPath        “/usr/X11R6/lib/X11/fonts/75dpi”
        # path to defoma fonts
        FontPath        “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”
EndSection

Section “Module”
        Load    “i2c”
        Load    “bitmap”
        Load    “ddc”
        Load    “dri”
        Load    “extmod”
        Load    “freetype”
        Load    “glx”
        Load    “int10″
        Load    “vbe”
EndSection

Section “InputDevice”
        Identifier      “Generic Keyboard”
        Driver          “kbd”
        Option          “CoreKeyboard”
        Option          “XkbRules”      “xorg”
        Option          “XkbModel”      “pc105″
        Option          “XkbLayout”     “fr”
        Option          “XkbVariant”    “latin9″
EndSection

Section “InputDevice”
        Identifier      “Configured Mouse”
        Driver          “mouse”
        Option          “CorePointer”
        Option          “Device”                “/dev/input/mice”
        Option          “Protocol”              “ImPS/2″
        Option          “Emulate3Buttons”       “true”
EndSection

Section “InputDevice”
        Identifier      “Synaptics Touchpad”
        Driver          “synaptics”
        Option          “SendCoreEvents”        “true”
        Option          “Device”                “/dev/psaux”
        Option          “Protocol”              “auto-dev”
        Option          “HorizScrollDelta”      “0″
EndSection

Section “Device”
        Identifier “LCD”
        Driver “i810″
        Option “MonitorLayout”  “CRT,LFP”
        Option “DDCMode” “True”
        Screen 0
        BusID “PCI:0:2:0″
EndSection

Section “Device”
        Identifier “CRT”
        Driver “i810″
        Option “MonitorLayout”  “CRT,LFP”
        Option “DDCMode” “True”
        Screen 1
        BusID “PCI:0:2:0″
EndSection

Section “Monitor”
        Identifier      “LCD”
        Option          “DPMS”
        HorizSync       30 - 81
        VertRefresh     56 - 76
EndSection

Section “Monitor”
        Identifier      “CRT”
        Option          “DPMS”
        HorizSync       30 - 81
        VertRefresh     56 - 76
EndSection

Section “Screen”
        Identifier      “LCD”
        Device          “LCD”
        Monitor         “LCD”
        DefaultDepth    24
        SubSection “Display”
                Depth           1
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           4
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           8
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           15
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           16
                Modes           “1400×1050″
        EndSubSection
        SubSection “Display”
                Depth           24
                Modes           “1400×1050″ “1280×1024″ “1024×768″ “800×600″
        EndSubSection
EndSection

Section “Screen”
        Identifier      “CRT”
        Device          “CRT”
        Monitor         “CRT”
        DefaultDepth    24

        SubSection “Display”
                Depth   24
                Modes   “1280×1024″ “1024×768″ “800×600″ “640×480″
        EndSubSection
EndSection

Section “ServerLayout”
        Identifier      “DualScreen”
        Screen          0 “LCD”
        Screen          1 “CRT” LeftOf “LCD”
        InputDevice     “Generic Keyboard”
        InputDevice     “Configured Mouse”
        InputDevice     “Synaptics Touchpad”
        Option “Xinerama” “true”
EndSection

Section “ServerFlags”
        Option          “DefaultServerLayout” “DualScreen”
EndSection

Section “DRI”
        Mode    0666
EndSection

Swither

#!/bin/bash
#
cmd=${0##*/} # Command’s basename
msg=” \tUsage: $cmd [1|2] \t\t1 = 1 for laptop, 2 for office conf”
if [ $# -lt 1 ]; then
echo $msg
exit 0
fi
if [ $1 = "1" ]; then
echo -e ” Mode Office”
sudo cp /etc/X11/xorg.conf.laptop /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
fi
if [ $1 = "2" ]; then
echo -e ” Mode Dual”
sudo cp /etc/X11/xorg.conf.office /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
fi

Powered by ScribeFire.

Share/Save/Bookmark

Ces articles peuvent aussi vous intéresser !

  • Aucuns autres billets sur ce sujet
Ce billet appartient à la catégorie : Linux & *BSD

trackback iconFaites un Trackback vers ce billet grâce à ce lien
rss iconAbonnez vous aux Flux RSS des commentaires
deliciousAjouter ce billet à vos favoris del.icio.us !
twitterTwitter ce billet !
Laisser un commentaire

This site is using OpenAvatar based on