How To: Svideo(cloned) / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945 (i810 driver)
*The basic purpose of this is to enable your Svideo-out and also your VGA-out ports on your computer*
I have used this successfully on 32bit Feisty using my i945(i810 driver)
We know it works on the i945, and the i915 for sure; however, i suspect it will work with all i810 driver-using chipsets
Others have successfully used it in Kubuntu,Dapper Drake, Edgy Eft, and even Archlinux
I have a little script that i use to switch inbetween the different xorgs that we will set up.
STEP ONE
run this to create the script:
Code:
sudo gedit /usr/bin/switchmon
credit goes to groggyboy for his modification of my original script, it is now very automated and very nice!!
then paste the following code into the open gedit window:
*note* This script, by default, assumes you are running beryl in gnome. If you are running beryl in KDE, comment out the gnome line and uncomment the KDE line. If you dont run beryl at all, comment out both lines. The reason is - beryl does not work properly with the Xorg file and will crash everytime if it isnt disabled. I have bolded the a few of the lines as an example of where to look. These will have to be edited for every xorg if you do run KDE or no beryl at all.*/note*
Code:
#!/bin/sh
#
cmd=${0##*/} # Command's basename
msg="\n\tUsage: $cmd [1|2|3|4|5]\n\t\t1 = Single Monitor\n\t\t2 = SVideo Dual Monitor\n\t\t3 = Svideo Clone\n\t\t4 = VGA Dual Monitor\n\t\t5 = VGA Clone Desktop"
if [ $# -lt 1 ]; then
echo $msg
exit 0
fi
if [ $1 = "4" ]; then
echo -e "\nChanging to VGA Dual Monitor mode"
# The following two lines are important only if you use Beryl.
# Uncomment the appropriate line for your DE. Comment both out if you don't use Beryl.
mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
sudo cp /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
fi
if [ $1 = "5" ]; then
echo -e "\nChanging to VGA Cloned Desktop mode"
# The following two lines are important only if you use Beryl.
# Uncomment the appropriate line for your DE. Comment both out if you don't use Beryl.
mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
sudo cp /etc/X11/xorg.conf.clone /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
fi
if [ $1 = "3" ]; then
echo -e "\nChanging to S-Video(Clone) mode"
# The following two lines are important only if you use Beryl.
# Uncomment the appropriate line for your DE. Comment both out if you don't use Beryl.
mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
sudo cp /etc/X11/xorg.conf.sclone /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
fi
if [ $1 = "2" ]; then
echo -e "\nChanging to S-Video(Dual) mode"
# The following two lines are important only if you use Beryl.
# Uncomment the appropriate line for your DE. Comment both out if you don't use Beryl.
mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
sudo cp /etc/X11/xorg.conf.svideo /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 2
elif [ $1 = "1" ]; then
echo -e "\nChanging to Single Monitor mode"
# The following two lines are important only if you use Beryl.
# Uncomment the appropriate line for your DE. Comment out both if you don't use Beryl.
mv ~/.config/beryl-manager.off ~/.config/autostart/beryl-manager.desktop # <-GNOME
#mv ~/.kde/beryl-manager.off ~/.kde/Autostart/beryl-manager.desktop # <-KDE
sudo cp /etc/X11/xorg.conf.single /etc/X11/xorg.conf
sudo pkill Xorg
echo
exit 1
else
echo "Invalid Number" $msg
exit 0
fi
then save and exit. we need to make that file executable so it can do its job:
Code:
sudo chmod +x /usr/bin/switchmon
Now we need to create the different xorg.conf files that we will switch between
*note* You will probably have to edit the resolution values in these files to match whatever you are
trying to get, i just use my laptop so im limited to 1280x800 but some people might have bigger monitors or whatever*/note*
STEP TWO
We will copy the xorg.conf to a different named file so we can switch back to it when not using svideo:
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.single
Now we create the svideo dual monitor version of the xorg:
Code:
sudo gedit /etc/X11/xorg.conf.svideo
Paste the following into that window:
Code:
# /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/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
#Load "GLcore"
Load "ddc"
Load "dbe"
#Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
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 "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Device"
Identifier "LCD"
Driver "i810"
Option "MonitorLayout" "TV,LFP"
Screen 0
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "TV"
Driver "i810"
Option "MonitorLayout" "TV,LFP"
Option "TVStandard" "NTSC"
Option "TVOutFormat" "SVIDEO" # "COMPOSITE"
Option "ConnectedMonitor" "TV"
Screen 1
BusID "PCI:0:2:0"
EndSection
Section "Monitor"
Identifier "LCD"
Option "DPMS"
HorizSync 30 - 81
VertRefresh 56 - 76
EndSection
Section "Monitor"
Identifier "TV"
HorizSync 30-50
VertRefresh 60
EndSection
Section "Screen"
Identifier "LCD"
Device "LCD"
Monitor "LCD"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "800x600" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "TV"
Device "TV"
Monitor "TV"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "LCDandTV"
Screen 0 "LCD"
Screen 1 "TV" RightOf "LCD"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
# Option "AIGLX" "true"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "LCDandTV"
EndSection
Now save and close the file.
This creates the svideo xorg that will clone your two screens:
Code:
sudo gedit /etc/X11/xorg.conf.sclone
paste the following into that window:
*note* You may want to copy only from the "Section 'Device'" line and below depending on your hardware, if you have a different mouse or something just make a copy of your current xorg.conf and save it as xorg.conf.svideo and then replace from the Device line below in your file with what ive posted here */note*
Code:
# /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/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
#Load "GLcore"
Load "ddc"
Load "dbe"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
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 "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Device"
Identifier "SVIDEO"
Driver "i810"
Option "MonitorLayout" "TV,LFP"
Option "FlipPrimary" "True"
Option "TVStandard" "NTSC"
Option "TVOutFormat" "SVIDEO"
Option "ConnectedMonitor" "TV"
Option "Clone" "True"
BusID "PCI:0:2:0"
EndSection
Section "Monitor"
Identifier "LCD"
Option "DPMS"
HorizSync 30 - 81
VertRefresh 56 - 76
EndSection
Section "Monitor"
Identifier "TV"
HorizSync 30-50
VertRefresh 60
EndSection
Section "Screen"
Identifier "TV"
Device "SVIDEO"
Monitor "TV"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "LCDandTV"
Screen "TV"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
Option "AIGLX" "true"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "LCDandTV"
EndSection
then save and close the file
Now we create another xorg file for using a cloned desktop (useful for connecting to a projector):
Code:
sudo gedit /etc/X11/xorg.conf.clone
Again, paste the following (and again from the device line and below if you want):
Code:
# /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/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
Load "ddc"
Load "dri"
Load "dbe"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
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 "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Device"
Identifier "Intel"
Driver "i810"
Option "MonitorLayout" "CRT,LFP"
Option "Clone" "true"
Option "DevicePresence" "true"
Option "UseFBDev" "true"
BusID "PCI:0:2:0"
BusID "PCI:0:2:0"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Intel"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x800" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x800" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x800" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x800" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x800" "1024x768" "800x600"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600"
EndSubSection
EndSection
Section "ServerLayout"
Option "AIGLX" "true"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
then save and close the file
Now we create an xorg for using dual monitors as one desktop(using xinerama):
Code:
sudo gedit /etc/X11/xorg.conf.dual
Again, paste the following:
Code:
# /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/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
#Load "GLcore"
Load "ddc"
Load "dbe"
#Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
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 "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
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 "1024x768"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "CRT"
Device "CRT"
Monitor "CRT"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "LCDandCRT"
Screen 0 "LCD"
Screen 1 "CRT" RightOf "LCD"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
Option "Xinerama" "true"
# Option "AIGLX" "true"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "LCDandCRT"
EndSection
#Section "DRI"
# Mode 0666
#EndSection
#Section "Extensions"
# Option "Composite" "Enable"
#EndSection
save the file and close
STEP THREE
Now we should have 5 different xorg.conf files:
xorg.conf.single
xorg.conf.dual
xorg.conf.clone
xorg.conf.svideo
xorg.conf.sclone
The script we created at the beginning will switch between these, the xorg.conf.single is the file that you were currently using when you started. To switch between them its very simple:
from the terminal run
And it displays the script usage parameters, for example running:
will close beryl and swap out your current xorg.conf with the svideo xorg.conf and then restart X
*note1*Also, sometimes after switching between two many xorg right in a row (i.e. running switchmon 1, then restart x, then switchmon 2, then restart x, then switchmon 4, then restart x, etc) for me sometimes X would just give an error about not being able to start, in these cases i could only get back into X by rebooting, just FYI */note1*
*note2* If something goes horribly wrong and you cant boot into X at all, just run 'switchmon 1' this will restore your original single monitor xorg.conf and you can try ctrl+alt+backspace or just reboot after that and you should be back in business (this has helped me many times) */note2*
*note3* if you have an issue about not being able to drag images to certain parts of your dual screen, try running (credit goes to Veloce for the fix):
Code:
sudo rm -r ./.gconf/desktop/gnome/screen
*/note3*
EXTRA - Create Gnome Launcher
Rather than open the terminal to run the 'switchmon' script everytime you need to change you xorg, it is much easier to create a launcher. You could create a launcher to run any switchmon you want. For example 'switchmon 1' or 'switchmon 4'. The launcher I created basically gives all the 'switchmon' configurations in one window. However you could substitute my command with any 'switchmon' like I said.
To start, right-click on the desktop and hit 'Create Launcher'. This brings up a window with a few options. The 'Name' and 'Comment' boxes are what show up when you hover the mouse over the new launcher. I would suggest typingin the 'Name' box and
Code:
Switch between Svideo and VGA output
In the 'Comment' box.
Next, in the 'Command' box paste the following, or if you know you will always want to run 'switchmon 2' then replace the 'Command' box with whatever you will be running. The following is the command I use:
Code:
xterm -e /bin/bash -c "switchmon; sudo -s"
*note* This merely shows you what switchmon can do and leaves you at a terminal prompt. You will still have to type 'switchmon 2', for example, to run the script */note*
For the icon you can click the button that says 'no icon' and choose one that you like the one I use is found here:
Code:
/usr/share/icons/gnome/48x48/apps/gdm.png
ISSUES WITH BLUE VIDEO ON OUTPUT IN CLONE MODE
Here are the fixes for MPlayer, KMPlayer, totem-gstreamer, and totem-xine. (have not figured out a fix for VLC yet)
some of this was taken from a gandalfn tutorial that I used ages ago:
-> if you are using MPlayer or KMPlayer :
launch Mplayer and go to 'Preferences' > 'Video' and from the available drivers select 'X11 (XImage/SHM)'
-> if you have totem-gstreamer :
launch gstreamer-properties and select on default video playback “XWindow (NoXv)” in video tab.
-> if you have totem-xine :
edit ~/.gnome2/totem_config and find this line:
and replace it with
Hopefully this helps someone, im no Xorg expert so i will try to answer any problems that will probably arise but this works for me after many days of hunting obscure settings from the forums.. Please let me know if it works/doesnt and maybe i have a typo somewhere.
Good luck
-The King
Bookmarks