#!/bin/bash # 12-fix-rdp-bigres.sh — xrdp EGFX big-resolution fix (Redmine #611) # # Symptom: Jump Desktop from iPad -> big external monitor (5160x2160) # showed color bars / cut sides. Root cause candidate: default EGFX # compressed-frame budget truncates large frames at this width. # freerdp UAT at 5160x2160 (all codecs + mid-session resize) is clean; # this mitigation raises the budget for the Jump client path. # # Idempotent: run as root on ultix-streaming. set -euo pipefail DROPIN=/etc/systemd/system/xrdp.service.d/bigres.conf mkdir -p "$(dirname "$DROPIN")" cat > "$DROPIN" <<'EOF' [Service] Environment=XRDP_GFX_MAX_COMPRESSED_BYTES=33554432 Environment=XRDP_GFX_FRAMES_IN_FLIGHT=2 EOF systemctl daemon-reload # bounce only when nobody is connected: check for active RDP sessions first ACTIVE=$(pgrep -c -f 'Xorg.*xrdp/xorg.conf' || true) if [ "${ACTIVE:-0}" -gt 0 ]; then echo "Active RDP X sessions: $ACTIVE — NOT restarting; apply at next bounce with:" echo " systemctl restart xrdp-sesman xrdp" else systemctl restart xrdp-sesman xrdp sleep 2 systemctl is-active xrdp xrdp-sesman fi grep -q XRDP_GFX_MAX_COMPRESSED_BYTES "$DROPIN" && echo "drop-in present: $DROPIN"