12/04/2007 par Wanders
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-xorgSection “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”
EndSectionSection “Module”
Load “i2c”
Load “bitmap”
Load “ddc”
Load “dri”
Load “extmod”
Load “freetype”
Load “glx”
Load “int10″
Load “vbe”
EndSectionSection “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “fr”
Option “XkbVariant” “latin9″
EndSectionSection “InputDevice”
Identifier “Configured Mouse”
Driver “mouse”
Option “CorePointer”
Option “Device” “/dev/input/mice”
Option “Protocol” “ImPS/2″
Option “Emulate3Buttons” “true”
EndSectionSection “InputDevice”
Identifier “Synaptics Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “HorizScrollDelta” “0″
EndSectionSection “Device”
Identifier “Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller”
Driver “i810″
BusID “PCI:0:2:0″
EndSectionSection “Monitor”
Identifier “Écran générique”
Option “DPMS”
EndSectionSection “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
EndSectionSection “ServerLayout”
Identifier “Default Layout”
Screen “Default Screen”
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “Synaptics Touchpad”
EndSectionSection “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-xorgSection “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”
EndSectionSection “Module”
Load “i2c”
Load “bitmap”
Load “ddc”
Load “dri”
Load “extmod”
Load “freetype”
Load “glx”
Load “int10″
Load “vbe”
EndSectionSection “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “fr”
Option “XkbVariant” “latin9″
EndSectionSection “InputDevice”
Identifier “Configured Mouse”
Driver “mouse”
Option “CorePointer”
Option “Device” “/dev/input/mice”
Option “Protocol” “ImPS/2″
Option “Emulate3Buttons” “true”
EndSectionSection “InputDevice”
Identifier “Synaptics Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “HorizScrollDelta” “0″
EndSectionSection “Device”
Identifier “LCD”
Driver “i810″
Option “MonitorLayout” “CRT,LFP”
Option “DDCMode” “True”
Screen 0
BusID “PCI:0:2:0″
EndSectionSection “Device”
Identifier “CRT”
Driver “i810″
Option “MonitorLayout” “CRT,LFP”
Option “DDCMode” “True”
Screen 1
BusID “PCI:0:2:0″
EndSectionSection “Monitor”
Identifier “LCD”
Option “DPMS”
HorizSync 30 - 81
VertRefresh 56 - 76
EndSectionSection “Monitor”
Identifier “CRT”
Option “DPMS”
HorizSync 30 - 81
VertRefresh 56 - 76
EndSectionSection “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
EndSectionSection “Screen”
Identifier “CRT”
Device “CRT”
Monitor “CRT”
DefaultDepth 24SubSection “Display”
Depth 24
Modes “1280×1024″ “1024×768″ “800×600″ “640×480″
EndSubSection
EndSectionSection “ServerLayout”
Identifier “DualScreen”
Screen 0 “LCD”
Screen 1 “CRT” LeftOf “LCD”
InputDevice “Generic Keyboard”
InputDevice “Configured Mouse”
InputDevice “Synaptics Touchpad”
Option “Xinerama” “true”
EndSectionSection “ServerFlags”
Option “DefaultServerLayout” “DualScreen”
EndSectionSection “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.
Ces articles peuvent aussi vous intéresser !
- Aucuns autres billets sur ce sujet
Faites un Trackback vers ce billet grâce à ce lien
Ajouter ce billet à vos favoris del.icio.us !
Twitter ce billet !















