Instructions
6400
Comment: oops, forgot menu bar and table of contents
|
6521
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
= Instructions = | |
Line 62: | Line 61: |
Modify your `lightdm.conf` and make sure you have an entry per seat. Add `xdg-seat=<seatname>` to each seat and add `xserver-vt=0` to each seat EXCEPT `seat0`. Also, add `user-authority-in-system-dir=true` to the `SeatDefaults` section. This prevents LightDM from trying to use the same Xauthority file for all seats, which causes permission denied problems. |
Modify your `lightdm.conf` and: * make sure you have an entry per seat * add `xdg-seat=<seatname>` to each seat's entry * add `xserver-vt=0` to each seat's entry EXCEPT `seat0` (only required for Ubuntu 13.10 (saucy) and older) * add `user-authority-in-system-dir=true` to the `SeatDefaults` section (this prevents LightDM from trying to use the same Xauthority file for all seats, which causes 'permission denied' problems) |
Line 82: | Line 83: |
# the following line is not required in 14.04 (trusty) and newer |
Contents
Interested in setting up your own multiseat system? Follow these instructions:
1. Name Your Seats
Come up with names for your seats. You must have a primary seat named seat0. All other seat names must begin with seat (see the rules for seat naming). Note that VT switching (and thus fast user switching) is (currently) only possible on seat0.
2. Configure Seat Hardware
Assign hardware devices to your seats by setting up udev rules.
Per-Device Configuration
A device that is associated with a seat must be configured as follows:
It MUST be tagged with seat. This is required, even for seat0. The existing udev rules do this properly 99% of the time, but exotic hardware, proprietary drivers, or unusual circumstances may require you to write your own udev rules to tag a device with seat or to prevent a device from being tagged with seat.
Tag it with the seat name (e.g., seat1). This is optional for seat0 but required for other seats.
Set the ID_SEAT property to the seat name (e.g., seat1). This is optional for seat0 but required for other seats.
master-of-seat
One of the devices for your seat MUST be tagged with master-of-seat. This tag signals to logind that the seat hardware is ready (enough) to start a display manager on that seat. If the tag doesn't exist on any of the seat's hardware, logind won't tell the display manager about the seat, and might not set device permissions properly if a user logs into that seat (TODO: confirm).
The udev rules that come with open-source video drivers tag the video card with master-of-seat for you. You should only need to set up a rule to tag master-of-seat if you are using a proprietary video card driver.
It is recommended that you apply the master-of-seat tag to the video card, but you may tag a different device instead. Tagging the video card with master-of-seat is recommended because it is often the only device that is critical for the seat.
Example #1
Example system #1 has two seats (seat0 and seat1) and uses open-source video drivers. The file /etc/udev/rules.d/99-multiseat.rules was created and the following rules were added to it:
# assign USB ports TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1d.7/usb2/*", ENV{ID_SEAT}="seat1", TAG+="seat1" # assign video cards TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:07.0/0000:03:00.0/*", ENV{ID_SEAT}="seat1", TAG+="seat1"
Example #2
Example system #2 has two seats (seat0 and seat1) and uses the proprietary NVIDIA driver. The file /etc/udev/rules.d/99-multiseat.rules was created and the following rules were added to it:
# assign USB ports TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/*", ENV{ID_SEAT}="seat1", TAG+="seat1" # assign video cards TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/*", ENV{ID_SEAT}="seat1", TAG+="seat1" # add master-of-seat tag to video cards TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0/*", TAG+="master-of-seat" TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/*", TAG+="master-of-seat"
Tips and Troubleshooting
You MUST NOT have any newlines in a rule.
Use udevadm trigger after you edit your rules to make them take effect
Use udevadm info --export-db to see what udev did with your devices (to debug your rules).
3. Configure lightdm
Modify your lightdm.conf and:
- make sure you have an entry per seat
add xdg-seat=<seatname> to each seat's entry
add xserver-vt=0 to each seat's entry EXCEPT seat0 (only required for Ubuntu 13.10 (saucy) and older)
add user-authority-in-system-dir=true to the SeatDefaults section (this prevents LightDM from trying to use the same Xauthority file for all seats, which causes 'permission denied' problems)
If you do not use the version of X from the multiseat PPA, you will need to tell LightDM to start /lib/systemd/systemd-multi-seat-x instead of X. This program is a small wrapper around X that prevents input events on non-seat0 seats from going to seat0 and disables VT switching on non-seat0 seats. It is only available in Ubuntu 13.10 (saucy) and newer.
Example:
[SeatDefaults] user-authority-in-system-dir=true # for saucy and newer: the following line is only needed if you're not # using the version of X from the multiseat PPA (but it shouldn't hurt # if you are) xserver-command=/lib/systemd/systemd-multi-seat-x [Seat:0] xdg-seat=seat0 [Seat:1] xdg-seat=seat1 # the following line is not required in 14.04 (trusty) and newer xserver-vt=0
4. (if needed) Configure X.Org Server
Suppose you need to modify your xorg.conf to change some video driver settings for seat1. You have a couple of options:
Create a file like /etc/X11/xorg.conf.seat1 that contains all X settings for seat1, then set xserver-config in your /etc/lightdm/lightdm.conf:
[Seat:1] xdg-seat=seat1 xserver-vt=0 xserver-config=/etc/X11/xorg.conf.seat1
Note: This will not work if you use the systemd-multi-seat-x wrapper because it generates its own config file that overrides the xserver-config value. There's also no way to do such a thing if you use gdm instead of lightdm (e.g. if you have installed Ubuntu GNOME), because it doesn't support passing custom config file to X server.
Create a file like /etc/X11/xorg.conf.d/90-seat1.conf and put the settings there. This config file will be read by all seats, so use the MatchSeat directive to target the settings to a particular seat. For example:
Section "Device" Identifier "card0" Driver "nvidia" Option "NoLogo" "True" MatchSeat "seat1" EndSection
5. Install PPA Packages
Upgrade to the packages in the multiseat PPA by running the following commands:
sudo apt-add-repository ppa:ubuntu-multiseat/ppa sudo apt-get update sudo apt-get upgrade
6. (raring only) install libpam-systemd
The libpam-systemd package replaces libpam-xdg-support. Ubuntu 13.10 (saucy) and newer already have libpam-systemd installed.
7. Reboot
8. Profit!
MultiseatTeam/Instructions (last edited 2014-12-16 13:01:43 by 187-11-244-53)