Multiseat - how to set two keyboards and mice

Hi,

I'm setting up a FreeBSD workstation for two users so that each one can work at the same time in a X environment.
My setup is:

Code:
# uname -a
FreeBSD leao 10.1-STABLE FreeBSD 10.1-STABLE #0 r281384M: Sat Apr 11 00:32:06 WEST 2015  root@leao:/usr/obj/usr/src/sys/GENERIC  amd64

The integrated Haswell graphics of the Xeon E3-1246v3 cpu is not yet supported, so I'm trying to use vesa driver for seat0.
There's also a radeon graphics card for seat1.

I can already get the screen for user0 and another screen for user1, but either I get both keyboards working in seat0 and both mice scrolling in seat1 or I get no action from keyboards or mice. The keyboards and mice are all connected via USB.

My current xorg.conf is: (relevant parts only)
Code:
Section "ServerLayout"
  Identifier  "seat0"
  Screen  0  "Screen0" 0 0
  InputDevice  "Keyboard0" "CoreKeyboard"
  InputDevice  "Mouse0" "CorePointer"
EndSection

Section "ServerLayout"
  Identifier  "seat1"
  Screen  1  "Screen1" 0 0
  InputDevice  "Keyboard1" "CoreKeyboard"
  InputDevice  "Mouse1" "CorePointer"
  Option  "AIGLX" "true"
EndSection

Section "ServerFlags"
  Option  "DontZap"  "off"
  Option "DefaultServerLayout"  "seat0"
  #Option "StandbyTime"  "10"
  #Option "SuspendTime"  "20"
  #Option "OffTime"  "30"
  #Option "DRI2" "on"
  Option "AutoAddDevices" "false"
  Option "AutoEnableDevices"  "false"
  Option "AllowMouseOpenFail" "on"
  Option "AllowEmptyInput" "on"
  Option "ZapWarning"  "on"
  Option "HandleSpecialKeys"  "off" # Zapping on
  Option "Xinerama" "off"
EndSection

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

Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  #Option "Device"  "/dev/kbd2"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
Section "InputDevice"
  Identifier  "Keyboard1"
  Driver  "kbd"
  #Option "Device"  "/dev/kbd3"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"

EndSection

Section "InputDevice"
  Identifier  "Mouse0"
  Driver  "mouse"
  #Option  "Device"  "/dev/ums1"
  Option  "Protocol" "auto"
  Option  "Device" "/dev/sysmouse"
  Option  "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
  Identifier  "Mouse1"
  Driver  "mouse"
  #Option  "Device"  "/dev/ums0"
  Option  "Protocol" "auto"
  Option  "Device" "/dev/sysmouse"
  Option  "ZAxisMapping" "4 5 6 7"
EndSection

In /etc/rc.conf there's
Code:
hald_enable="YES"
dbus_enable="YES"

When I attach and detach both keyboards and mice, the OS shows that ukbd0 and ukbd1 for the former and ums0 and ums2 are used. But if I include these (with /dev/ as a prefix, so /dev/ubkd0...) neither the keyboards, nor the mice work.
For the mice to work I have to include the
Code:
Option "Device" "/dev/sysmouse"
The problem is that I only find one device but have two mice to be assigned to two different screens.

So, how can I assign the correct keyboard and mice to the two seats?
Furthermore, supposing that keyboards may be removed, how to assign the chosen keyboard to the right seat ano not the first one that goes to ubkd0? With devfs?
 

wblock@

Developer
kbdmux(4) must be disabled to make the keyboards separate. The ServerFlags section will have to be fixed. Do not auto-discover devices, either through X or with HAL. AllowEmptyInput was a mistake when it still worked, but it probably doesn't matter now. People set it wrong so often that it is ignored by newer X servers.
 
I managed to get a multiseat setup working in a slightly different way. I have two xorg configuration files. Each has Device lines in the InputDevice section for specifying the keyboard and mouse, similar to yours but not commented out. Also, I used /dev/ukbd0 and /dev/ukbd1, not /dev/kbd. As wblock@ says, you have to disable kbdmux to separate the keyboards. You also have to separate the mice by not running sysmouse, and then specify /dev/ums0 and /dev/ums1 in the xorg configuration files.

You may also have to specify the graphics driver separately - I had to add lines such as PCI:64:0:0 and PCI:96:0:0 so that the NVidia drivers would use the correct card. But this may not apply to your setup.

Then I got kdm to kick off two xorg servers, specifying the relevant configuration file on the command line. Each xorg server then runs it's own NVidia driver, and everything has been very stable for a long while. The only real problem I came across was getting the ukbd driver to use raw keyboard mode, but this may not be relevant for FreeBSD 10. I'm still using FreeBSD 9.3, and not using the new vt driver, which also may be relevant here

Hope this helps, Richard
 
I already disabled hal and dbus in /etc/rc.conf.
In /boot/device.hints, I disabled kbdmux.

I've also added this lines to /etc/rc.conf
Code:
moused_ums0_enable="NO"
moused_ums2_enable="NO"
Is this the way to disable sysmouse, disabling moused?
After my startx -- -layout "seat0" command, I get this in /var/log/Xorg.0.log:
Code:
[  354.869] (II) Using input driver 'mouse' for 'Mouse0'
[  354.869] (**) Option "CorePointer"
[  354.869] (**) Mouse0: always reports core events
[  354.869] (**) Option "Protocol" "auto"
[  354.869] (**) Option "Device" "/dev/ums0"
[  354.869] (**) Mouse0: Protocol: "auto"
[  354.869] (**) Mouse0: always reports core events
[  354.869] (==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
[  354.869] (**) Option "ZAxisMapping" "4 5 6 7"
[  354.869] (**) Mouse0: ZAxisMapping: buttons 4, 5, 6 and 7
[  354.869] (**) Mouse0: Buttons: 7
[  354.869] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  354.869] (**) Mouse0: (accel) keeping acceleration scheme 1
[  354.869] (**) Mouse0: (accel) acceleration profile 0
[  354.869] (**) Mouse0: (accel) acceleration factor: 2.000
[  354.869] (**) Mouse0: (accel) acceleration threshold: 4
[  354.869] (II) Mouse0: SetupAuto: hw.iftype is 5, hw.model is 0
[  354.869] (II) Mouse0: SetupAuto: protocol is SysMouse

So it seems that the protocol is still SysMouse...
The mouse was active in seat0 (didn't try seat1), but the keyboard was not.
Here's the xorg.conf section regarding the keyboard and the log:
Code:
Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  Option "Device"  "/dev/ukbd0"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
Code:
[  354.869] (II) Using input driver 'kbd' for 'Keyboard0'
[  354.869] (**) Option "CoreKeyboard"
[  354.869] (**) Keyboard0: always reports core events
[  354.869] (**) Keyboard0: always reports core events
[  354.869] (**) Option "Protocol" "standard"
[  354.869] (**) Option "Device" "/dev/ukbd0"
[  354.869] (EE) Keyboard0: cannot open "/dev/ukbd0"
[  354.869] (EE) PreInit returned 8 for "Keyboard0"
[  354.869] (II) UnloadModule: "kbd"
(and later)
[  354.869] (WW) fcntl(11, F_SETOWN): Inappropriate ioctl for device
[  354.869] (II) config/devd: probing input devices...
[  354.869] (II) config/devd: adding input device Keyboard (/dev/ukbd0)
[  354.869] (II) AutoAddDevices is off - not adding device.
So, it cannot open /dev/ukbd0...
The ServerFlags Section is like:
Code:
Section "ServerFlags"
  Option  "DontZap"  "off"
  Option "DefaultServerLayout"  "seat0"
  Option "AutoAddDevices" "false"
  Option "AutoEnableDevices"  "false"
  Option "AllowMouseOpenFail" "on"
  Option "AllowEmptyInput" "false"
  Option "ZapWarning"  "on"
  Option "HandleSpecialKeys"  "off" # Zapping on
  Option "Xinerama" "off"
EndSection
What's wrong with this keyboard setup?
 
As of right now, I have both monitors with a (different) xorg screen.
In screen0 there's input from one keyboard and one mouse.
In screen1, no keyboard and no mouse seems to work.
Code:
 % kenv | grep mux
hint.kbdmux.0.disabled="1"

Code:
 % ll /dev/ukbd*
crw-------  1 root  wheel  0x7a Apr 16 11:43 /dev/ukbd0
crw-------  1 root  wheel  0x83 Apr 16 11:43 /dev/ukbd1

Code:
Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  Option "Device"  "/dev/ukbd1"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
Section "InputDevice"
  Identifier  "Keyboard1"
  Driver  "kbd"
  Option "Device"  "/dev/ukbd0"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

What am I missing regarding the keyboards?

I've read mousedrv but can't understand what to do to avoid /dev/sysmouse
Code:
% ll /dev/sysmouse
crw-------  1 root  wheel  0x16 Apr 16 11:43 /dev/sysmouse

Code:
Section "InputDevice"
  Identifier  "Mouse0"
  Driver  "mouse"
  Option  "Device"  "/dev/ums2"
  Option  "Protocol" "auto"
  #Option  "Device" "/dev/sysmouse"
  Option  "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
  Identifier  "Mouse1"
  Driver  "mouse"
  Option  "Device"  "/dev/ums0"
  Option  "Protocol" "auto"
  #Option  "Device" "/dev/sysmouse"
  Option  "ZAxisMapping" "4 5 6 7"
EndSection

so, how to make xorg disable sysmouse and have it to read from both ums0 and ums1 or ums2?
 
Hi lib13,

Just realised I made a mistake with my reply. As you have found, it is easy to specify the screens. The mice can also be separated for each seat, after disabling moused, which uses the sysmouse driver (I think you just comment out enable_moused=YES in /etc/rc.conf). I think the message about SysMouse protocol in your log file is fine - this is the xorg mouse protocol, not the FreeBSD mouse driver. But it is confusing. Also, I think you need ums0 and ums1, not ums0 and ums2.

As regards the keyboards, I incorrectly said to put the ukbd device files in each InputDevice section. It should only be the second seat that needs this, as the first talks to the first keyboard via syscons (in my case) or vt (in yours).

I'll walk through what I did, for FreeBSD 9.3 running the syscons terminal driver. I used two xorg.conf files, whereas you use one xorg.conf file with two ServerLayout sections, which is fine.

Below are the relevant sections from my xorg.conf for the first seat:

Code:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "AutoAddDevices" "off"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbModel" "microsoftpro"
    Option         "XkbLayout" "gb"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/ums0"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:64:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1680x1050"
    EndSubSection
EndSection

And for the second seat:

Code:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "AutoAddDevices" "off"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "Device" "/dev/ukbd0"
    Option         "XkbModel" "microsoftpro"
    Option         "XkbLayout" "gb"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/ums1"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:96:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1920x1080"
    EndSubSection
EndSection

So the mice are straightforward - disable moused (which uses the sysmouse driver) and specify /dev/ums0 and /dev/ums1 as above. The screens should also be straightforward as the drivers should pick up the card. The only difficulty is if you have two cards using the same driver, as I do. Hence, for me, I need the BusID lines in the Device sections, but you are ok.

The keyboards are the most difficult to separate, as there is interaction with the syscons driver (for me) or the new vt driver (for you). I can only explain how it works with syscons, hopefully someone with experience of vt can help with this part (it may be very similar or identical).

Firstly, you must disable kbdmux, as you have done.

The keyboard layout for the first seat does not specify a device in /dev - it is talking to the first keyboard through the syscons driver. This is the bit I got wrong in my post. The second seat talks to the keyboard driver for the second keyboard through /dev/ukbd0 (in my case, as I have a PS/2 keyboard and a USB keyboard - the PS/2 keyboard gets taken by syscons).

There are two relevant keyboard modes - XLATE and RAW. Xorg is expecting to talk to the keyboard driver in RAW mode, which works fine with syscons and vt. However, the default mode for the ukbd driver is XLATE, and this needs to be changed to RAW. There may be a sysctl knob in FreeBSD 10 for this, but I just recompiled the ukbd driver after changing the following line in /usr/src/sys/dev/usb/input/ukbd.c:

Code:
Find line with:        sc->sc_mode = K_XLATE;

Change to:              sc->sc_mode = K_RAW;

If you like, you can just recompile the kernel using the handbook instructions, this will recompile the ukbd driver too.

I think this may cause the biggest issue for you, as you have two USB keyboards, one being grabbed by vt. If there is no knob to change the ukbd driver to RAW mode, then recompiling the ukbd driver as above will mean the second seat works, but will probably cause it not to work properly with vt, and hence the first seat. However, I don't know. My first keyboard is a PS/2 keyboard, so the PS/2 keyboard driver is unaffected by changing the ukbd driver, and works fine with syscons.

Have you a PS/2 port and a USB to PS/2 converter for the first keyboard? I think then you will definitely be able to get it to work, though admittedly the setup is a bit fiddly (but very stable once working).

Thanks, Richard

If it's any help, these are relevant bits from my xorg log files for both seats.

Code:
[  6578.251] (==) Using config file: "/etc/X11/xorg.conf"
[  6578.252] (==) ServerLayout "X.org Configured"
[  6578.252] (**) |-->Screen "Screen0" (0)
[  6578.252] (**) |   |-->Monitor "Monitor0"
[  6578.252] (**) |   |-->Device "Card0"
[  6578.252] (**) |-->Input Device "Mouse0"
[  6578.252] (**) |-->Input Device "Keyboard0"
[  6578.252] (**) Option "AutoAddDevices" "off"
[  6578.252] (**) Not automatically adding devices
[  6578.252] (==) Automatically enabling devices
[  6578.252] (==) Not automatically adding GPU devices

[  6578.285] (--) Using syscons driver with X support (version 2.0)
[  6578.285] (--) using VT number 9

[  6579.099] (II) Using input driver 'mouse' for 'Mouse0'
[  6579.099] (**) Option "CorePointer"
[  6579.099] (**) Mouse0: always reports core events
[  6579.099] (**) Option "Protocol" "auto"
[  6579.099] (**) Option "Device" "/dev/ums0"
[  6579.099] (**) Mouse0: Protocol: "auto"
[  6579.099] (**) Mouse0: always reports core events
[  6579.099] (==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
[  6579.099] (**) Mouse0: ZAxisMapping: buttons 4 and 5
[  6579.099] (**) Mouse0: Buttons: 5
[  6579.099] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  6579.099] (**) Mouse0: (accel) keeping acceleration scheme 1
[  6579.099] (**) Mouse0: (accel) acceleration profile 0
[  6579.099] (**) Mouse0: (accel) acceleration factor: 2.000
[  6579.100] (**) Mouse0: (accel) acceleration threshold: 4
[  6579.100] (II) Mouse0: SetupAuto: hw.iftype is 5, hw.model is 0
[  6579.100] (II) Mouse0: SetupAuto: protocol is SysMouse
[  6579.100] (WW) fcntl(25, F_SETOWN): Inappropriate ioctl for device
[  6579.100] (II) Using input driver 'kbd' for 'Keyboard0'
[  6579.100] (**) Option "CoreKeyboard"
[  6579.100] (**) Keyboard0: always reports core events
[  6579.100] (**) Keyboard0: always reports core events
[  6579.100] (**) Option "Protocol" "standard"
[  6579.100] (**) Option "XkbRules" "base"
[  6579.100] (**) Option "XkbModel" "microsoftpro"
[  6579.100] (**) Option "XkbLayout" "gb"
[  6579.100] (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD, id 7)

Code:
[  6665.056] (==) Log file: "/var/log/Xorg.1.log", Time: Wed Apr 15 20:32:29 2015
[  6665.056] (++) Using config file: "/etc/X11/xorg.conf.1"
[  6665.056] (==) ServerLayout "X.org Configured"
[  6665.056] (**) |-->Screen "Screen0" (0)
[  6665.056] (**) |   |-->Monitor "Monitor0"
[  6665.056] (**) |   |-->Device "Card0"
[  6665.056] (**) |-->Input Device "Mouse0"
[  6665.056] (**) |-->Input Device "Keyboard0"
[  6665.056] (**) Option "AutoAddDevices" "off"
[  6665.056] (**) Not automatically adding devices
[  6665.056] (==) Automatically enabling devices
[  6665.056] (==) Not automatically adding GPU devices
[  6665.609] (II) Using input driver 'mouse' for 'Mouse0'
[  6665.609] (**) Option "CorePointer"
[  6665.609] (**) Mouse0: always reports core events
[  6665.609] (**) Option "Protocol" "auto"
[  6665.609] (**) Option "Device" "/dev/ums1"
[  6665.609] (**) Mouse0: Protocol: "auto"
[  6665.609] (**) Mouse0: always reports core events
[  6665.610] (==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
[  6665.610] (**) Mouse0: ZAxisMapping: buttons 4 and 5
[  6665.610] (**) Mouse0: Buttons: 5
[  6665.610] (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE, id 6)
[  6665.610] (**) Mouse0: (accel) keeping acceleration scheme 1
[  6665.610] (**) Mouse0: (accel) acceleration profile 0
[  6665.610] (**) Mouse0: (accel) acceleration factor: 2.000
[  6665.610] (**) Mouse0: (accel) acceleration threshold: 4
[  6665.610] (II) Mouse0: SetupAuto: hw.iftype is 5, hw.model is 0
[  6665.610] (II) Mouse0: SetupAuto: protocol is SysMouse
[  6665.610] (WW) fcntl(24, F_SETOWN): Inappropriate ioctl for device
[  6665.610] (II) Using input driver 'kbd' for 'Keyboard0'
[  6665.610] (**) Option "CoreKeyboard"
[  6665.610] (**) Keyboard0: always reports core events
[  6665.610] (**) Keyboard0: always reports core events
[  6665.610] (**) Option "Protocol" "standard"
[  6665.610] (**) Option "Device" "/dev/ukbd0"
[  6665.611] (**) Option "XkbRules" "base"
[  6665.611] (**) Option "XkbModel" "microsoftpro"
[  6665.611] (**) Option "XkbLayout" "gb"
[  6665.611] (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD, id 7)
 
Hi RichardM,

You saved my week! And it's only Thursday... ;-)
Both screens are running with a keyboard and a mouse.

There are however a couple of details missing. Since you mentioned raw mode, how do I know if the keyboard is in raw mode? Any and every key letter is converted to a code? I'm mentioning this because my accent keys return \347, \363, etc. Maybe it is only the XkbLayout that needs some tweaking.

A second note is that the keyboards are at the wrong screen. I haven't read vt() man page, but perhaps there is a way for vt to grab ukbd1 instead of ukbd0. Maybe it helps to create a devfs rule so that each keyboard has a permanent device name. Otherwise I can go the easier (for me) route of changing the seat numbering (and the mouse and graphic card).

All the best!
 
Good afternoon,
Stupid question time. The healthcare field is currently targeted by the various crypto viri (Symantec article within past 48hrs). I want to minimize my office's risk of going back to the Stone-age and eliminate WINDOWS access to the internet, preferring BSD/xwin.

So... would they be better served running VBox and BSD on their workstation OR do I create additional users on my BSD workstation (1GB VRAM on NVidia card, 16GB RAM) running BSD 10.1? I CAN run MATE for all the users, just not at the same time. I'm guessing my issue is an incorrect Multiseat configuration.

Thanks in advance,
MarkB
 
Hi lib13,

That's great news! You'll know if the keyboard is in the wrong mode - it simply won't work, or you'll do something like press 8 and get T repeated endlessly. Once you get the multiseat configuration working, each seat can then be regarded as it's own xorg - so your accent keys problem should be solved in the normal way. Having said that, I just use a standard UK layout, so haven't tested whether anything else works with the change to the ukbd driver.

Out of interest, did you need a PS/2 keyboard connector, or does vt handle the altered ukbd driver?

I don't know how to change which keyboard vt grabs. I think syscons grabbed a PS/2 keyboard if available, and, if not, then the first USB keyboard (assuming kbdmux isn't running). Maybe vt does the same.

---------

Hi markb,

For me it would come down to economics/convenience. You won't be able to get a quad-port NVidia card and run 4 screens in multi-seat mode from it - each seat needs it's own card (certainly for the NVidia driver).

You can set up kdm to kick off the xorg servers for the various seats, so each screen presents a kdm login, and users can log in and out in the usual way. I imagine the same can be done with gdm and xdm, but haven't tried.

Richard
 
Richard,
I'm just trying to wrap my head around this - BSD is capable of numerous remote TTY logins but only a single xwin remote login?
Sincere thanks,
MarkB
 
Hi Mark,

I think we're talking about different things - multi-seat setup is putting 2,3,4 graphics cards in the same box, plugging in 2,3,4 USB keyboards and mice, attaching 2,3,4 monitors to the graphics cards, so that 2,3,4 users can use the computer at the same time, logged on independently of each other.

I thought you meant this setup with MATE desktops, which should work. For me, it was economics/convenience when my children started growing up, going to school, and needed to do homework at the same time... well, that was the theory, in practice it seems to involve them playing minecraft together...

Richard
 
Richard,
Thanks for clarification. You've eliminated one more rabbit-hole for me <G>; I can refine my search.
MarkB
 
RichardM: Hi,

I just connected the two USB keyboards and configured Xorg.conf as shown above. So, I guess that vt(4) handles this issue as one might expect, for the better.

Thank you very much
 
A few more notes and a correction.
The latter first. I had enabled vt(4) before but I had it disabled when I tried the multiseat setup. So, this is working with syscons(4). And both USB keyboards work fine, no raw mode.

The configuration is a bit tricky. I have yet to try to find the USB to PS/2 adapter to check if the keyboards work as well. This would be nice because, as stated by RichardM, the PS/2 keyboard would be the first keyboard chosen. What I do now is to boot the computer, and only afterwards connect the USB connectors of the second keyboard and mouse, so that /dev/ukbd1 and /dev/ums1 are always in the right InputDevice identifier. As this:
Code:
Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  #Option "Device"  "/dev/ukbd0"  # cannot do this
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
  Option "CustomKeycodes" "off"
EndSection

Section "InputDevice"
  Identifier  "Keyboard1"
  Driver  "kbd"
  Option "Device"  "/dev/ukbd1"
  Option "XkbLayout" "pt"
  Option "XkbModel" "pc105"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
  Option "CustomKeycodes" "off"
  Option "GrabDevice"  "on"
EndSection
The I18N pt configuration was set according to https://forums.freebsd.org/threads/cant-have-accented-characters.12769/ as Bra1n0v3rfl0w showed and as stated in the handbook.
 
Addendum:
Good eve - now able to have multiple different users login to BSD10 and run their own X-Window via VNC from Windows workstation. The trick was copying /.vnc/ to each user, chown the folder/files to appropriate person. Staff can now run VNC and use Mate with Chromium or Firefox via BSD and minimize risk of infecting my workstations using Windows browsers (which I've either hidden or deleted).

Additionally, as each user logs in, vncserver is run. VNC increments the port number by one (5901, 5902 etc) and the trick is to ensure each port points to the correct user, which I address in a script.

Thank you for pointing me in the right direction, and I hope this helps others.
MarkB
 
I have a small question, or at least it feels small in comparison, but how to you start your X sessions. Do you have a display manager and if so, which one? I have gotten much to work, right now I'm messing with the keyboards, but I haven't found any other way than to start manually. I would like to have it a bit more automatic :)
 
Jimbo,
I use a 'batchfile' of sorts to login as each of the 3 users via ssh, give password, issue the command 'vncserver' then exit. Repeat for next 2 users. Very inelegant but functional.
MarkB
 
Hi Jimbo,

I run kdm. I modified the config file /usr/local/share/config/kdm/kdmrc so that it starts both X servers. In the file I moved ":1" from "ReserveServers" to "StaticServers", and then added the following section:


Code:
[X-:1-Core]
  ServerArgsLocal=-nolisten tcp -config xorg.conf.1 -sharevts

where /etc/X11/xorg.conf.1 is the xorg.conf for the second seat.
 
Excellent! Thanks Richard!

The mice works fine now too with the help from the tip above. Now if I could only get the keyboards to work as well me and my daughter could sit side by side when minecrafting :)
 
Yep, now the keyboards are working too. One more question though. Right now I have manually killed the moused daemons, how do I prevent them from starting when inserting a new mouse, or when rebooting for that matter. I've tracked down the devd.conf file but that one looked kind of scary, but my idea was to comment out the ums part.

Cheers, Jimbo
 
I had tried the moused_ums0_enable="NO" but it didn't work, but apparently I had enabled hald(8) again. With hald(8) disabled and moused_ums0_enable="NO"and moused_ums2_enable="NO" everything works like a charm. I would like to be able to avoid KDM as it pulls in lots and lots of KDE dependencies but I haven't found anything else that works. Will keep trying and post any findings here. Now I'm off to configure sound for both seats :)

Thanks all, this was an excellent thread to find.
 
Last edited by a moderator:
For (a lot) less dependencies, you could install x11/xdm. I think you then just add a line to /usr/local/lib/X11/xdm/Xservers, with the options as above for kdm, but I haven't tried it
 
Top