2

I'm looking for a way to make use of my dual-screen setup. I have two monitors, keyboards and mouses (one set is laptop's built-in, another is the external one, connected by USB/VGA cables). I'd like to set up a terminal on the laptop's built in peripherals and use my external keyboard/mouse for normal work. How can this be solved? I'm using Debian and running a Trinity Desktop Environment there.

6
  • 1
    This should probably be moved to the unix.stackexchange.com site.
    – user111228
    Nov 14, 2012 at 21:38
  • I still think it's more of a superuser question.
    – d33tah
    Nov 14, 2012 at 21:44
  • 1
    Maybe you're right, but on Unix/Linux SE you'd probably get more help.
    – user111228
    Nov 14, 2012 at 21:46
  • Depending on your GPU, this may not be possible. However, if it is a dual head GPU, then you can just start two X servers, and manually map the appropriate hardware devices to each X server. Can get dicey though; manual configuration of xorg.conf needed. Nov 14, 2012 at 22:13
  • It's unlikely it's a dual head GPU. It's Intel GMA950.
    – d33tah
    Nov 14, 2012 at 22:27

1 Answer 1

2

You have two options. Configure everything manually in xorg.conf - that is specify two monitors and two devices - or you can hope that everything works out of the box.

The first option works well for me. Below is an xorg configuration that works on similar hardware. After you have properly configured the server, you can manipulate the layout with xrandr. By manipulate I mean enable or disable monitors, specify where they are relatively to one-another and even rotate them.

E.g.

  xrandr \
           --output LVDS1 --auto --pos 0x0 \
           --output VGA1  --auto \
           --right-of LVDS1 &
       sleep 2
       xrandr --output VGA1 --mode 1024x768 &

The important part here is to figure out how to configure the graphics device. The driver you are using will usually (hopefully) come with a man page. I can't remember the syntax of apt-cache to look for files in packages but you will probably find a man page under:

/usr/share/man/man4/intel.4.bz2

That means you can display it using man intel in a terminal. Read it and you will have a better idea of how your GPU may be configured.

PATH: /etc/X11/xorg.conf.d/
FILE: xorg.conf

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    #InputDevice    "touchpad" "CorePointer"
    #InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath    "/usr/share/fonts/TTF/"
    FontPath    "/usr/share/fonts/OTF"
    FontPath    "/usr/share/fonts/Type1/"
    FontPath    "/usr/share/fonts/100dpi"
    FontPath    "/usr/share/fonts/75dpi"
    FontPath    "/usr/share/fonts/artwiz-latin1"
    FontPath    "/usr/share/fonts/dejavu"
    FontPath    "/usr/share/fonts/corefonts"
    FontPath    "/usr/share/fonts/cyrillic"
    FontPath    "/usr/share/fonts/encodings"
    FontPath    "/usr/share/fonts/freefont-ttf"
    FontPath    "/usr/share/fonts/misc"
    FontPath    "/usr/share/fonts/proggy-fonts"
    FontPath    "/usr/share/fonts/terminus"
    FontPath    "/usr/share/fonts/ttf-bitstream-vera"
EndSection

Section "Module"
    Load  "dbe"
    Load  "glx"
    Load  "dri"
    Load  "record"
    Load  "extmod"
    Load  "dri2"
EndSection
Section "Extensions"
        Option "Composite" "Enable"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "ServerFlags"
    Option  "blank time"  "5"  # Blank the screen after 5 minutes (Fake)
    Option  "standby time"  "10"  # Turn off screen after 10 minutes (DPMS)
    Option  "suspend time"  "15"  # Full suspend after 20 minutes
    Option  "off time"  "20"  # Turn off after half an hour
EndSection

Section "Monitor"
    Identifier   "internalMonitor"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
    Option        "DPMS"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "internal"
    Monitor    "internalMonitor"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

FILE: synaptics.conf

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
    Option      "TapButton1" "1
    Option      "TapButton2" "2"
    Option      "TapButton3" "3"

    Option "VertScrollDelta" "150"


    Option "AccelFactor" "0.00695223"
    Option "MaxSpeed" "0.7"
    Option "MinSpeed" "0.3"

EndSection

FILE: intel-945gme

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"               # []
        #Option     "SWcursor"              # []
        #Option     "ColorKey"              # 
        #Option     "CacheLines"            # 
        #Option     "Dac6Bit"               # []
        #Option     "DRI"                   # []
        #Option     "NoDDC"                 # []
        #Option     "ShowCache"             # []
        #Option     "XvMCSurfaces"          # 
        #Option     "PageFlip"              # []
    Identifier  "internal"
    Driver      "intel"
    Option          "monitor-VGA1" "externalMonitor"
    Option          "monitor-LVDS1" "internalMonitor"
    VendorName  "Intel Corporation"
    BoardName   "Mobile 945GME Express Integrated Graphics Controller"

    Option   "FramebufferCompression" "on"
    Option   "AccelMethod" "EXA"
    Option   "Tiling" "on"

    BusID       "PCI:0:2:0"
EndSection

FILE: externalScreen

Section "Monitor"
    Identifier   "externalMonitor"
    VendorName   "some"
    ModelName    "some"
    Option      "DPMS"
    Option "above"  "internalMonitor"
EndSection

Section "Screen"
    Identifier "externalScreen"
    Device     "vgaport"
    Monitor    "externalMonitor"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

4
  • I assume you want X on both since you mention a DE. Running a virtual console on one and X on the other is far trickier, and I gave up trying to set that up on my initial attempt some six years ago. Have not tried it since. Nov 15, 2012 at 0:22
  • 1
    Will this make the two keyboards/mouses not interfere each other? Can I somehow bind a specific keyboard and mouse to a window?
    – d33tah
    Nov 15, 2012 at 0:39
  • I missed that part of the question, didn't I? You will have to run 2 X servers in order to separate the input devices. But maybe not, this is from man xorg.conf: The ServerLayout sections are at the highest level. They bind together the input and output devices that will be used in a session. The input devices are described in the InputDevice sections. Output devices usually consist of multiple independent components (e.g., a graphics board and a monitor). Nov 15, 2012 at 0:57
  • These multiple components are bound together in the Screen sec‐ tions, and it is these that are referenced by the ServerLayout section. Each Screen section binds together a graphics board and a monitor. The graphics boards are described in the Device sections, and the monitors are described in the Monitor sections. Nov 15, 2012 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .