7

I'm having major difficulties in getting the clipboard (copy/paste) to work over my VNC connection. Setup:

Server: Ubuntu 14.04 with Xfce and TightVNCServer

Client: Windows 8.1 with TightVNCViewer

The problem is, I can't get the clipboard working to copy/paste from the client into the server. I tried following the advice on this question and installed autocutsel, but that didn't help either. Any advice?

Jordan
  • 237
  • 1
  • 3
  • 10
  • [Similar question](https://raspberrypi.stackexchange.com/questions/4474/tightvnc-copy-paste-between-local-os-and-raspberry-pi) and [very relevant topic](https://gathering.tweakers.net/forum/list_messages/1408741). – dma_k May 08 '17 at 23:17

3 Answers3

11

How did you setup autocutsel? I created a xstartup file under the ~/.vnc directory, with the following content:

#!/bin/sh
/usr/bin/autocutsel -s CLIPBOARD -fork

Then you need to make it executable:

chmod +x ~/.vnc/xstartup

Restart the server and you're done

SΛLVΘ
  • 1,389
  • 1
  • 11
  • 13
  • 1
    First you might need to `apt-get update` and after that `apt-get install autocutsel` ( https://www.howtoinstall.co/en/debian/jessie/autocutsel ) – jave.web Mar 21 '17 at 20:04
  • Add 2: You don't have to restart server if you want to allow clipboard only in current session - just call `/usr/bin/autocutsel -s CLIPBOARD -fork` in terminal and that's it. – jave.web Mar 22 '17 at 03:06
  • @jave.web I can't get that to work. I have to run it without -fork in a terminal, and leave the terminal open. (I also run it with -v so that it is verbose, so I can make sure it's working.) – trlkly Apr 28 '17 at 03:02
5

For me just this two simple steps worked:

sudo apt install autocutsel
autocutsel -fork
Eduard Florinescu
  • 2,946
  • 7
  • 34
  • 45
0

I'm not using TightVNC, but if that tool is not a requirement you could use x11vnc. I had good success sharing the clipboard with Windows machines.

On Ubuntu it should be apt-get install x11vnc to install it, then use x11vnc -xkb to start the Server. (The -xkb option enables the Xservers XKEYBOARD option, without this the clipboard sharing did not work for me)

  • 1
    After installing x11vnc, that is, sorry. I'm using tightvnc as a client here and clipboard works well with x11vnc for the server. – Aljoscha Vollmerhaus Jun 10 '15 at 09:33
  • 3
    Feel free to edit your answer so it is complete. As of now, the answer, does not really answer the author's question. – Ramhound Jun 10 '15 at 11:27
  • Your post needs to be expanded. A good [answer](http://superuser.com/help/how-to-answer) includes specific instructions (not just links to them) and an explanation as to how or why the answer addresses the OPs question. Please edit your post to add detail explaining how your solution addresses the OPs question. – I say Reinstate Monica Jun 10 '15 at 15:15