Use official LinuxServer package mod for Hermes Webtop
This commit is contained in:
1 parent
5957e34e72
commit
f625c9a670
5 files changed
+47
-53
No files matched your search
@@ -14,6 +14,7 @@ Verify the actual result after actions. A driver action reported as unverifiable
|
||||
Do not use Hermes Bot Screen/computer_use for this desktop: that path creates a separate Xvnc desktop.
|
||||
|
||||
Files, browser profile and tools under /config or /opt/hermes-workspace survive container recreation.
|
||||
For additional Debian packages, keep one package name per line in /config/.hermes-workspace/packages.txt.
|
||||
The startup installer restores packages on recreation. An ad-hoc apt install alone does not survive an image update.
|
||||
Native Debian packages are managed by the official LinuxServer universal-package-install Docker mod.
|
||||
The Unraid container variable INSTALL_PACKAGES lists packages separated by |. Change that setting for persistent reinstalls.
|
||||
An ad-hoc apt install alone does not survive an image update. Supported portable GUI apps can use official proot-apps.
|
||||
Never modify Unraid or other containers to fix a workspace problem.
|
||||
@@ -32,30 +32,31 @@ Host `/mnt/nvme-storage/appdata/Hermes-Workspace` is `/config` (user home).
|
||||
Its `init` subdirectory is additionally mounted at `/custom-cont-init.d:ro`;
|
||||
`services` at `/custom-services.d:ro`; `tools` at `/opt/hermes-workspace`.
|
||||
|
||||
`install-tools.sh` is deployed as `init/10-hermes-tools`; `sshd-service.sh` as
|
||||
`services/sshd`. `webtop-session` and `webtop-browser` live in `tools/bin`.
|
||||
These are LinuxServer's documented custom init/service mechanisms:
|
||||
https://docs.linuxserver.io/general/container-customization/
|
||||
LinuxServer does not formally support user-authored extensions themselves.
|
||||
Native packages now use the official LinuxServer Docker mod:
|
||||
|
||||
The installer restores missing Debian packages from
|
||||
`/config/.hermes-workspace/packages.txt` when the container is recreated.
|
||||
Native packages are reinstalled, not magically preserved in the image. Package
|
||||
repositories/network must therefore be reachable on first boot after recreation.
|
||||
Node package and Cua binary files live in the persistent tools mount.
|
||||
Browser profile is `/config/.hermes-workspace/browser-profile`; work is
|
||||
`/config/workspace`. The boot recipe clears only this browser's stale singleton
|
||||
locks and own agent-browser runtime socket/PID files before a fresh session starts.
|
||||
```
|
||||
DOCKER_MODS=linuxserver/mods:universal-package-install
|
||||
INSTALL_PACKAGES=openssh-server|rsync|python3|python3-venv|python3-pil|nodejs|curl|ca-certificates|xdotool|at-spi2-core|dbus-x11|xauth
|
||||
```
|
||||
|
||||
Additional apt packages must be recorded one per line in packages.txt; an ad-hoc
|
||||
apt install alone does not survive an image replacement. Other user-installed
|
||||
software also needs a persistent location or an explicit installation recipe.
|
||||
The variables are stored in the live Unraid template. Packages are reinstalled
|
||||
on image recreation; they are not stored in home. The former custom package
|
||||
installer and packages.txt have been removed. For supported portable GUI apps,
|
||||
LinuxServer recommends proot-apps instead.
|
||||
Official reference: https://docs.linuxserver.io/selkies/user-guide/installing-apps/
|
||||
|
||||
Debian's openssh-server is configured for key-only `abc` login. Host private keys
|
||||
are under `/config/.hermes-workspace/hostkeys` (root-only); authorized_keys is 0600.
|
||||
The bootstrap prevents package post-install scripts from starting an unconfigured
|
||||
sshd. pam_loginuid is removed from this container's SSH PAM chain because container
|
||||
loginuid cannot be written; neither Unraid PAM nor Hermes binaries are changed.
|
||||
`configure-session.sh` is configuration only, deployed as
|
||||
`init/90-hermes-session-config`. It contains no apt, npm, curl, or binary-download
|
||||
installation. It configures key-only SSH, desktop environment, symlinks and
|
||||
ownership, using LinuxServer's custom init mechanism. `sshd-service.sh` remains
|
||||
as `services/sshd`. These Hermes-specific helpers are not vendor-provided
|
||||
integrations and remain necessary for the existing SSH/desktop connection.
|
||||
|
||||
Existing Cua and agent-browser files remain in the persistent tools mount;
|
||||
`webtop-session` and `webtop-browser` live in tools/bin. A fresh restore requires
|
||||
this tools directory as well as the home, init and services directories.
|
||||
Browser profile is `/config/.hermes-workspace/browser-profile`; work remains
|
||||
`/config/workspace`. No user data or keys were removed by the migration.
|
||||
|
||||
## Hermes integration
|
||||
|
||||
@@ -177,7 +178,7 @@ requires ownership to match its runtime user. Chown of this directory to abc:abc
|
||||
allowed the existing s6 supervisor to start PulseAudio normally; no audio/streaming
|
||||
service script was patched and no manual readiness marker was fabricated.
|
||||
|
||||
The same correction is now in install-tools.sh for subsequent image recreations.
|
||||
The same correction is now in configure-session.sh for subsequent image recreations.
|
||||
Confirmed PulseAudio up, readiness PID present, Selkies listening on localhost:8082,
|
||||
and a real WSS upgrade through published HTTPS port 3021 at /api/websockets. Three
|
||||
actual server messages were received. Direct browser video-frame rendering is not
|
||||
|
||||
Executable → Regular
+2
-29
@@ -1,25 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
mkdir -p /config/.hermes-workspace /config/.cache/apt/archives/partial
|
||||
if ! test -f /config/.hermes-workspace/packages.txt; then
|
||||
printf '%s\n' openssh-server rsync python3 python3-venv python3-pil nodejs curl ca-certificates xdotool at-spi2-core dbus-x11 xauth > /config/.hermes-workspace/packages.txt
|
||||
fi
|
||||
packages=()
|
||||
while IFS= read -r package; do
|
||||
[[ -z "$package" || "$package" == \#* ]] && continue
|
||||
[[ "$package" =~ ^[a-z0-9][a-z0-9+.-]*$ ]] || { echo 'Invalid package name'; exit 1; }
|
||||
dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -qx 'install ok installed' || packages+=("$package")
|
||||
done < /config/.hermes-workspace/packages.txt
|
||||
if (( ${#packages[@]} )); then
|
||||
policy_added=0
|
||||
if ! test -e /usr/sbin/policy-rc.d; then
|
||||
printf '#!/bin/sh\nexit 101\n' > /usr/sbin/policy-rc.d; chmod 755 /usr/sbin/policy-rc.d; policy_added=1
|
||||
fi
|
||||
apt-get update
|
||||
apt-get -o Dir::Cache::archives=/config/.cache/apt/archives install -y --no-install-recommends "${packages[@]}"
|
||||
if (( policy_added )); then rm /usr/sbin/policy-rc.d; fi
|
||||
fi
|
||||
# Configuration only. Native packages are managed by the official LinuxServer mod.
|
||||
mkdir -p /run/sshd /config/.hermes-workspace/hostkeys /config/workspace /opt/hermes-workspace/bin
|
||||
chown root:root /config/.hermes-workspace/hostkeys
|
||||
chmod 700 /config/.hermes-workspace/hostkeys
|
||||
@@ -27,14 +8,6 @@ for kind in ed25519 rsa; do
|
||||
test -f /config/.hermes-workspace/hostkeys/ssh_host_${kind}_key || ssh-keygen -q -t "$kind" -N '' -f /config/.hermes-workspace/hostkeys/ssh_host_${kind}_key
|
||||
done
|
||||
usermod -s /bin/bash abc
|
||||
if ! test -f /opt/hermes-workspace/cua/version-0.36.0; then
|
||||
mkdir -p /opt/hermes-workspace/cua
|
||||
curl -fsSL --retry 3 https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz | tar -xz -C /opt/hermes-workspace/cua
|
||||
touch /opt/hermes-workspace/cua/version-0.36.0
|
||||
fi
|
||||
if ! test -x /opt/hermes-workspace/node/bin/agent-browser; then
|
||||
npm install -g --prefix /opt/hermes-workspace/node --ignore-scripts --no-audit 'agent-browser@0.26.0'
|
||||
fi
|
||||
cat > /etc/ssh/sshd_config.d/hermes-workspace.conf <<'EOF'
|
||||
Port 22
|
||||
HostKey /config/.hermes-workspace/hostkeys/ssh_host_ed25519_key
|
||||
@@ -64,7 +37,7 @@ ln -sf /opt/hermes-workspace/cua/cua-driver /usr/local/bin/cua-driver
|
||||
# PulseAudio requires the configuration directory to belong to its runtime user.
|
||||
# Old Webtop homes can retain the former PUID; retain content and correct ownership.
|
||||
if test -d /config/.config/pulse; then chown -R abc:abc /config/.config/pulse; fi
|
||||
chown abc:abc /config/.hermes-workspace /config/.hermes-workspace/packages.txt
|
||||
chown abc:abc /config/.hermes-workspace
|
||||
chown -R abc:abc /config/workspace /opt/hermes-workspace/node
|
||||
if test -f /config/.hermes-workspace/authorized_keys; then
|
||||
chown abc:abc /config/.hermes-workspace/authorized_keys
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"package_installation": "linuxserver/mods:universal-package-install",
|
||||
"old_custom_installer_removed": true,
|
||||
"old_packages_list_removed": true,
|
||||
"container_recreated": true,
|
||||
"hermes_uid_99_ssh": true,
|
||||
"mcp_tools_discovered": 64,
|
||||
"mcp_start_session": true,
|
||||
"mcp_desktop_state": true,
|
||||
"data_and_key_mounts_preserved": true,
|
||||
"remaining_custom_components": [
|
||||
"configuration-only init",
|
||||
"sshd service",
|
||||
"desktop/browser session wrappers"
|
||||
],
|
||||
"note": "No inference test required; actual SSH and MCP transport tested. Safari self-signed certificate limitation unchanged."
|
||||
}
|
||||
@@ -23,4 +23,6 @@
|
||||
<Config Name="TZ" Target="TZ" Default="Europe/Berlin" Mode="" Type="Variable" Display="always" Required="true" Mask="false">Europe/Berlin</Config>
|
||||
<Config Name="TITLE" Target="TITLE" Default="Hermes Workspace" Mode="" Type="Variable" Display="always" Required="true" Mask="false">Hermes Workspace</Config>
|
||||
<Config Name="LC_ALL" Target="LC_ALL" Default="de_DE.UTF-8" Mode="" Type="Variable" Display="always" Required="true" Mask="false">de_DE.UTF-8</Config>
|
||||
<Config Name="DOCKER_MODS" Target="DOCKER_MODS" Default="linuxserver/mods:universal-package-install" Type="Variable" Display="always" Required="false" Mask="false">linuxserver/mods:universal-package-install</Config>
|
||||
<Config Name="INSTALL_PACKAGES" Target="INSTALL_PACKAGES" Default="openssh-server|rsync|python3|python3-venv|python3-pil|nodejs|curl|ca-certificates|xdotool|at-spi2-core|dbus-x11|xauth" Type="Variable" Display="always" Required="false" Mask="false">openssh-server|rsync|python3|python3-venv|python3-pil|nodejs|curl|ca-certificates|xdotool|at-spi2-core|dbus-x11|xauth</Config>
|
||||
</Container>
|
||||
Reference in new issue
Block a user