Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to access a remote system via VNC viewer, but when I copy some text from the remote system and paste it in my text editor(local system), nothing happens. Do I need to install any additional packages to achieve this task?

There is no such option found in the Real VNC properties.


I just get the following output:

karthick@karthick:~$ vncconfig         
No VNC extension on display :0.0


karthick@karthick:~$ vncserver

Warning: karthick:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server karthick:1

Warning: karthick:2 is taken because of /tmp/.X2-lock
Remove this file if there is no X server karthick:2

New 'X' desktop is karthick:4

Starting applications specified in /home/karthick/.vnc/xstartup
Log file is /home/karthick/.vnc/karthick:4.log

karthick@karthick:~$ vncconfig -display :1 
vncconfig: unable to open display ":1"

enter image description here

share|improve this question
This is turning into a bit of a mess. Can you state somewhere what the setup is. What OS is the client? What OS is the server? What client and server software are you using on each? – Oli May 27 '11 at 15:25
Client runs windows XP and the server runs ubuntu 10.10. And the client runs Real VNC and the server runs vncviewer. Do you need anyother information ? – karthick87 May 27 '11 at 15:31
vncviewer is not a VNC server (the clue's in the name :P) – Oli May 27 '11 at 15:50
I have already installed vnc4server too. – karthick87 May 27 '11 at 16:07
up vote 9 down vote accepted

There will be a .vnc directory in your home folder. In this directory there will be few files named like <computer name>:<number>.extension
For example my laptop contains following two files in .vnc directory.


The :1 in the above file names shows that the vnc server is running on display :1.

Now connect to your VNC server and from the connected session run vncconfig as follows:

vncconfig -display :1  

This will show a small window with clipboard related options. Check all the options and dont close the window. Now you should be able to copy paste from/to remote system.

share|improve this answer
karthick@karthick:~$ vncconfig -display :1 vncconfig: unable to open display ":1" – karthick87 Jun 7 '11 at 10:59
@karthick87: what command are you using to run vnc server? have you checked .vnc directory in your home folder? does it contain files like – binW Jun 7 '11 at 11:14
Pls see the updates in my question.. – karthick87 Jun 7 '11 at 13:46
@karthick87: the output of vncserver says that "New 'X' desktop is karthick:4" so you should run "vncconfig -display:4" – binW Jun 7 '11 at 14:11
Now i am getting the following output, karthick@karthick:~$ vncconfig -display :5 No VNC extension on display :5 – karthick87 Jun 7 '11 at 14:20

It depends on the VNC client that you are using. If you are using RealVNC then open the VNC Viewer Properties dialog and, on the Inputs tab, turn on Share clipboard with VNC Server.

Try this. Connect using vncviewer and run vncconfig within the remote window, check the options regarding the clipboard and then try.
enter image description here

share|improve this answer
Pls see my updates in the question. – karthick87 May 17 '11 at 12:17
@karthick87: you are looking at VNC server's properties. Go to VNC viewer's Properties dialog – binW May 17 '11 at 12:42
No its not there in VNC viewer properties.Look @ the snapshot pls. – karthick87 May 17 '11 at 12:54
@karthick87: I have updated the answer. Plz try the vncconfig method. I believe it will work because it has always worked for me. – binW May 18 '11 at 6:40
Do you want me to type vncconfig in command prompt ? – karthick87 May 18 '11 at 7:07

I use the following line in my login-script:

vncconfig -nowin&

Hope it works for you!?

share|improve this answer

I use Remote login with vnc-ltsp-config with GNOME Desktop Environment on CentOS 5.9. From experimenting today, I managed to get cut and paste working for the session and the login prompt (because I'm lazy and would rather cut and paste difficult passwords).

  1. Created a file vncconfig.desktop in the /etc/xdg/autostart directory which enabled cut and paste during the session after login. The vncconfig process is run as the logged in user.

    [Desktop Entry]
    Name=No name
    Exec=vncconfig -nowin

  2. Added vncconfig -nowin & to the bottom of the file /etc/gdm/Init/Desktop which enabled cut and paste in the session during login but terminates after login. The vncconfig process is run as root.

  3. Adding vncconfig -nowin & to the bottom of the file /etc/gdm/PostLogin/Desktop also enabled cut and paste during the session after login. The vncconfig process is run as root however.

share|improve this answer
This seems to be the only solution where copy-and-paste is enabled at startup/boot/login and in the background. I'm running Red Hat Enterprise Linux 5 and could not get @Clausi's answer to work. – John Girata Jul 26 '13 at 21:19
At the end of the day, I ditched VNC for NoMachine NX. – Alton XL Sep 26 '13 at 18:46

Try using or .
They offer simple to use clipboard capability.

share|improve this answer

Using tightvnc (with the command: vncviewer) on Puppy Linux, I have to press F8 in the remote window to bring up the VNC menu. The VNC menu has entries for "Clipboard: local -> remote" and "Clipboard: local <- remote". I have to copy some text, use either of those entries, and then paste on the other system. I don't know if this is related to your particular problem, but it does behave like the symptoms you described if I don't use the menu.

share|improve this answer
Thank you. vncconfig did nothing this time, but I remember that adding it at the xstartup you can enable that feature. But using F8 I can enable or disable easily the direcction of the data, enabling only Remote->Local and never the opossite. – erm3nda Jan 28 at 10:07

The VNC viewer you are using has to support this feature otherwise you're just copying it localy on the remote system.

share|improve this answer

Some commentary on your problem:
RealVNC's is proprietary and it's clipboard support may be entirely incompatible with tightvncserver. I've used both, together, in the past but I don't remember 100% if clipboard sharing worked bettween them.
I do know for sure that RealVNC-server paired with RealVNC-viewer did accommodate clipboard sharing; but RealVNC-server is not free (as in $$s)

You might try:
- tightvnc viewer from It might be more compatible with whatever method tightvncserver used to share the clipboard.
- perhaps you could go with an alternate protocol, ie NX (nxserver/nxclient ... some info at: ). Clipboard sharing worked for me on that without any custom settings.

share|improve this answer
  1. Install:

    sudo apt-get install autocutsel
  2. Run vi /home/b37399/.vnc/xstartup and add this line:

    autocutsel -fork

    like this:

    xrdb $HOME/.Xresources  
    autocutsel -fork  
    startxfce4 &  
  3. Restart vncserver

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.