I am connecting to a remote OpenSuse computer using VNC from Windows. On other Linuces that I've used over VNC, I can copy text between the remote machine and the local Windows machine using the clipboard. In this case, I can seem to connect the local clipboard to the remote.

The VNC server is whatever is set by default on OpenSuse. I don't know which it is.

How can I fix copy/paste over VNC?


Yes, I just went thru this again on CentOS 5.2 (setting up old dev environment). Add this to $HOME/.vnc/xstartup worked for KDE and GNOME and ICEWM to enable copy/paste between VNC Client on Windows and the Windows host:

vncconfig  -nowin &
autocutsel -fork

I resolved this by installing the autocutsel RPM from the software management section of Yast, and then running:

$ autocutsel -s PRIMARY -fork

This enabled copy/paste between my VNC and my Windows clipboard.

Thanks to this source.


Copy/paste to work add these:

  1. sudo apt-get install autocutsel

  2. add autocutsel -fork line to xstartup file with:

    vi /home/<username>/.vnc/xstartup

    like this:

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

  • Could you please expand about the need for xrdb $HOME/.Xresources in this case? – Sopalajo de Arrierez Jun 13 '16 at 20:49
  • xrdb $HOME/.Xresources it worked for me, i found it in some google pages, and i consolidated it here – ashish Jun 17 '16 at 16:10
  • 1
    This is correct and the proper way to do copy/paste between machines through VNC. – Travis van der Font Aug 16 '17 at 15:55

On Linux, vncserver executable itself does not provide clipboard support. You should run vncconfig, then you have clipboard support.

How you should run vncconfig depends on the way you use vnc server. If you are starting the server from desktop you can run the executable while starting the server. If you are starting the server at boot time, you can start the vncconfig in headless mode too. I believe it is possible to run vncconfig in headless mode with -nowin flag.

You can refer to man page of vncconfig for more info.

  • I don't seem to have any vncconfig installed. What should I make of that? – Nathan Fellman Mar 27 '12 at 7:30
  • 1
    I'm not an OpenSUSE user but after a Google search It came out they use tightvnc and vncconfig is missing in the OpenSUSE package. Without vncconfig it is not possible to use clipboard integration through vnc clients. You can try to install Real VNC Server or any other vnc server clone that supports clipboard integration through vncconfig or by any other mean. – infiniteRefactor Mar 28 '12 at 13:11

For over a year I have been using tightVNC from a Windows client to a RHEL server. Copy-and-paste worked well until a few weeks ago. Then it stopped. I found that the vnc service was "defunct" (not sure what that meant, but it did not sound good).

ps -u myUserid | grep vnc
 3414 ?        00:00:01 Xvnc
 3450 ?        00:00:00 vncconfig
 6227 pts/0    20:15:56 Xvnc
 6235 pts/0    00:00:12 vncconfig <defunct>

So I restarted it in the background, from a terminal in my Windows session:

vncconfig &

Now everything is back to normal. In fact the above command/response lines were copied from Linux and pasted into my Windows browser session. No need for autocutsel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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