Announcement

Collapse
No announcement yet.

Two desktops in KDE 4, aka Dual Head, Quad Head, Multiple X sessions [Solved]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Two desktops in KDE 4, aka Dual Head, Quad Head, Multiple X sessions [Solved]

    I've been happily running Hardy for it's whole life, and it works very well. I have a multi monitor setup, to work on projects with several interrelated components easily.

    3 displays, two working in Twinview mode, 1 independent, plus a projector. Two dual head 8600GT cards.

    I find two 22" monitors side by side is enough to work on, trying to use three just gives you a sore neck because you have to rotate across so far. So I like to have the third monitor on a different desktop, and look at it directly when I want to focus on mail. I occasionally run a movie or mythtv or presentation on the projector. I dont want one monster KDE Desktop stretched across all four. Your situation will be different, but similar principles might apply.

    As is well documented here
    http://forum.kde.org/viewtopic.php?f...12180&start=10
    KDE 4 doesn't yet support multiple X sessions, whereas KDE 3 did it out of the box.

    That links to a solution here
    http://en.gentoo-wiki.com/wiki/X.Org...ead_in_KDE_4.2
    which is a very good solution.

    I found icewm was a bit ugly. Openbox looks better, more KDE like, and allows moveable, resizeable windows.
    If you want to check out what it's going to behave like before you add another display, see this good post on Xnest
    http://www.debian-administration.org...e_X11_sessions

    If you want to play with different window managers, copy the list of packages after 'the following NEW packages will be installed' from your sudo apt-get install line. Use sudo apt-get remove (list). Then you can easily remove them when you don't like the window manager, without leaving megabytes of cruft on your system. xfce doesn't play nicely with KDE, it wants to be a complete desktop, and the window manager bit wont seem to start on it's own. There must be a way and a reason, but I couldn't easily locate it.

    So my Kubuntu specific solution was

    Code:
    # Install Openbox window manager
    sudo apt-get install openbox
    # Create a shell script to start Openbox on the second X session after kde starts.
    echo 'DISPLAY=":0.1" openbox &' > ~/.kde/Autostart/StartSecondWindowManager.sh
    echo 'DISPLAY=":0.2" openbox &' > ~/.kde/Autostart/StartThirdWindowManager.sh
    # Make the shell scripts executable
    chmod u+x ~/.kde/Autostart/Start*.sh

    Hope this helps someone
    David.


    ps
    My xorg.conf was already setup correctly, with the correct screen numbers, see the ServerLayout section.

    Code:
    # /etc/X11/xorg.conf (xorg X Window System server configuration file)
    #
    # Super hand tuned Xorg file by DMc
    #
    # Currently runs triple display on two dual head nvidia cards
    #
    # Copyright 2008 McPond Software 
    #
    #  This file is free software: you can redistribute it and/or modify
    #  it under the terms of the GNU General Public License as published by
    #  the Free Software Foundation, either version 3 of the License, or
    #  (at your option) any later version.
    #
    #  This file is distributed in the hope that it will be useful,
    #  but WITHOUT ANY WARRANTY; without even the implied warranty of
    #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    #  GNU General Public License for more details.
    #
    # 1.0 Start from base file, rip out wacom tablet stuff, I dont have one
    #   Reorder sections, add dual head setup
    #   >>> Gives 
    #        Fatal server error:
    #        Requested Entity already in use!
    # 1.1 Reading further... TwinView mode on nv open source driver
    # 1.2 After Feisty upgrade will not start on nVidia, change back to nv
    #      until can get it running, then recheck with tools
    #      and of course nv doesnt support Twinview?
    # 1.3 Add more button support for Razor Copperhead
    # 1.4 Envy for Fiesty with help from nvidia-xconfig
    # 1.5 Enable dual head again
    # 1.6 Change to 20" Viewsonic
    # 1.7 Kernel update to 2.6.20 breaks nvidia again. 
    #   Change to nv to get started
    #   Run envy, then change back to unaltered xorg file
    # 1.8 New nVidia 8600GT graphics card with dual DVI output
    #   Required latest nVidia drivers 100.41.100
    # 1.9 New Samsung SyncMaster 226BW 22" wide screen LCD
    # 2.0 Hardy Heron 8.04 major upgrade. New envyng 1.1.1
    #   New nvidia installer 173 version
    # 2.1 Kernel update 2.6.24-18 Wont start after
    #   Disabled two empty font paths, disabled type1 as it wasnt loading
    #   Ran envy but boot crashes with Fatal server error Caught signal 4 server aborting libGLcore.so.1
    #   Envy only reporting installer v169. It wont do 173 as thats beta
    #   Yes, installed 173 manually. Seems 169 does not work on this system
    #   Run NVIDIA(blah).run to setup
    # 2.2 Add Asus Geforce 7200GS card in second PCI-E 16x slot
    #   Needed help from nvidia-xconfig to get both to run
    #   The screen IDs are not accumulative, that means, for each physical card, the screen ID starts with 0 again.
    #   It treats the 7200 as 'primary' probably because it has a lower bus number
    #     meaning you have to login to that screen. Tool panel can be moved to any screen.
    # 2.3 Attempting to get Compiz to run
    #     Composite extension not found
    #     You must use XOrg >= 6.8 for translucency and shadows to work
    #     No, it was because OpenGL does not work on Xinerama
    # 2.4 opengl glx will not run on this config, seems it doesnt really like xinerama
    #      test with glxinfo or glxgears or blender or k3d
    #      This config is two X displays, twinview on the right with both screens, single on the left, both work with GLX
    #      The X displays are seperate. Mouse bridges, but apps and windows don't. Cant have firefox in both at the same time.
    #      7200 does 3,000fps on glxgears, 8600 does 12,000fps
    #   swap leftof to rightof for twinview options to make projector off left side       
    # 2.5 Switch projector to seperate X session, so left screen does not overflow left or right
    # 2.6 Change 7200GS to matching 8600GT
    # 3.0 Lucid 10.04
    #      XServer now 7.5 or later approx
    #      No hardware changes
    #      nVidia 196.30.xx driver via Jockey
    #      New format following X sample generated with X -configure
    
    #
    # Index:
    # ServerLayout
    # Files
    # Module
    # InputDevices
    
    # Vendor
    # Monitors x 4
    # Device - Left
    # Device - Right
    # Screen - Left
    # Screen - Right
    
    # Extensions
    #
    #
    # Notes:
    # Server Flags must go before Server Layout
    
    # Server layout ties it all together
    
    Section "ServerLayout"
    	Identifier   "Quad Head Layout"
    	# Centre and Right Displays in Twinview mode on 8600GT
    	# Twinview can utilise OpenGL
    	Screen   0 "CentreScreen" 0 0
    	# Dont use LeftOf on same screen twice, you get two screens doing the same thing.
    	# Left Display
    	Screen   1 "LeftScreen" LeftOf  "CentreScreen"
    	# Projector
    	Screen   2 "Projector"  LeftOf  "LeftScreen"
    	# Dont use Xinerama and Twinview at the same time.
    	#  Option     "Xinerama" "On"
    
    	InputDevice  "Ergonomic4000" "CoreKeyboard"
    	InputDevice  "Logitech" "CorePointer"
    EndSection
    
    Section "Files"
    	ModulePath  "/usr/lib/xorg/modules"
    	FontPath   "/usr/share/fonts/X11/misc"
    #	FontPath   "/usr/share/fonts/X11/cyrillic"
    	FontPath   "/usr/share/fonts/X11/100dpi/:unscaled"
    	FontPath   "/usr/share/fonts/X11/75dpi/:unscaled"
    	FontPath   "/usr/share/fonts/X11/Type1"
    	FontPath   "/usr/share/fonts/X11/100dpi"
    	FontPath   "/usr/share/fonts/X11/75dpi"
    	FontPath   "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    	FontPath   "built-ins"
    EndSection
    
    Section "Module"
    	Load "dri"
    	Load "extmod"
    	Load "record"
    	Load "dbe"
    	Load "glx"
    	Load "dri2"
    EndSection
    
    Section "InputDevice"
    	Identifier "Ergonomic4000"
    	Driver   "kbd"
    EndSection
    
    Section "InputDevice"
    	Identifier "Logitech"
    	Driver   "mouse"
    	Option	  "Protocol" "auto"
    	Option	  "Device" "/dev/input/mice"
    	Option	  "ZAxisMapping" "4 5 6 7"
    EndSection
    
    
    # Samsung SyncMaster 226BW - Right - 22"
    Section "Monitor"
    	Identifier   "SyncMaster-226BW"
    	VendorName   "Samsung"
    	ModelName   "226BW"
    	HorizSync    30.0 - 81.0
    	VertRefresh   56.0 - 75.0
    	Option     "DPMS"
    # More Options...
    EndSection
    
    # Viewsonic Centre Screen 20"
    Section "Monitor"
    	Identifier	"Viewsonic-VG2021m"
    	VendorName	"Viewsonic"
    	ModelName	"VG2021m"
    	Option		"DPMS"
    	HorizSync	28-65
    	VertRefresh	57-63
    # More Options...
    EndSection
    
    # Samsung Left Screen 24"
    Section "Monitor"
    	Identifier	"SyncMaster-245B"
    	VendorName   "Samsung"
    	ModelName	"245B"
    	Option		"DPMS"
    	HorizSync	30-81
    	VertRefresh	56-75
    # More Options...
    EndSection
    
    # Sony Projector on Rear wall
    Section "Monitor"
    	Identifier	"SonyProjectorVPL-CX70"
        VendorName   "Sony"
    	ModelName	"VPL-CX70"
        # 400Mhz Maximum pixel clock
        # Native 1024 x 768, max 1400 x 1050, 4:3 aspect
    	Option		"DPMS"
        HorizSync	92
    	VertRefresh	92
    # More Options...
    EndSection
    
    
    # Graphics device description
    # nVidia GeForce 8600GT  
    # Device section is for the video card
    # One section per head
    Section "Device"
    	Identifier   "Left nVidia 8600GT"
    	Driver     "nvidia"
    # For use after kernel upgrades kills nVidia proprietory
    # Also turn off RightScreen
    #  Driver     "nv"
    	VendorName   "NVIDIA Corporation"
    	BoardName    "G84 GeForce 8600GT"
    
    #  PCI-Express 16x bus
    	BusID	  	"PCI:7:0:0"
    	Screen		0
    
    # Options...
    	Option "TwinView" "True"
    	Option "TwinViewOrientation" "RightOf"  # can also be LeftOf Above Below Clone
    	Option "UseEdidFreqs" "True"
    	Option "MetaModes" "DFP-0: 1400x1050, DFP-1: 1680x1050"
    	# DFP-0 is lower connector. DFP-1 is upper connector
    #    # Even though the SyncMaster and the Viewsonic are 1050, the Viewsonic is 10mm taller. Syncmaster has a finer dot pitch, but less physical real estate
    	Option "UseDisplayDevice" "DFP-0, DFP-1" 
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option   "SWcursor"      	# [<bool>]
        #Option   "HWcursor"      	# [<bool>]
        #Option   "NoAccel"      	# [<bool>]
        #Option   "ShadowFB"      	# [<bool>]
        #Option   "UseFBDev"      	# [<bool>]
        #Option   "Rotate"       	# [<str>]
        #Option   "VideoKey"      	# <i>
        #Option   "FlatPanel"     	# [<bool>]
        #Option   "FPDither"      	# [<bool>]
        #Option   "CrtcNumber"     	# <i>
        #Option   "FPScale"      	# [<bool>]
        #Option   "FPTweak"      	# <i>
        #Option   "DualHead"      	# [<bool>]
    EndSection
    
    Section "Device"
    	Identifier   "West Left nVidia 8600GT"
    	Driver     "nvidia"
    	VendorName   "NVIDIA Corporation"
    	BoardName    "G84 GeForce 8600GT"
    	# Outer PCI-Express 16x Bus
    	BusID	  "PCI:2:0:0"
    	Screen     0
    #    # Options...
    	# Lower connector
    	Option "UseDisplayDevice" "DFP-0"
    EndSection
    
    Section "Device"
    	Identifier   "West Far Left nVidia 8600GT"
    	Driver     "nvidia"
    	VendorName   "NVIDIA Corporation"
    	BoardName    "G84 GeForce 8600GT"
    	# Outer PCI-Express 16x Bus
    	BusID	  "PCI:2:0:0"
    	Screen     1
    	# Options...
    	# Upper connector with DVI to VGA converter
    	Option "UseDisplayDevice" "CRT-0" 
    EndSection
    
    
    
    Section "Screen"
    	Identifier   "CentreScreen"
    	Device     "Left nVidia 8600GT"
    	Monitor    "Viewsonic-VG2021m"
    	# Compositing manager
    	Option     "RenderAccel" "true"
    	Option     "TripleBuffer" "true"
        # Not needed on modern X servers	Option     "AllowGLXWithComposite"
    	Option     "DPMS" "true"
    	DefaultDepth  24
    	SubSection   "Display"
    		Viewport  0 0
    		Depth    24
    		Modes   "1400x1050"
    	EndSubSection
    EndSection
    
    Section "Screen"
    	Identifier	"LeftScreen"
    	Device		"West Left nVidia 8600GT"
    	Monitor     "SyncMaster-245B"
    	# Compositing manager
    	Option     "RenderAccel" "true"
    	Option     "TripleBuffer" "true"
    	Option     "AllowGLXWithComposite"
    	Option     "DPMS" "true"
    	DefaultDepth	24
    	SubSection "Display"
    		Viewport  0 0
    		Depth		24
    		Modes		"1920x1200"
    	EndSubSection
    EndSection
    
    Section "Screen"
    	Identifier	"Projector"
    	Device		"West Far Left nVidia 8600GT"
    	Monitor 	"SonyProjectorVPL-CX70"
    	# Compositing manager
    	Option     "RenderAccel" "true"
    	Option     "TripleBuffer" "true"
    	Option     "AllowGLXWithComposite"
    	Option     "DPMS" "true"
    	DefaultDepth	24
    	SubSection "Display"
    		Viewport  0 0
    		Depth		24
    		Modes		"1024x768"
    	EndSubSection
    EndSection
Working...
X