Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ flowchart TD
end

subgraph FreeRDPClient["FreeRDP 3 (xfreerdp)"]
RDPProcess["xfreerdp /v:host /sound /clipboard /drive:SharedFolder,/shared"]
RDPProcess["xfreerdp /v:host /sound /clipboard:files-to:off /drive:SharedFolder,/shared"]
end
end

Expand Down Expand Up @@ -258,6 +258,8 @@ Over plain HTTP (port 8080) a paste still sends the image, but the keystroke can

Images reach Windows as bitmaps: Ubuntu's FreeRDP build can't convert PNG itself, so the gateway adds a BMP copy of every pasted image. Transparent areas become white.

Files can't be copied through the clipboard: a browser has no way to put a file on your local clipboard, so FreeRDP's file clipboard is turned off. Move files through the shared folder instead (`\\tsclient\SharedFolder` in Windows, **Shared Files** in the WebUI; see [How File Sharing Works](#how-file-sharing-works)).

---

## Windows Machine Setup
Expand Down
5 changes: 4 additions & 1 deletion root/app/backend/session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ def _build_rdp(self, config: Dict[str, Any]) -> Launch:

# Bidirectional Clipboard Synchronization
if config.get("enable_clipboard", True):
args.append("+clipboard")
# Text and images only. FreeRDP can hand copied files to Linux apps only
# through a FUSE mount, and the container has no /dev/fuse; with files on,
# copying a file in Windows Explorer froze the session.
args.append("/clipboard:files-to:off")
if clipboard_debug_enabled():
args.append(f"/log-filters:{CLIPBOARD_LOG_FILTERS}")

Expand Down
9 changes: 8 additions & 1 deletion tests/test_session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ def test_rdp_target_and_optional_flags(mgr):
args = launch.stdin_text
assert "/v:pc.local:3390" in args
assert "/sound" not in args
assert "+clipboard" not in args
assert "clipboard" not in args
assert "/drive" not in args
assert "/cert:ignore" not in args


def test_rdp_clipboard_leaves_files_out(mgr):
"""Copied files need a FUSE mount the container lacks; offering them froze the session."""
args = mgr._build_rdp({"host": "pc.local", "port": 3389}).stdin_text.splitlines()
assert "/clipboard:files-to:off" in args
assert "+clipboard" not in args


def test_rdp_resolution_modes(mgr):
dynamic = mgr._build_rdp({"host": "h", "port": 1, "resolution": "dynamic"})
assert "/dynamic-resolution" in dynamic.stdin_text
Expand Down
Loading