14

I'm connecting to my Debian squeeze server through the Windows TightVNC viewer and tightvncserver on Linux. I have put the following line in my ~/.vnc/xstartup file:

autocutsel -fork

However, this only seems to allow 1-way clipboard synchronization; the remote Linux content can be copied to the Windows clipboard, but not the other way around.

Is there some way I can copy Windows clipboard content and paste it in Linux through TightVNC?

2 Answers 2

9

With the unlikely name of vncconfig on Linux, you can get bidirectional cutbuffer/clipboard interaction.

From the manual entry of vncconfig:

vncconfig is used to configure and control a running instance of Xvnc, or any other X server with the VNC extension. Note that it cannot be used to control VNC servers prior to version 4.

When run with no options, it runs as a kind of "helper" application for Xvnc. Its main purpose when run in this mode is to support clipboard transfer to and from the VNC viewer(s). Note that without a running instance of vncconfig there will be no clipboard support. The vncconfig command puts up a window with some checkboxes which can be used to disable clipboard transfers if required. The -nowin flag can be used if you always want clipboard support but don't wish to clutter the desktop with this window Alternatively the -iconic option can be used to make it iconified by default.

Note: The DISPLAY environment variable or the -display option will be used to identify the display/window in which to be active.

Using TightVNCon Windows, make sure that the option Disable clipboard transfer is not checked. This option is accessible when you launch TightVNC.

You will see the Startup Window.

TightVNC Startup Window

(click on Options) then make sure that Disable clipboard transfer is not checked.

Disable clipboard transfer

2
  • 1
    The Debian 10 tightvncserver package (rev 1.3.9-9_deb10u1) doesn't include any "vncconfig" command. Do you know if there is a way to configure it to support clipboard sharing?
    – David C.
    Aug 30, 2021 at 15:01
  • The vncconfig command works perfectly with a different VNC server (I set up tigervnc for this test)
    – David C.
    Aug 30, 2021 at 16:10
1

It appears that the TightVNC server package doesn't have this support. At least the version I have (tightvncserver version 1.3.9-9+deb10u1, from Debian 10) doesn't.

It's also worth noting that the official TightVNC web site says that this version (1.3) is outdated and not supported. Unfortunately, the current version is no longer open source and requires a commercial license. See also https://www.tightvnc.com/licensing-server-x11.php.

As an alternative, I would suggest using the TigerVNC server, which is included in my Debian installation and is probably available for many other distros as well. Using it, I was able to get clipboard sharing working (via the previously mentioned vncconfig command).

If you do upgrade to TigerVNC, however, please note the following issue:

https://superuser.com/questions/1403368/tigervnc-connection-refused-when-using-ip-address-and-accepted-with-127-0-0-1

The default installation of TigerVNC (at least for me) only allows connections from localhost. I assume this is for use with SSH-tunneled connections. A one-line configuration setting in either /etc/vnc.conf, ~/.vnc/vnc.conf or the command-line when starting the VNC server will disable this, allowing connections from over the network.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .