You are not logged in.

#1 2009-09-06 21:56:38

paperinik
Member
Registered: 2005-05-25
Posts: 46

Multiseat with Dualhead

Based on the tutorial of Netpatia, I have successfully managed to setup multiseat with a dualhead (VGA, DVI) card in Archlinux. It involves installing 1 package, creating 2 files, and editing 2 existing files. This tutorial assumes you have gdm and a choice of your favorite desktop environment or window manager. For the time being, it's best that you use similar resolutions for both monitors. Next:

1. Install wmctrl.

2. Create these two files:

#!/bin/bash
# /usr/sbin/Xephyr-login.sh

XAUTH_BASE=/var/lib/gdm/:0.Xauth
DISPL_BASE=:0

XEP=$(XAUTHORITY=$XAUTH_BASE xwininfo -root -children -display :0 | grep "Xephyr on :1" --max-count=1)
echo ${XEP} >> /tmp/logXephyrLogin

# assign values to positional parameters to obtain the id (first parameter) of the Xephyr window
set ${XEP}
DISPLAY=$DISPL_BASE XAUTHORITY=$XAUTH_BASE wmctrl -i -r $1 -e 0,0,768,-1,-1
# echo $1 >> /tmp/logXephyrLogin_1

/usr/lib/gdm/gdmlogin

Make sure that the number "768" in the file Xephyr-login.sh matches the rightside video mode of the resolution you intend to use. For example, if you intend to use 1280x800, choose 800. If you intend to use 1366x768, choose 768.

#!/bin/bash
# /usr/sbin/Xephyr-path.sh

trap "" usr1

XEPHYR=/usr/bin/Xephyr
DISPLAY=:0
XAUTHORITY=/var/lib/gdm/:0.Xauth

args=()

while [ ! -z "$1" ]; do
 if [[ "$1" == "-kbdpath" ]]; then
   shift
   if [ ! -z "$1" ]; then
     args=("${args[@]}" "-keybd")
     args=("${args[@]}" "evdev,,device=/dev/input/by-path/$1,xkbrules=xorg,xkbmodel=evdev,xkblayout=us")
   fi
 elif [[ "$1" == "-mousepath" ]]; then
   shift
   if [ ! -z "$1" ]; then
     args=("${args[@]}" "-mouse")
     args=("${args[@]}" "evdev,,device=/dev/input/by-path/$1")
   fi
   else
     args=("${args[@]}" "$1")
#  echo "+++ args $1 +++" >> /tmp/logXephyr
 fi
 shift
done

# Next line is just to create a log file with the invocation parameters, for debug purposes
echo $XEPHYR "${args[@]}" >> /tmp/logXephyr
exec $XEPHYR "${args[@]}"

And then issue these commands:

chmod 744 /usr/sbin/Xephyr-login.sh
chmod 744 /usr/sbin/Xephyr-path.sh
chown gdm:gdm /usr/sbin/Xephyr-login.sh

3. Backup your xorg.conf, and replace it with this one while changing what you need to change (Driver, BusID, Modes, Virtual):

Section "Device"
        Identifier      "Card0"
        BoardName       "Mobility Radeon HD 3450"
        Driver          "radeon"
        BusID           "PCI:2:0:0"
        Option          "Monitor-VGA-0" "Mon-VGA"
        Option          "Monitor-DVI-0" "Mon-DVI"
EndSection

Section "Monitor"
        Identifier      "Mon-VGA"
        Option          "DPMS"
EndSection

Section "Monitor"
        Identifier      "Mon-DVI"
        Option          "DPMS"
        Option          "Below"       "Mon-VGA"
EndSection

Section "Screen"
        Identifier      "Screen-base"
        Device          "Card0"
        Monitor         "Mon-VGA"
        DefaultDepth    24
        Subsection      "Display"
                Depth   24
                Modes   "1024x768"
                Virtual 1024 1536
        EndSubSection
EndSection

Section "ServerFlags"
        Option "AllowMouseOpenFail" "yes"
        Option "DontVTSwitch" "yes"
        Option "DontZap" "yes"
EndSection

Backup the file /etc/gdm/custom.conf and replace it with this one:

[servers]

0=Xephyr0
1=Xephyr1
2=Xephyr2

[server-Xephyr0]
name=Xephyr0
command=/usr/bin/X -br -dpms -s 0
handled=false
flexible=false

[server-Xephyr1]
name=Xephyr1
command=/usr/sbin/Xephyr-path.sh -br -screen 1024x768 -kbdpath pci-0000:00:02.0-usb-0:2:1.0-event-kbd -mousepath pci-0000:00:02.0-usb-0:1:1.0-event-mouse
handled=true
flexible=false

[server-Xephyr2]
name=Xephyr2
command=/usr/sbin/Xephyr-path.sh -br -screen 1024x768 -kbdpath pci-0000:00:02.0-usb-0:3:1.0-event-kbd -mousepath pci-0000:00:02.0-usb-0:4:1.0-event-mouse
handled=true
flexible=false

[daemon]

Greeter=/usr/sbin/Xephyr-login.sh

Change the resolutions (1024x768) in the file above with the same one in xorg.conf. Also, change keyboard and mouse paths in the file with the ones that match yours. You can get that from these commands:

ls -la /dev/input/by-path/ | grep event | grep kbd
ls -la /dev/input/by-path/ | grep event | grep mouse

Offline

#2 2009-09-07 03:08:03

joaca_rj
Member
From: Rio de Janeiro, Brazil
Registered: 2009-04-12
Posts: 76

Re: Multiseat with Dualhead

Very nice! Gotta have to try it out!
Should be wikified!

Offline

#3 2024-10-28 11:22:45

illegitimate-egg
Member
Registered: 2024-10-28
Posts: 1

Re: Multiseat with Dualhead

Thank you

Offline

Board footer

Powered by FluxBB