A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
I have been wondering about setting up one of my computers for 2 or 3 users with 3 mice, 3 keyboards and 3 monitors.
This apparently may require 3 video boards with Ubuntu. That could be a problem with AGP, but PCI Express may work fine with that. Only problem, in most cases boards only have 2 slots these days...
Anyway, if I ever try to do that, I'll put the info here on how I got it to work... for now, you'll want to look at this page on Ubuntu:
https://help.ubuntu.com/community/MultiseatX
https://wiki.ubuntu.com/MultiseatTeam/Status
https://wiki.ubuntu.com/MultiseatTeam/Instructions
https://www.x.org/wiki/Development/Documentation/Multiseat/
https://en.wikibooks.org/wiki/Multiseat_Configuration/Xephyr
https://askubuntu.com/questions/115421/how-can-i-make-a-multiseat-with-xephyr/554151#554151
On newer versions of Ubuntu, it looks like some people worked on graphical interfaces to help you create multiple seats on a single computer. It is not clear how the video is managed, however, from what I've seen it would work in a very similar way as the keyboard and mouse: the computer assigns port information to each port available in the computer, and you can simply say use port X for seat Y.
https://code.google.com/archive/p/multiseat-wizard-bicefalo/
The following is a question on Ubuntu (without answer at the time of writing) of someone who setup his computer with a mostly working environment:
https://askubuntu.com/questions/477341/mutiseat-with-14-04-using-intel-onboard-and-nvidia-gpu
The following commands are used to check your multiseat setup. This includes commands that work on actual seats which does not work if you have a single video board and two output (like an NVidia card with a DVI-A and Output Display set of connectors.)
It is possible to list the users and their seat if they are attached to one. This is done with the loginctl command:
loginctl
The listing includes a session, a user name (the Unix name), the UID of the user and if assigned, a seat.
List existing seats. You will always see a seat0 entry. New seats are expected to appear as you add new displays to your computer and define them with udev. If you have a single nVidia card with two or three output, you will NOT be able to setup a second display with udev because the nVidia driver does not give you that kind of granularity.
loginctl list-seats
So in my case I only get seat0, even after defining the mice and keyboards as seat-1, seat-2, etc. So it very much looks like the only way to get additional seats is to have multiple displays.
The list of devices can be obtained in many different ways. However, if you want to setup udev, the best is certainly to get a udev list of the devices.
udevadm info --export-db | less
This lists all the devices and you can assign values to them (tags) to mark them for seat-1, seat-2, etc. However, as I mentioned in another paragraph, it does not look like seats get created unless you have a display assigned such tags. If you only update mice and keyboards, it does not make any difference.
You could also check with xinput:
xinput list
This gives you interesting information about mice and keyboard.
The mouse devices appear as /dev/input/mouse# where # is a number. In order to test which mouse has which number you can use the following:
sudo od -x /dev/input/mouse0
Then move your mouse. If you see output, that's mouse0. Repeast with mouse1, mouse2, etc. You may also want to look into the /dev/input/by-id/... files. If you unplug and replug the devices, then their ID should not change, whereas the index may.
IMPORTANT NOTE: This may mess up your mouse to the point where you have to restart X11. From a console, you can use service lightdm restart for that purpose. If that fails too, try to reboot.Note that if you are working from SSH, then it will be very easy to test a mouse and restart X11 afterward.
Supposedly you can do the same with keyboard by testing the /dev/input/event# files. However, when I tested that, it did not work properly at all. So I do not recommend you try those:
sudo od -x /dev/input/event0
Just like with mice, it should only output data if the corresponding keyboard is used.
IMPORTANT NOTE: This may mess up your keyboard to the point where you have to restart X11. From a console, you can use service lightdm restart for that purpose. If that fails too, try to reboot. Note that if you are working from SSH, then it will be very easy to test a keyboard and restart X11 afterward.
When installing the NVidia proprietary driver, you can use the configuration tool to setup your XOrg server.
nvidia-xconfig nvidia-settings
The nvidia-xconfig tool starts a configuration screen that allows you to create a new xorg.conf file.
The nvidia-settings tool opens a window in which you can setup your monitor(s), adjust colors, change the OpenGL settings, etc. This is generally used to change the settings once you got your X11 starting as expected.
Once you started an X session, you can run xrandr to get detailed information about your display.
xrandr --query
The output gives you information that can be useful in your xorg.conf file.
Assuming you are using lightdm, there are two ways to set it up. One is to setup a multiseat when you have multiple video boards or at least you can setup the udev in order to have multiple seats. In that case, it is very simple, you just have to turn on the multiseat option (in /etc/lightdm/lightdm.conf):
[LightDM] logind-load-seats=true
This should be all you have to do because the server can then determine everything it needs using the seat-# defined with udev. However, if you could not get more than seat0 in your list of seats (udevadm list-seats) then you won't be able to use that simple setup...
You will find a complete set of all the options lightdm supports in:
/usr/share/doc/lightdm/lightdm.conf.gz
The lightdm settings, or any file that it references such as the greeters, may be wrong. If so the results of using those will be saved in log files under:
/var/log/lightdm
You are not unlikely to find some really informative data in those logs.
When running a computer with many users (two or more) than you may want policies to be in place.
By default, policies are expected to prevent users with lesser rights from shutting down the computer even if they normally have the right to do so. The detection of a separate session owned by an administrator is enough to prevent the shutdown process from even starting.
These sessions can be listed as follow:
ck-list-sessions
You should see one or two sessions per user. At times more. If you do not see a session for a certain user, then that user is NOT affected by the polkit-1 settings. Whatever you set them up as will be ignored by that user and thus if the user is somehow given permission to shutdown the computer, he will be able to do it whether you have a setup that prevents the shutdown when you are logged in as an administrator.
There are other ck commands as follow:
ck-history # shows past session information ck-launch-session # start a new session ck-log-system-start/stop/restart # manage the log
On my end I have a problem on two computers where sessions do not get created for my normal users. I hope to one day resolve this mistery. Unfortunately, it is very complicated to follow the throught of those people who make that work. I have no clue what script or package is missing or misconfigured...
There is also a command that lists the various actions defined in your polkit-1 rules:
pkactions
This tool can be used to make sure you have the necessary rules defined.
No protocol specified Xephyr cannot open host display. Is DISPLAY set?
As I was trying to write the correct script to get Xephyr to start I got this strange No protocol specified error. Strange since when using the X11 protocol, I never had to specify a protocol. Actually the problem was what is called the X Authority which was not properly specified.
export XAUTHORITY=/var/run/lightdm/root/:0
By adding this line, this problem was resolved and the Xephyr server went past the DISPLAY not set error. At this point, though, it still doesn't work.
IMPORTANT: If you have Ubuntu 14.10 or better, skip this step. You already have a valid version of lightdm.
So... I started with installing the PPA so I could get lightdm version 1.10.3. The instructions say that you have better have at least 1.10.2 instead of 1.10.1 or older.
sudo add-apt-repository ppa:ubuntu-multiseat/ppa sudo apt-get update sudo apt-get upgrade sudo service lightdm restart
Since 1.10.3 has a larger version, just upgrading is enough to get the newer version installed. Then you want to restart the DM to make sure that it makes use of the new versions.
In order to make it work right, you need each keyboard and mouse to be viewed as separate devices. This is normally done using seats. However, if your seats do not want to work (i.e. you have a single NVidia video board) then you need to fallback on the evdev driver for X11:
sudo apt-get install xserver-xorg-input-evdev
Note that this package is likely already installed on your system.
The very first thing you want to do is edit your lightdm settings to mark it to start automatically. This is done by editing your lightdm settings:
sudo vim /etc/lightdm/lightdm.conf
It could be that you should instead add a file under the lightdm.conf.d directory... TBD
Then add the following rule to the file:
[LightDM] logind-load-seats=true
Note that many documents present many more options to put in the LightDM entry. These documents do not apply to newer versions of the lightdm deamon. So be sure to ignore most of those.
There are a few things that people like to do such as auto-log a user on a specific seat. That is still reached by adding options to your lightdm file.
IMPORTANT NOTE: To add a comment to the lightdm.conf file, use the '#' character. This looks like a dot ini file, but the semi-colon is not supported. So for example:
[LightDM] # Allow Multiseat logind-load-seats=true
The file also supports empty lines.
See http://www.reactivated.net/writing_udev_rules.html
The udev setup is important because that's what defines the seats so without that setup, the logind-load-seats =true has no effect.
To find out what's what, you probably want to use the udevadm command line.
Recent Posts on The Linux Page: