I run VNC on all of my machines to allow remote access from my ‘primary’ computer. Most of the time when I’m developing software, it is on a remote system in my basement. This tends to work well for me. Until recently anyway.
I’m working on software for a Raspberry Pi. Normally I use putty to access my RPI’s or I cross-compile using a 386 Linux for the main system. But for this particular project, I am doing the actual development on the RPI.
It has been very clumsy because I have not been able to transfer the clipboard between my primary system and the RPI. So, normally, I might find some snippet of code online that I want. I would copy that, bring up the VNC window, and paste into an editor in the remote system.
While that works on my Windows and Linux Mint systems just fine, it has been failing on my Raspberry Pi. I’ve noticed this issue since my first RPI, but it hasn’t been that big of a problem until this project. So I really want it FIXED!
My primary reference for fixing this problem was:
You will need to install a utility called autocutsel:
sudo apt-get update sudo apt-get install autocutsel
Then, you must be logged in to the user that will be running tightvnc. The best way to do this is just remote connect via VNC to the RPI as you would normally.
Now go to the login user’s .vnc directory:
and edit the xstartup file to add the line “autocutsel -fork”:
#!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey autocutsel -fork #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession
Reboot and you should now be able to cut and paste into and out of the RPI VNC window!