How to copy/paste text from remote system?

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.

adnan-laptop:1.log
adnan-laptop:1.pid

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.


  1. Install:

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

    autocutsel -fork
    

    like this:

    #!/bin/bash
    xrdb $HOME/.Xresources  
    autocutsel -fork  
    startxfce4 &  
    
  3. Restart vncserver


I use the following line in my login-script:

vncconfig -nowin&

Hope it works for you!?