Add reproducible Python baseline and Guacamole graphics presets
This commit is contained in:
1 parent
620f882fe2
commit
98a474696b
8 files changed
+380
-35
No files matched your search
@@ -24,11 +24,47 @@ password to the VM. Clipboard, drives, printing, audio, microphone input, GFX,
|
||||
and display-resize extensions are disabled because the fixture's VirtualBox
|
||||
RDP4 server does not handle them reliably.
|
||||
|
||||
## Network and graphics quality
|
||||
|
||||
Use `--graphics minimal|low|normal|high` on `up`, or set `RDP_ACCESS_GRAPHICS`:
|
||||
|
||||
| Mode | Requested display | Color | Intended use |
|
||||
| --- | --- | --- | --- |
|
||||
| `minimal` | 800×600, 96 DPI | 8-bit / 256 colors | Lowest pixel/color budget; substantial color loss |
|
||||
| `low` | 1024×768, 96 DPI | 16-bit | Slow/metered networks, terminal work |
|
||||
| `normal` | Browser dimensions/DPI | 24-bit | Default, same behavior as the original helper |
|
||||
| `high` | 1920×1080, 96 DPI | 24-bit | Fast connections and larger desktops |
|
||||
|
||||
```sh
|
||||
test/rdp-access/rdp-access up --bind 0.0.0.0 --public-host x1.xcel.me --graphics minimal
|
||||
test/rdp-access/rdp-access up --bind 0.0.0.0 --public-host x1.xcel.me --graphics low
|
||||
test/rdp-access/rdp-access up --bind 0.0.0.0 --public-host x1.xcel.me --graphics normal
|
||||
```
|
||||
|
||||
The choice is saved per gateway profile and reused when omitted. `status`
|
||||
prints the saved `graphics` mode. A change rewrites the connection mapping
|
||||
while retaining the gateway and tunnels; disconnect/reconnect the desktop to
|
||||
apply it. Existing sessions continue with their original display settings.
|
||||
If an old browser connection holds the single VRDE slot, close it or use the
|
||||
documented `repair` action before reconnecting.
|
||||
|
||||
All modes keep wallpaper, themes, font smoothing, menu animation, full-window
|
||||
drag, audio/device redirection, and GFX disabled. Lossy compression remains
|
||||
available to Guacamole's normal heuristics. Display dimensions/color depth are
|
||||
requests to the RDP server; the negotiated framebuffer can differ if the
|
||||
server restricts them. A smaller display reduces pixel traffic; it cannot
|
||||
eliminate network latency. See the [Guacamole 1.6 display settings](https://guacamole.apache.org/doc/1.6.0/gug/configuring-guacamole.html#display-settings).
|
||||
There is no RDP black-and-white/grayscale parameter: `minimal` requests a
|
||||
256-color palette. Static terminal work and smaller windows generally cost
|
||||
less than scrolling images or video. The RDP backend does not provide VNC's
|
||||
`quality-level`/`compress-level` knobs; those must not be added to this RDP
|
||||
mapping as if they controlled its encoding.
|
||||
|
||||
## Current fixture quick start
|
||||
|
||||
The following is the copy/paste path for the documented `rvbox-win10-test`
|
||||
fixture. Run it from the repository root. The first command acquires the
|
||||
exclusive VM lease, restores the clean administrator-enabled snapshot, starts
|
||||
exclusive VM lease, restores the clean Python/administrator-enabled snapshot, starts
|
||||
the VM, and applies the VRDE display keepalive. The second command starts the
|
||||
Docker-only gateway at the currently published endpoint:
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ up options:
|
||||
--tunnel-port PORT private VRDE tunnel port (default 54001)
|
||||
--public-host NAME browser-visible hostname or IP for the URL and cert SAN
|
||||
--web-user USER Guacamole and Windows account (default rvboxtest)
|
||||
--graphics MODE minimal (800x600/8-bit), low (1024x768/16-bit),
|
||||
normal (browser size/24-bit),
|
||||
or high (1920x1080/24-bit); saved per profile
|
||||
--reset-auth discard the saved password hash and prompt again
|
||||
--web-password-stdin read the password once from stdin instead of prompting
|
||||
|
||||
@@ -56,6 +59,9 @@ RDP_ACCESS_VRDE_PORT. In public mode, RDP_ACCESS_IPV6_BIND and
|
||||
RDP_ACCESS_IPV6_FORWARD (auto, always, or never) control the reversible
|
||||
IPv6-to-IPv4 listener for dual-stack hostnames. Set
|
||||
RDP_ACCESS_GUACD_LOG_LEVEL=debug for temporary protocol diagnostics.
|
||||
RDP_ACCESS_GRAPHICS is equivalent to --graphics; omitted values reuse the
|
||||
saved profile setting (normal for a first start). Reconnect the desktop after
|
||||
changing graphics; existing connections retain their original settings.
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -305,8 +311,13 @@ render_mapping() {
|
||||
-e "s/@DOCKER_GATEWAY@/$docker_gateway/g" \
|
||||
-e "s/@TUNNEL_PORT@/$RDP_ACCESS_TUNNEL_PORT/g" \
|
||||
-e "s/@RDP_USER@/$RDP_ACCESS_RDP_USER/g" \
|
||||
"$mapping_template" >"$runtime_dir/config/user-mapping.xml"
|
||||
chmod 600 "$runtime_dir/config/user-mapping.xml"
|
||||
-e "s/@COLOR_DEPTH@/$graphics_depth/g" \
|
||||
-e "s/@DISPLAY_WIDTH@/$graphics_width/g" \
|
||||
-e "s/@DISPLAY_HEIGHT@/$graphics_height/g" \
|
||||
-e "s/@DISPLAY_DPI@/$graphics_dpi/g" \
|
||||
"$mapping_template" >"$runtime_dir/config/user-mapping.xml.new"
|
||||
chmod 600 "$runtime_dir/config/user-mapping.xml.new"
|
||||
mv "$runtime_dir/config/user-mapping.xml.new" "$runtime_dir/config/user-mapping.xml"
|
||||
if [ -f "$cert_name_file" ] && [ "$(cat "$cert_name_file")" != "$RDP_ACCESS_PUBLIC_HOST" ]; then
|
||||
rm -f "$runtime_dir/tls/cert.pem" "$runtime_dir/tls/key.pem"
|
||||
fi
|
||||
@@ -320,6 +331,7 @@ render_mapping() {
|
||||
printf 'public_host=%s\n' "$RDP_ACCESS_PUBLIC_HOST" >>"$session_file"
|
||||
printf 'web_user=%s\n' "$RDP_ACCESS_WEB_USER" >>"$session_file"
|
||||
printf 'rdp_user=%s\n' "$RDP_ACCESS_RDP_USER" >>"$session_file"
|
||||
printf 'graphics=%s\n' "$RDP_ACCESS_GRAPHICS" >>"$session_file"
|
||||
chmod 600 "$session_file"
|
||||
}
|
||||
|
||||
@@ -438,6 +450,7 @@ while [ "$#" -gt 0 ]; do
|
||||
--tunnel-port) [ "$#" -ge 2 ] || fail "--tunnel-port needs a value"; RDP_ACCESS_TUNNEL_PORT=$2; shift 2 ;;
|
||||
--public-host) [ "$#" -ge 2 ] || fail "--public-host needs a value"; RDP_ACCESS_PUBLIC_HOST=$2; shift 2 ;;
|
||||
--web-user) [ "$#" -ge 2 ] || fail "--web-user needs a value"; RDP_ACCESS_WEB_USER=$2; RDP_ACCESS_RDP_USER=$2; shift 2 ;;
|
||||
--graphics) [ "$#" -ge 2 ] || fail "--graphics needs a value"; RDP_ACCESS_GRAPHICS=$2; shift 2 ;;
|
||||
--reset-auth) reset_auth=true; shift ;;
|
||||
--web-password-stdin) password_stdin=true; shift ;;
|
||||
--images) remove_images=true; shift ;;
|
||||
@@ -465,6 +478,19 @@ tunnel_pid_file=$runtime_dir/tunnel-watchdog.pid
|
||||
tunnel_log_file=$runtime_dir/tunnel.log
|
||||
ipv6_pid_file=$runtime_dir/ipv6-forward.pid
|
||||
ipv6_log_file=$runtime_dir/ipv6-forward.log
|
||||
saved_graphics=normal
|
||||
if [ -f "$session_file" ]; then
|
||||
stored_graphics=$(sed -n 's/^graphics=//p' "$session_file")
|
||||
[ -z "$stored_graphics" ] || saved_graphics=$stored_graphics
|
||||
fi
|
||||
RDP_ACCESS_GRAPHICS=${RDP_ACCESS_GRAPHICS-$saved_graphics}
|
||||
case $RDP_ACCESS_GRAPHICS in
|
||||
minimal) graphics_depth=8; graphics_width=800; graphics_height=600; graphics_dpi=96 ;;
|
||||
low) graphics_depth=16; graphics_width=1024; graphics_height=768; graphics_dpi=96 ;;
|
||||
normal) graphics_depth=24; graphics_width=; graphics_height=; graphics_dpi= ;;
|
||||
high) graphics_depth=24; graphics_width=1920; graphics_height=1080; graphics_dpi=96 ;;
|
||||
*) fail "--graphics / RDP_ACCESS_GRAPHICS must be minimal, low, normal, or high" ;;
|
||||
esac
|
||||
|
||||
safe_bind "$RDP_ACCESS_BIND"
|
||||
safe_port RDP_ACCESS_HTTP_PORT "$RDP_ACCESS_HTTP_PORT"
|
||||
@@ -505,6 +531,10 @@ case $action in
|
||||
mkdir -p "$runtime_dir"
|
||||
docker_gateway=$(gateway_for_network) || fail "could not determine private Docker gateway"
|
||||
session_matches_current || fail "gateway already exists with a different configuration; run down first, then run up with the desired options"
|
||||
if [ "$saved_graphics" != "$RDP_ACCESS_GRAPHICS" ]; then
|
||||
render_mapping
|
||||
printf 'Graphics changed to %s. Disconnect/reconnect the desktop to apply.\n' "$RDP_ACCESS_GRAPHICS"
|
||||
fi
|
||||
if tunnel_active; then
|
||||
printf 'Guacamole stack and private VRDE tunnel are already active.\n'
|
||||
elif start_tunnel; then
|
||||
@@ -545,6 +575,7 @@ case $action in
|
||||
status)
|
||||
[ "$#" -eq 0 ] || { usage >&2; fail "status accepts no options"; }
|
||||
printf 'profile=%s project=%s runtime=%s\n' "$profile" "$project" "$runtime_dir"
|
||||
printf 'graphics=%s\n' "$saved_graphics"
|
||||
"$repo_root/scripts/windows/test-host" status || true
|
||||
if [ -f "$session_file" ]; then sed -n '1p' "$session_file"; fi
|
||||
compose ps
|
||||
|
||||
@@ -15,7 +15,13 @@
|
||||
<param name="enable-wallpaper">false</param>
|
||||
<param name="enable-theming">false</param>
|
||||
<param name="enable-font-smoothing">false</param>
|
||||
<param name="color-depth">24</param>
|
||||
<param name="color-depth">@COLOR_DEPTH@</param>
|
||||
<param name="width">@DISPLAY_WIDTH@</param>
|
||||
<param name="height">@DISPLAY_HEIGHT@</param>
|
||||
<param name="dpi">@DISPLAY_DPI@</param>
|
||||
<param name="force-lossless">false</param>
|
||||
<param name="enable-full-window-drag">false</param>
|
||||
<param name="enable-menu-animations">false</param>
|
||||
<param name="disable-gfx">true</param>
|
||||
</connection>
|
||||
</authorize>
|
||||
|
||||
Reference in new issue
Block a user