TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
772 stars 138 forks source link

Can the software increase support for file copying #405

Closed ml232528 closed 7 months ago

ml232528 commented 7 months ago

1、Support ctrl+c 、ctrl+v。 2、Dragging files with the mouse to a remote computer。 The SFTP protocol supports file downloading and uploading, and I believe there is not much technical difficulty.

dcommander commented 7 months ago

RFB has a file transfer extension, but what you propose would be a difficult (costly, because I don't work for free) project. I'm not even sure if it is possible to handle the Ctrl-C/Ctrl-V semantics. On the server end, the ability to copy/paste files using those keystrokes is handled by the window manager, but TurboVNC is only an X server, so it doesn't have any knowledge of those operations. It might be able to detect when a file copy has entered the clipboard, but I doubt that every window manager implements that in the same way. The viewer would have to similarly detect when a file copy has entered the clipboard, which would involve not only figuring out how various window managers do that but also how proprietary operating systems (macOS, Windows) do that. If a user initiated a file copy, how would either the server or the viewer know where to copy the file? Again, that is a function of the window manager on the server, and the TurboVNC Server has no knowledge of where the window manager's Desktop folder is.

Really the best we could do would be to provide a separate dialog for file transfer. That is what TightVNC 1.3.x did and TightVNC 2.x does, but only for Windows servers (which typically don't have an SCP service.) There is no point to doing that with Un*x servers, and even the inventor of the RFB file transfer extensions never used them for Un*x servers. An external SCP client is more flexible and also more secure. In fact, many organizations that deploy TurboVNC would prefer that it not have file transfer capabilities.