Author Topic: Howto Install 2 Screens with 2 Window Managers  (Read 1105 times)

Offline bluegroper

  • Full Member
  • ***
  • Posts: 205
Howto Install 2 Screens with 2 Window Managers
« on: December 19, 2011, 08:29:05 PM »
Since others have asked, here's some brief notes.  (If any steps missing, I'll try to edit later).
There's no real magic involved, just the usual unix/linux ways of combining available tools together in a useful manner.
Of course there's other ways to do this, but this way seems easy and it works.
Kudos and thanks to Texstar for making this possible with PCLOS.

Setup computer with 2 graphics cards, or use mobo graphics plus 1 graphics card.
Connect and turn on both monitors before turning on system unit.  (Trap for newbies).
Fix any BIOS settings as needed.
Bootup PCLOS
Use lspci to get the PCI addresses of video inferfaces. (Needed later).

Install usual PCLOS with KDE
Install icewm (maybe also icewm-light) using synaptic
Use Control Center and make sure hardwares includes 2 videocards

Fix your /etc/X11/xorg.conf to configure 2 screens. (This is prolly the hardest part, so some patience needed.)
Don't forget to backup xorg.conf before any manual editing, otherwise disappointment is assured.  You have been warned.
Here's a copy of my xorg.conf. (I'm sure this code can be improved, but it works, so I don't bother to try and fix it.)
This file includes the hardware and PCI address details referenced above.
Adjust screen arrangement to suit personal taste.

Code: [Select]
# File generated by XFdrake (rev )

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "ServerLayout"
    Identifier "layout1"
    Screen "screen0"
    Screen "screen1" Leftof "screen0"
    #Option "Xinerama"
EndSection

Section "ServerFlags"
    Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
EndSection

Section "Module"
    Disable "dri"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "glx" # 3D layer
EndSection

Section "Monitor"
    Identifier "monitor0"
    VendorName "Plug'n Play"
    ModelName "L1954TQ"
    HorizSync 30-71
    VertRefresh 56-75
    
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630
    
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Plug'n Play"
    ModelName "L1954TQ"
    HorizSync 30-71
    VertRefresh 56-75
    
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630
    
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection

Section "Device"
    Identifier "device0"
    VendorName "nVidia Corporation"
    BoardName "NVIDIA GeForce 6100 and later"
    Driver "nvidia"
    BusID "PCI:3:0:0"
    Option "DPMS"
    Option "DynamicTwinView" "false"
    Option "AddARGBGLXVisuals"
EndSection

Section "Device"
    Identifier "device1"
    VendorName "nVidia Corporation"
    BoardName "NVIDIA GeForce 6100 and later"
    Driver "nvidia"
    BusID "PCI:2:0:0"
    Option "DPMS"
    Option "DynamicTwinView" "false"
    Option "AddARGBGLXVisuals"
EndSection

Section "Screen"
    Identifier "screen0"
    Device "device0"
    Monitor "monitor0"
    DefaultColorDepth 24
    Subsection "Display"
        Depth 24
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
    Subsection "Display"
        Depth 24
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection

When I switch on this workstation, I like to automagically login to KDE and have usual PCLOS on Screen0.
Also launch Windoze XP maximized (aka FullScreen) on Screen1 using icewm.
Then I have KDE desktop on Screen0, and WindozeXP (launched by icewm) on Screen1, before touching any keys or rodent.
Before anyone asks, Yes you can cut 'n paste using the clipboard between screens.

Add this file to $HOME/.kde4/Autostart/icewmstart.sh (and make it executable).
This gets KDE to start the ice window manager on second display (ie second monitor).

Code: [Select]
#!/bin/bash
DISPLAY=":0.1" icewm-session &

Add this file to $HOME/.icewm/startup (and make it executable).
This gets icewm to autostart virtualized WinXP

Code: [Select]
#!/bin/bash
/usr/bin/VBoxManage startvm WinXP &

Disclaimer.
Use only with adult supervision.
I share these notes, and ask any interested reader to consider the terms of usual BSD licence.
Do with these notes whatever you feel like, but don't blame me if something breaks or your house burns down.

Enjoy.   ;)
« Last Edit: December 20, 2011, 03:15:06 PM by bluegroper »

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #1 on: December 19, 2011, 09:18:40 PM »
Thanks, bluegroper.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #2 on: December 20, 2011, 07:23:30 AM »
Thanks.
(Really, just a note so I can keep access to this thread ;)).

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15316
  • ┌∩┐(◕_◕)┌∩┐
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #3 on: December 20, 2011, 07:30:03 AM »
Thanks for taking the time and effort to provide the forum with this bluegroper - very kind.
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #4 on: December 20, 2011, 07:57:04 AM »
Thanks.
(Really, just a note so I can keep access to this thread ;)).

Saying thanks may also be a reason....  :D else you can just press the "notify"-button

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10686
  • MLUs Forever!
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #5 on: December 20, 2011, 09:51:53 AM »
Nice clear write-up!  Thank you.  ;)

I have one question ..... is the use of IceWM only to keep the resources light, or is there some other reason?
Would there be some form of conflict if KDE was used on the second monitor?
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #6 on: December 20, 2011, 10:22:09 AM »
Would it be possible to assign one mouse to each monitor (so that it's possible that there are 2 mouses connected to the system)
=> that way, it would be possible to make some really cheap sem-multi-user system (or are there better solutions for that?)

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #7 on: December 20, 2011, 10:51:35 AM »
Thanks.
(Really, just a note so I can keep access to this thread ;)).

Saying thanks may also be a reason....  :D else you can just press the "notify"-button

Well, yes, that's true, too!  Thanks were thanks are due!

Would it be possible to assign one mouse to each monitor (so that it's possible that there are 2 mouses connected to the system)
=> that way, it would be possible to make some really cheap sem-multi-user system (or are there better solutions for that?)

Interesting thought...

Offline bluegroper

  • Full Member
  • ***
  • Posts: 205
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #8 on: December 20, 2011, 02:43:10 PM »

I have one question ..... is the use of IceWM only to keep the resources light, or is there some other reason?
Would there be some form of conflict if KDE was used on the second monitor?

Yes exactly, to both your questions.
I don't think its possible to launch a second instance of KDE on second monitor.  At least, I looked, tried, and failed.
The choice of IceWM lightweight window manager is quite deliberate, since I only use it to launch virtualbox.  
For that task, I believe small and lightweight is prolly better than any resource hogging alternative.
YMMV's of course.

« Last Edit: December 20, 2011, 03:17:48 PM by bluegroper »

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2253
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #9 on: December 20, 2011, 03:01:59 PM »
Now I'm wondering if the second GUI (IceWM) is really necessary?  Once you have two displays running, can't KDE run a virtual machine and have it show on the second display?

Don't ask me how to do this...   :-\

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8590
  • Aurum nostrum non est aurum vulgi.
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #10 on: December 20, 2011, 07:52:18 PM »
Thank you load, bluegroper. Your howto should be considered a good additin to the Knowledge Base.

Now, if someone can just point me to how I can Xinerama on my KDE-64 instead of just TwinView ...  ;)
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline bluegroper

  • Full Member
  • ***
  • Posts: 205
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #11 on: December 21, 2011, 02:38:13 AM »
Please could somebuddy report this thread to a moderator and request it be moved to "Tips and tricks".
Attempting to report one's own post just throws an error.   :)

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Howto Install 2 Screens with 2 Window Managers
« Reply #12 on: December 21, 2011, 06:29:58 AM »
Please could somebuddy report this thread to a moderator and request it be moved to "Tips and tricks".
Attempting to report one's own post just throws an error.   :)


That's funny.  ;D  Reported to moderators.

EDIT: Now it's moved. Thanks, Neal.
« Last Edit: December 21, 2011, 07:38:14 AM by djohnston »
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378