Sep 242009
 

I’ve had to use VNC many times to bridge the gap between Windows and Linux systems. It’s not always the prettiest or most efficient way to get things done, but it can be quicker and less complex than virtualization or X11 through Cygwin. One stumbling block in my workflow has been the clipboard – you become so accustomed to moving data from one application to another that you really miss it when the functionality is missing.

Fortunately, there are VNC clients that will take care of this for you. I typically choose TightVNC, as it offers very good performance (including some accelerated Windows drivers) and is available for a variety of platforms. The details below may be specific to TightVNC.

Keep in mind that the local keyboard is the operating system that is running vncviewer. In most cases, I’ll run vncviewer on Linux and vncserver on Windows, making Linux local and Windows remote.

TightVNC will automatically add items on the remote clipboard to the local clipboard. Unfortunately, it does not automatically work from the local clipboard to the remote clipboard (or if it does, it infrequently polls the local clipboard). You can force clipboard copying by pressing F8. This brings up a menu with controls for copying one clipboard to the other. It’s not the most efficient workflow, but it is certainly better than no clipboard at all.

Just remember that on Linux there are two clipboards, so at first you may think something is wrong. When you highlight a selection with the mouse in Linux, that selection is copied into a temporary clipboard which is pasted by clicking the middle mouse button. The second clipboard is accessible via the normal CTRL+c and CTRL+v shortcuts. TightVNC uses the middle mouse button clipboard.

To copy from Linux (local) to Windows (remote):

  • Select items and type CTRL+c
  • Move to VNC session
  • Press F8 and select Clipboard Local -> Remote
  • Type CTRL+v in VNC

To copy from Windows (remote) to Linux (local):

  • Select items and type CTRL+c
  • Move to Linux
  • Position mouse cursor where you want to paste and click the middle mouse button

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(to be displayed above your comment)

(for moderation; your e-mail address will not be made public)