16

I have an Ubuntu computer running 16.04, and I only have one graphics card.

Specs

My brother and I constantly fight over who gets to use it, so I'm trying to do everyone a favor and install multiseat.

  • I would be seat0, with the VGA port, a mouse, a keyboard, and the headphone jacks on the back of the computer.

  • He would be seat1, with the DVI-D port, a mouse, a keyboard, and the headphone jacks on the front of the computer.

  • We would share the Wi-Fi dongle to connect to the internet.

I am completely at a loss on how to do this. What files do I create, where do they go, and what do I put in them? A well-formatted answer (not an online guide) would be nice.

The output of lspci:

00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation C220 Series Chipset Family H81 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 PCI bridge: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
01:00.1 System peripheral: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
02:01.0 PCI bridge: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
02:05.0 PCI bridge: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
02:07.0 PCI bridge: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
02:09.0 PCI bridge: PLX Technology, Inc. PEX 8609 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch with DMA (rev ba)
03:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
04:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
05:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
06:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
08:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

The output of ls /dev/input/by-path/:

pci-0000:00:14.0-usb-0:1:1.2-event-kbd
pci-0000:00:14.0-usb-0:2:1.0-event-kbd
pci-0000:00:14.0-usb-0:7:1.0-event-mouse
pci-0000:00:14.0-usb-0:1:1.2-event-mouse
pci-0000:00:14.0-usb-0:3.1:1.0-event-mouse
pci-0000:00:14.0-usb-0:7:1.0-mouse
pci-0000:00:14.0-usb-0:1:1.2-mouse
pci-0000:00:14.0-usb-0:3.1:1.0-mouse
platform-eeepc-wmi-event
  • 1
    I never tried, but did you look at the WIKI? – ridgy Sep 2 '16 at 12:30
  • @ridgy That is for multi cards – Soren Sep 2 '16 at 13:24
  • 1
    There are some more solutions (like Xephyr, look at the answer to this Question). But for GPU intensive applications like games neither of these will be preformant enough, as far as I see, nor will remote X servers as they cannot use the GPU of the computer running the X client for rendering. – ridgy Sep 2 '16 at 14:44
  • xdmcp will use the local rendering engine and display remotely , although you might not get some of the fancier more modern xtenstions like glamour to work – Amias Sep 5 '16 at 9:07
7

So this is an old guide, but it may still work. MultiSeatOneCard.

Some notes before I start bringing instructions over:

  • All the gdm configuration it wants you to do may not even be necessary. If you have GNOME, you already have gdm (and a much newer version). Unity uses lightdm, which looks like it may not work. You should install gdm and use it to try this guide.

  • Just another warning: OLD GUIDE. It may not work, it may break Ubuntu, it may blow up your machine (not really of course). Please be careful and back stuff up.

Now for the guide

The wiki suggests disabling the splash screen with the following. I don't know if the procedure still works or not.

A lot can go wrong with this setup and the fancy splash screen during the boot doesn't help. In order to disable it (maybe temporarily) edit /etc/default/grub and change the GRUB_CMDLINE_LINUX_DEFAULT assignment from quiet splash to nomodeset noplymouth. Then run sudo update-grub.

The next part, about "expanded desktop" can probably be skipped too. Just plug in both monitors and set them to "extended mode" in your monitor settings.

Now, for some configuration.

First, find in /etc/gdm/gdm.conf, in the [servers] section a line starting with 0=.... (without # at the beginning of the line). Put a # in front of it.

That should be possible without much trouble.

Then edit /etc/gdm/gdm.conf-custom. Find the [security] section and add a line PamStack=gdm-2.20.

This is where you might have a problem. Instead of 2.20, you may need to try 3.18 (this is for 16.04).

find the [xdmcp] section and add a line Enable=true.

That should cause no trouble.

XDMCP is not particularly secure protocol so it is a good idea to make gdm refuse connections from other computers. Add a line gdm: 127.* in /etc/hosts.allow and a line gdm: ALL in /etc/hosts.deny.

This, you can choose not to do. If you care about security, I suggest you do it, but otherwise, I think you can leave it.

Now restart gdm by rebooting (probably the easiest way). If you see the GDM login screen, something's up. Check over the original guide and tweak some settings.

If you don't have a login screen, then get to a TTY and run X -query 127.0.0.1. If GDM comes up, kill it (get back to the TTY and kill it there).

Make a new user called monitor:

addgroup --gid 983 monitor
adduser --uid 983 --gid 983 monitor

Create a file (guide has no name specs) in /etc/udev/rules.d/my.rules and put in the following:

SUBSYSTEM=="input", OWNER="monitor", GROUP="monitor"

Some package installations:

apt-get install x11-utils xserver-xephyr

We need to separate the monitors with some aliases:

ln -s xmessage /usr/bin/xmessage0
ln -s xmessage /usr/bin/xmessage1

Log into the monitor user in the TTY and create ~/.xsession.

Put this inside:

runscreen () {
    # $1 = number
    # $2 = geometry
    local xpid winid k
    while :; do
        xmessage$1 -geometry $2 "Window $1" &
        xpid=$!
        k=10
        while \
            winid=`xwininfo -name xmessage$1|grep 'Window id'|cut -d' ' -f4` \
            && [ $k -gt 0 -a ! "$winid" ]
        do
            sleep 1
            k=$(($k - 1))
        done
        if [ "$winid" ]; then
            Xephyr :1$1 -parent "$winid" -dpms -keybd "evdev,,device=$3,$xkb" -mouse "evdev,,device=$4" -query 127.0.0.1 
        fi
        kill $xpid
        sleep 3
        kill -9 $xpid
    done 
}

# For some reason I was unable to set the following in xorg.conf
# We need to turn off power management of the main X server because it doesn't
# see either of the keyboards and the mice so it will enter power-saving mode
# after 10 minutes
xset s off
xset dpms 0 0 0
xset -dpms

xkb='xkbrules=xorg,xkbmodel=evdev,xkblayout=us'

# PS/2 keyboard and mouse
kbd1=`ls /dev/input/by-path/platform-*-event-kbd`
mouse1=`ls /dev/input/by-path/platform-*-event-mouse`

# USB keyboard and mouse
kbd2=`ls /dev/input/by-path/pci-*-event-kbd`
mouse2=`ls /dev/input/by-path/pci-*-event-mouse`

runscreen 1 1280x1024+1920+0 "$kbd2" "$mouse2" &
runscreen 0 1920x1080+0+0 "$kbd1" "$mouse1"

Remember to edit it to reflect your resolutions.

Run startx as the monitor user and see if it works.

This needs to be made to start at boot if it works, so add this to the end of ~/.profile (for the monitor account):

if [ "`tty`" = /dev/tty6 ]; then
    exec startx
fi

Kill the GUI and go to TTY6. Login as monitor and it should start up.

If that works, edit the file /etc/init/tty6.conf as root and replace the line starting with /sbin/getty with

exec /bin/login -f monitor tty6 </dev/tty6 >/dev/tty6 2>&1

If it works, but you want to also separate audio, the linked MultiSeatX guide has some stuff for you.

Please remember this may not work. I typed this up rather quickly and will hopefully edit it to be a bit more clear if necessary. I have adapted parts of the guide to be more up-to-date and increase the chance of success.

Good luck!

| improve this answer | |
  • Any knowledge on porting to LightDM? – Soren Sep 16 '16 at 13:46
  • @moo_we_all_do no, none at all. I can only get a somewhat specific idea of what this procedure does, and why it's needed, but I don't know how GDM works vs. LightDM. It's not really a problem to use GDM instead of LightDM though. Your login screen changes and that's about it (visibly). – TheWanderer Sep 16 '16 at 14:10
3

It sounds very cool, so I browsed around and found this wiki entry as linked from this wikipedia entry. It basically uses a tool called xephyr to organize inputs/outputs.

The entry is pretty old and only updated for ubuntu 12.04, but xephyr is still in the standard repos (just tested its presence on my computer). The config edits seem complex but pretty straightforward, it might still work. Here is a blog dating from 2014, that makes one also hopeful.

Please let us know how you fare!

| improve this answer | |
  • Nice, thanks! Can you post an edited down version of the instructions that fit my setup in your answer? – Soren Sep 7 '16 at 13:16
  • I do not think it is even possible. You will need to perform almost all of the steps (except the initial install), also gdm is now replaced by lightdm. Perhaps you have luck with the wizard mentioned in the entry? But also that one seems outdated... – Jeroen Sep 7 '16 at 18:16
1

I don't think this is possible because you can't have two sets of input devices. Its possible a tool like synergy might help here but it will be messy.

You could get another machine and use it as X Terminal , this would only need to be fast enough to update the screen so ask your friends for their old pc. If you configure your original machine to run XDMCP it will then allow the other machine to login to its own desktop.

This functionality is scheduled to be removed from ubuntu when X windows is replaced with Mir , this will probably be around the time of the next LTS release.

Here is ubuntu's guide to XDMCP - https://wiki.ubuntu.com/xdmcp

| improve this answer | |
  • We only have 1 good computer. Our other computers are slow. This would work? – Soren Sep 2 '16 at 13:49
  • i've done this with a pre pentium laptop and a cisco aironet wifi card – Amias Sep 3 '16 at 14:22
  • Can you add instructions to this answer? E.g. "Edit (file) to say this:.." – Soren Sep 3 '16 at 17:43
  • i have , the xdmcp instructions are all covered in that guide and are too long to reproduce here. xdmcp configuration is non trivial. – Amias Sep 5 '16 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.