RemoteViewer — Multi-session host (Linux)
=========================================

Turns one Linux box into an xrdp-style multi-session server: several people connect at the same time and each
one logs in with their OWN OS account and gets a private, freshly spawned desktop. Nobody sees anyone else's
screen, and the person at the physical console is not disturbed.

Requirements
------------
  * Linux, and the service runs as ROOT (PAM reads /etc/shadow; each desktop is spawned as its user via runuser).
  * Xvfb + a window manager (openbox/fluxbox/icewm/…) — REQUIRED. pulseaudio — optional (per-session audio).
      Debian/Ubuntu:  sudo apt-get install -y xvfb xauth openbox pulseaudio util-linux
      RHEL/Fedora:    sudo dnf install -y xorg-x11-server-Xvfb xorg-x11-xauth openbox pulseaudio util-linux
  * The RemoteViewer client installed (../install.sh) — this installer runs it for you if it is missing.
  * This PC REGISTERED for unattended access by its owner: open RemoteViewer as that user and do 무인 등록,
    so the host is reachable as a device in that account's 내 기기 list.

Install
-------
    sudo ./install.sh                 # owner auto-detected from who invoked sudo
    sudo ./install.sh <username>      # or name the owner explicitly

Starts remoteviewer-multisession.service (enabled at boot). From then on, a viewer who connects to this device
sees an OS-login box; after logging in with an account of THIS machine they get their own desktop.

Configure
---------
Edit /etc/remoteviewer/multisession.conf, then:  sudo systemctl restart remoteviewer-multisession
  RV_SESSION_GEOMETRY   size of each desktop (default 1920x1080)
  RV_MAX_SESSIONS       cap on concurrent desktops (default 8) — each one costs RAM/CPU
  RV_SESSION_IDLE_MIN   reclaim a desktop after N minutes with no viewer input (default: never)
  RV_SESSION_PERSIST    keep a user's desktop across disconnects and reattach on reconnect (default off)
  RV_SESSION_AUDIO      per-session audio (default on; 0 to disable)
  RV_SESSION_WM         window manager for the built-in session (default: auto-detect openbox/…)
  RV_SESSION_CMD        run a FULL desktop environment instead of the built-in WM+terminal session
                        (e.g. startxfce4, or gnome-session — heavy under Xvfb). A user's ~/.xsession is
                        used automatically when this is unset.
  RV_PAM_SERVICE        PAM service for OS logins (default 'remoteviewer', installed by install.sh)

What the desktop looks like
---------------------------
Each login gets a FRESH session (not your existing desktop — that is the RDP/xrdp model). By default it runs a
window manager + a terminal + a file manager, so it is usable immediately. Install a terminal (e.g. xterm) for
this to work; a window manager alone shows only a black screen. For a full desktop, set RV_SESSION_CMD.

Status / logs
-------------
    systemctl status remoteviewer-multisession
    /var/log/remoteviewer-multisession.log

Uninstall
---------
    sudo ./uninstall.sh               # removes the service; leaves the client app

Notes
-----
  * This REPLACES the login-screen host on this device — you cannot run both, since they are the same device's
    agent. install.sh disables remoteviewer-login.service if it is present.
  * Windows has no equivalent (concurrent sessions are RDS-licensed); this is a Linux-only feature.
  * The desktop is X11 (Xvfb). Wayland-only apps are not served.
