ubuntu-multiseat team mailing list archive
-
ubuntu-multiseat team
-
Mailing list archive
-
Message #00211
Re: Lightdm and Xephyr multiseat fun
Hi there!
Em 02/03/2014 16:22, "Daniel J Blueman" <daniel@xxxxxxxxx> escreveu:
>
> Hi guys,
>
> Using Ubuntu 13.10 i686 and the superb work in the ubuntu-multiseat
> PPA, I run a configured X server on a dual-output Intel GPU (started
> from a modified lightdm upstart script [1]):
> # /usr/bin/Xorg :0 -nolisten tcp vt7
>
> then start configured [2] lightdm, which in turn runs the Xephyr
> wrapper [3]. Both user sessions start; so far so good.
>
> Since I need to also attach touchscreen and sound to the screens, I
> have to use udev tags, so I assign a mouse the 'seat1' tag [4,5] and
> it isn't listed in 'loginctl seat-status seat0' as expected, but it
> doesn't move the cursor on the second head (or first).
>
> loginctl shows only a single seat, despite both Xephyr servers being
> passed '-seat seat0' and '-seat1' (which isn't listed in 'Xephyr
> -help):
> $ loginctl list-seats
> SEAT
> seat0
>
> 1 seats listed.
>
> Any idea what I'm missing?
>
> Many thanks!
> Daniel
>
Hi Daniel!
In order to create a new seat in logind, you need to have at least one
device udev-tagged as master-of-seat attached to it. Try to write a udev
rule that tags one of your seat1 devices as master-of-seat.
> -- [1] /etc/init/lightdm.conf
>
> # LightDM - light Display Manager
> #
> # The display manager service manages the X servers running on the
> # system, providing login and auto-login services
> #
> # based on gdm upstart script
>
> description "LightDM Display Manager"
> author "Robert Ancell <robert.ancell@xxxxxxxxxxxxx>"
>
> start on ((filesystem
> and runlevel [!06]
> and started dbus
> and plymouth-ready)
> or runlevel PREVLEVEL=S)
>
> stop on runlevel [016]
>
> emits login-session-start
> emits desktop-session-start
> emits desktop-shutdown
>
> script
> if [ -n "$UPSTART_EVENTS" ]
> then
> # Check kernel command-line for inhibitors, unless we are being
called
> # manually
> for ARG in $(cat /proc/cmdline); do
> if [ "$ARG" = "text" ]; then
> plymouth quit || :
> stop
> exit 0
> fi
> done
>
> [ ! -f /etc/X11/default-display-manager -o "$(cat
> /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/lightdm" -o
> "$(cat /etc/X11/default-display-manager 2>/dev/null)" =
> "/usr/sbin/lightdm" ] || { stop; exit 0; }
>
> if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
> then
> # Single-user mode
> plymouth quit || :
> exit 0
> fi
> fi
>
> # start parent X server
> /usr/bin/Xorg :0 -nolisten tcp vt7 &
> until xrefresh -display :0.0 2>/dev/null; do sleep 0.2; done
>
> exec lightdm
> end script
>
> post-start script
> sleep 5
> clear > /dev/tty7
> end script
>
> post-stop script
> if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
> initctl emit desktop-shutdown
> fi
> killall /usr/bin/Xorg || :
> end script
>
> -- [2] /usr/share/X11/xorg.conf.d/90-multiseat.conf
>
> Section "ServerLayout"
> Identifier "Layout"
> Screen "screen0"
> Screen "screen1" Below "screen0"
>
> Option "AllowMouseOpenFail" "true"
> Option "DontVTSwitch" "yes"
> Option "DontZap" "yes"
> EndSection
>
> Section "Device"
> Identifier "card0"
> Driver "intel"
> Option "AccelMethod" "SNA"
> Option "ZaphodHeads" "HDMI1"
> Screen 0
> EndSection
>
> Section "Device"
> Identifier "card1"
> Driver "intel"
> Option "AccelMethod" "SNA"
> Option "ZaphodHeads" "HDMI2"
> Screen 1
> EndSection
>
> Section "Screen"
> Identifier "screen0"
> Device "card0"
> EndSection
>
> Section "Screen"
> Identifier "screen1"
> Device "card1"
> EndSection
>
> -- [2] /etc/lightdm/lightdm.conf.d/90-multiseat.conf
>
> [SeatDefaults]
> user-authority-in-system-dir=true
> autologin-user-timeout=10
> autologin-session=ubuntu
> xserver-command=/usr/local/bin/xephyr-wrapper
>
> [Seat:0]
> xdg-seat=seat0
> autologin-user=me1
>
> [Seat:1]
> xdg-seat=seat1
> autologin-user=me2
> xserver-vt=0
>
> -- [3] /usr/local/bin/xephyr-wrapper
>
> #!/bin/bash
>
> export DISPLAY=:0.$((${1#:}-1))
> declare -a argv=("$@")
>
> # drop incompatible args
> for (( i=0; i<${#argv[@]}; i++ )); do
> case ${argv[$i]} in
> -novtswitch|-sharevts|vt7|-config|-layout)
> argv[$i]=""
> ;;
> esac
> done
>
> echo "Starting Xephyr on display $DISPLAY with ${argv[@]}"
> exec /usr/bin/Xephyr -fullscreen ${argv[@]}
>
> -- [4] /etc/udev/rules.d/99-multiseat.rules
>
> DEVPATH=="/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2",
> ENV{ID_SEAT}="seat1", TAG+="seat1"
>
> -- [5] udevadm test /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/
>
> ...
> ACTION=add
> BUSNUM=001
> DEVNAME=/dev/bus/usb/001/005
> DEVNUM=005
> DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2
> DEVTYPE=usb_device
> DRIVER=usb
> ID_BUS=usb
> ID_MODEL=USB_OPTICAL_MOUSE
> ID_MODEL_ENC=\x20USB\x20OPTICAL\x20MOUSE
> ID_MODEL_FROM_DATABASE=Optical Mouse
> ID_MODEL_ID=0a4d
> ID_REVISION=0100
> ID_SEAT=seat1
> ID_SERIAL=15d9_USB_OPTICAL_MOUSE
> ID_USB_INTERFACES=:030102:
> ID_VENDOR=15d9
> ID_VENDOR_ENC=15d9
> ID_VENDOR_FROM_DATABASE=Trust International B.V.
> ID_VENDOR_ID=15d9
> MAJOR=189
> MINOR=4
> PRODUCT=15d9/a4d/100
> SUBSYSTEM=usb
> TAGS=:seat1:
> TYPE=0/0/0
> USEC_INITIALIZED=19896680505
> unload module index
> --
> Daniel J Blueman
>
> --
> Mailing list: https://launchpad.net/~ubuntu-multiseat
> Post to : ubuntu-multiseat@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-multiseat
> More help : https://help.launchpad.net/ListHelp
References