Update kiosk mode documentation

parent 69180211
# Multi-Seat Automation Guide (Non-Systemd / LightDM) # Comprehensive Multi-Seat Automation Guide (Non-Systemd / LightDM)
This document provides a complete setup for automating two separate X sessions for different users on two displays without using `systemd` or `loginctl`. This document provides a unified setup for automating two separate X sessions for different users on two displays without using `systemd` or `loginctl`. It covers Single-GPU (AMD/Intel/Nvidia) and Dual-GPU configurations.
## 1. Hardware Identification ## 1. Hardware Identification
Before applying the configurations, identify your hardware IDs: Before configuring, run these commands to identify your hardware IDs:
- **GPU BusID:** Run `lspci | grep -E "VGA|3D"`. (Example: `01:00.0` becomes `PCI:1:0:0` in Xorg). - **GPU BusID:** `lspci | grep -E "VGA|3D"` (e.g., `01:00.0` becomes `PCI:1:0:0`).
- **Input USB IDs:** Run `lsusb`. (Example: `ID 046d:c077`). - **Output Names (AMD/Intel):** `xrandr | grep " connected"` (e.g., `HDMI-1`, `DP-1`).
- **Input USB IDs:** `lsusb` (e.g., `046d:c077`).
## 2. Xorg Configuration Files ## 2. Xorg Configuration Files
Create two separate configuration files to isolate the hardware for each session. Create two separate configuration files in `/etc/X11/`.
### File: /etc/X11/xorg.seat0.conf ### File: `/etc/X11/xorg.seat0.conf`
Section "ServerFlags" Section "ServerFlags"
Option "AutoAddDevices" "false" Option "AutoAddDevices" "false"
Option "DontVTSwitch" "true" Option "DontVTSwitch" "true"
...@@ -18,17 +19,24 @@ EndSection ...@@ -18,17 +19,24 @@ EndSection
Section "Device" Section "Device"
Identifier "GPU0" Identifier "GPU0"
Driver "modesetting" Driver "modesetting" # Use "nvidia" for proprietary drivers
BusID "PCI:1:0:0" # <--- UPDATE THIS BusID "PCI:1:0:0" # Update with your Primary GPU BusID
# --- For Single GPU (AMD/Intel) ---
# Option "ZaphodHeads" "HDMI-1"
# --- For Single GPU (Nvidia) ---
# Screen 0
# Option "ProbeAllGpus" "false"
EndSection EndSection
Section "InputClass" Section "InputClass"
Identifier "Seat0-Input" Identifier "Seat0-Input"
MatchUSBID "XXXX:XXXX" # <--- UPDATE THIS (User 1 Mouse/KB) MatchUSBID "XXXX:XXXX" # Update with User 1 Mouse/KB ID
Driver "evdev" Driver "evdev"
EndSection EndSection
### File: /etc/X11/xorg.seat1.conf ### File: `/etc/X11/xorg.seat1.conf`
Section "ServerFlags" Section "ServerFlags"
Option "AutoAddDevices" "false" Option "AutoAddDevices" "false"
Option "DontVTSwitch" "true" Option "DontVTSwitch" "true"
...@@ -36,18 +44,27 @@ EndSection ...@@ -36,18 +44,27 @@ EndSection
Section "Device" Section "Device"
Identifier "GPU1" Identifier "GPU1"
Driver "modesetting" Driver "modesetting"
BusID "PCI:2:0:0" # <--- UPDATE THIS (Or same as above for single-GPU Zaphod)
# Dual GPU: Use 2nd BusID. Single GPU: Use same BusID as Seat0.
BusID "PCI:2:0:0"
# --- For Single GPU (AMD/Intel) ---
# Option "ZaphodHeads" "DP-1"
# --- For Single GPU (Nvidia) ---
# Screen 1
# Option "ProbeAllGpus" "false"
EndSection EndSection
Section "InputClass" Section "InputClass"
Identifier "Seat1-Input" Identifier "Seat1-Input"
MatchUSBID "YYYY:YYYY" # <--- UPDATE THIS (User 2 Mouse/KB) MatchUSBID "YYYY:YYYY" # Update with User 2 Mouse/KB ID
Driver "evdev" Driver "evdev"
EndSection EndSection
## 3. LightDM Configuration ## 3. LightDM Configuration
Edit your /etc/lightdm/lightdm.conf to define the seats manually and disable logind seat loading. Edit `/etc/lightdm/lightdm.conf` to manually define the seats.
[LightDM] [LightDM]
logind-load-seats=false logind-load-seats=false
...@@ -56,39 +73,44 @@ logind-load-seats=false ...@@ -56,39 +73,44 @@ logind-load-seats=false
xserver-command=X :0 vt7 -config xorg.seat0.conf xserver-command=X :0 vt7 -config xorg.seat0.conf
autologin-user=user1 autologin-user=user1
autologin-user-timeout=0 autologin-user-timeout=0
user-session=your-session-name user-session=your-desktop-environment
[Seat:1] [Seat:1]
xserver-command=X :1 vt8 -config xorg.seat1.conf xserver-command=X :1 vt8 -config xorg.seat1.conf
autologin-user=user2 autologin-user=user2
autologin-user-timeout=0 autologin-user-timeout=0
user-session=your-session-name user-session=your-desktop-environment
## 4. Automation & Permissions Script ## 4. Automation & Permissions Script
Save this as setup-multiseat.sh, run chmod +x setup-multiseat.sh, and execute as root. Save as `setup-multiseat.sh`, run `chmod +x setup-multiseat.sh`, and execute as root.
#!/bin/bash #!/bin/bash
# 1. Create users and assign to hardware groups
# 1. Ensure users exist and are in hardware groups
USERS=("user1" "user2") USERS=("user1" "user2")
for USER in "${USERS[@]}"; do for USER in "${USERS[@]}"; do
if ! id "$USER" &>/dev/null; then if ! id "$USER" &>/dev/null; then
useradd -m -s /bin/bash "$USER" useradd -m -s /bin/bash "$USER"
echo "User $USER created."
fi fi
# Vital: Without logind, users need direct group access to hardware # Essential for hardware access without logind
usermod -aG video,audio,input,tty "$USER" usermod -aG video,audio,input,tty "$USER"
done done
# 2. Fix TTY and DRI permissions for non-root X # 2. Manual permission fixes for non-systemd environments
chmod 660 /dev/tty7 /dev/tty8 chmod 660 /dev/tty7 /dev/tty8
chmod 666 /dev/dri/card* 2>/dev/null || true chmod 666 /dev/dri/card* 2>/dev/null || true
chmod 666 /dev/input/event* 2>/dev/null || true
# 3. Nvidia-specific permission fix
if [ -e /dev/nvidiactl ]; then
chmod 666 /dev/nvidia*
fi
echo "Multi-seat configuration complete."
echo "Restart LightDM: 'service lightdm restart' or '/etc/init.d/lightdm restart'"
# 3. Final Verification ## 5. Critical Troubleshooting Notes
echo "Configuration files generated. Please ensure /etc/X11/xorg.seat*.conf" - **Input Isolation:** If one mouse moves both cursors, verify `AutoAddDevices` is `false` in both Xorg files.
echo "contain the correct PCI BusIDs and USB IDs for your hardware." - **Nvidia Single GPU:** Nvidia does not support `ZaphodHeads`. You must use `Screen 0` and `Screen 1` syntax as shown in the comments above.
echo "Restart LightDM to apply: 'service lightdm restart' or '/etc/init.d/lightdm restart'" - **Audio:** Since `logind` is absent, use a system-wide [PipeWire](https://pipewire.org) instance or [ALSA dmix](https://alsa.opensrc.org) to prevent one user from locking the sound card.
- **Documentation:** Refer to the [Xorg Multi-seat ArchWiki](https://wiki.archlinux.org) for driver-specific flags.
## 5. References
- [Xorg Multi-seat Documentation](https://wiki.archlinux.org)
- [LightDM Configuration Manual](https://github.com)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment