Clipboard and File Transfer

The clipboard works in both directions: Text, HTML, Rich Text Format, images and files copied on one side paste on the other. How the server reaches the desktop's clipboard depends on the desktop and the package, because a sandbox can only use what the desktop's portal offers.

By package and desktop

Native (deb, rpm, AUR, Nix, Gentoo)FlatpakSnap
Clipboard, both directionsYesOn GNOME 45 and later and on KDE Plasma. None on COSMIC, whose portal has no clipboard, or where the Flatpak is view-only.On GNOME and on Sway, where it's tested
Files pasted from the clientAppear as files on the desktopHanded to the desktop through the Documents portalKept in the Snap's own folder, which file managers can read

On KDE Plasma, the full clipboard, Windows-to-Linux file copy included, needs Plasma 6.6 or later (KDE bug 515465, fixed in 6.6). In the 1.4.6 release test, mstsc on Windows Server 2025 copied text and Rich Text Format both ways against Fedora 44 GNOME.

Where pasted files are kept

A file pasted from the client is kept where applications can still find it after the client disconnects or copies something else. By default it's kept for 24 hours in your runtime directory (/run/user/<uid>), which is in memory, readable only by you and emptied at logout, so nothing pasted reaches the disk. Each paste has its own folder, so a later file of the same name never replaces an earlier one. The oldest pastes go first when the folder runs out of room. On a native install the files appear under one mount point that's the same for every run, so a path left on the desktop's clipboard still works after a restart.

[clipboard]
pasted_files = "session" # "session": in memory, gone at logout; "disk": in your cache folder
pasted_file_hours = 24 # 0 keeps them until logout ("session") or without limit ("disk")

Nothing is deleted when the client disconnects, when a new paste replaces the clipboard or when the server restarts. Both settings are also on the GUI's Clipboard tab.

What crosses, and how fast

[clipboard]
enabled = true
max_size = 10485760 # bytes, 10 MB
rate_limit_ms = 200
allowed_types = [] # empty: everything
# allowed_types = ["text/plain", "text/html", "image/png"]
  • allowed_types filters both directions by kind: text/plain, text/html, text/rtf, any image/ type (images go as a group, since the server converts between image formats) and text/uri-list for files. A kind with no entry doesn't cross, a client's request for it is refused, and the log names the kinds kept out. Before 1.4.6 nothing read this setting.
  • rate_limit_ms applies on every clipboard route, and the newest copy inside the window is sent when the window ends.
  • HTML copied on the desktop reaches Windows in the wrapper Windows applications expect. A JPEG or BMP is read in the type it's offered in, and a bitmap copied on the client can be pasted as image/bmp as well as image/png.

Copying files from Linux to the client

file_transfer_mode = "auto" uses an on-demand virtual filesystem (FUSE) in native mode and a staging download in the Flatpak. A failed read of the source file is now answered with an error and logged, instead of reaching the client as a file cut short.

If the clipboard stops

If nothing crosses any more and the server's log says Failed to forward SelectionTransfer to orchestrator: channel closed, the clipboard has stopped for the rest of that server's run. Restart the server (systemctl --user restart app-io.lamco.rdp-server.service, or Stop and Start Server in the GUI) and reconnect.

1.4.6 fixes one known cause of it: A paste whose text preview in the log cut a multi-byte character crashed the clipboard task. It's on the known limits page because the symptom may have other causes.

On GNOME 51, the clipboard stopped after the first client connection before 1.4.6, because Mutter 51 sends a session's clipboard signals only to the D-Bus connection that created the session. 1.4.6 fixes it: The clipboard keeps working across reconnects on GNOME 51.

On GNOME, connecting no longer takes over the desktop's clipboard or wipes what the local user had copied. Troubleshooting covers more cases.

Related