testsAndMisc/linux_configuration/scripts/gaming/README.md
Krzysztof kuhy Rudnicki 038e08d2be feat: split oversized modules for 500-line limit, fix kasa coverage gap
Split diet_guard/_gatelock.py, wake_alarm/_alarm.py, and the
usage_report.py/_usage_report_parsing.py pair into focused
sub-modules so every Python file is <= 500 lines, satisfying
test_file_length.py. Install python-kasa into .venv (declared in
requirements but missing after the 3.13->3.14 venv upgrade),
fixing 8 failing smart_plug tests and restoring 100% coverage.

Also includes prior in-progress work from the working tree: the
wake_alarm Progress/View/Hardware field-grouping refactor,
brother_printer query module + tests, diet_guard foodbank/state/cli
updates, new shared coerce/logging_setup helpers, morning_routine
orchestrator tweaks, dwm window-manager config, gaming scripts, and
misc maintenance/digital-wellbeing script updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 07:19:37 +02:00

1.9 KiB
Raw Blame History

Dual Steam Accounts (same PC, two monitors)

Runs a second Steam instance as player2 on HDMI-0, alongside your main session on DP-0. Both accounts play simultaneously with full GPU acceleration — no VT switching needed.

One-time setup (fresh install)

1. Create the player2 user:

sudo useradd -m -G audio,video,input -s /bin/bash player2
sudo passwd player2

2. Install dependencies:

sudo pacman -S xorg-xhost

3. Add passwordless sudoers rule (allows launching Steam as player2 without a prompt):

echo "kuhy ALL=(player2) NOPASSWD: /usr/bin/steam" | sudo tee /etc/sudoers.d/player2-steam
sudo chmod 440 /etc/sudoers.d/player2-steam

4. Symlink the script into PATH:

sudo ln -sf ~/testsAndMisc/linux_configuration/scripts/gaming/start-player2.sh /usr/local/bin/start-player2

5. Start the getty on tty2 (needed if LightDM autologin is configured, otherwise tty2 has no login prompt):

sudo systemctl enable getty@tty2

Usage

start-player2

A Steam window opens as player2. Drag it to HDMI-0 and log into the second account. Click whichever monitor you want to control — no switching needed.

To stop: close the Steam window or pkill -u player2 -f steam.

How it works

  • Steam is launched as player2 via sudo -H -u player2 steam on DISPLAY=:0 (your main X session).
  • Because player2 has a separate home directory (~/.local/share/Steam/), the two Steam instances don't conflict — different PID locks, different configs, different accounts.
  • xhost +local: grants local users access to your X display.
  • Full GPU acceleration since there is no nesting — both instances hit the hardware directly.

Monitor layout

Output Resolution Session
DP-0 3840×2160 kuhy (main)
HDMI-0 2560×1440 player2