Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 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?

share|improve this question

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 &
export XKL_XMODMAP_DISABLE=1
autocutsel -fork
share|improve this answer
    
+1 Adding these commands to my xstartup file allowed me to share the clipboard between my Lubuntu 13.04 vnc server and Windows 7 vnc client. – iglvzx Sep 16 '13 at 0:25
up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
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

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:

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

share|improve this answer
    
Could you please expand about the need for xrdb $HOME/.Xresources in this case? – Sopalajo de Arrierez Jun 13 at 20:49
    
I am not very used to shell scripting: why the beginning of your code has \#!/bin/bash instead of #!/bin/bash. – Sopalajo de Arrierez Jun 13 at 20:50
    
it was typo, i have corrected it – ashish Jun 17 at 16:09
    
xrdb $HOME/.Xresources it worked for me, i found it in some google pages, and i consolidated it here – ashish Jun 17 at 16:10

Your Answer

 
discard

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.