My TightVNC Server on Raspberry Pi seems can not handle copy/paste between its and my local clipboards. What can I do?
First install autocutsel (
sudo apt-get install autocutsel)
Then open your /home/pi/.vnc/xstartup (
nano /home/pi/.vnc/xstartup) and put
autocutsel -fork on it like this:
#!/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
Then it will work after restart of the vnc server
To Stop VNC Server:
vncserver –kill :1 (pick your display)
To Start VNC Server:
vncserver :1 –geometry 1024x600 –depth 24
I had to make sure my autocutsel comes FIRST in the xstartup for copy/past to work
# Makes copy/past work - must come before RANDR 'fix' #vncconfig -iconic & autocutsel -s CLIPBOARD -fork autocutsel -s PRIMARY -fork # Get's rid of RANDR missing errors export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession
Though this is an old post, I ran into an issue where I could no longer copy and paste from host to client with one of my rpi's (I have 5).
I tried everything suggested here and everywhere else I searched but nothing worked. In the end what worked is this.
- Logged into the pi,
- ls /home/pi/.vnc
- I see 2 files with the dns name of my pi mypi:1.log and mypi:1.pid I had a thought that there must be a mypi:0 and maybe this was causing the copy/paste to no longer work. I don't know all the ins and outs but by connecting to mypi:1 as the host name with my VNC client I can now copy and paste between host and client again!
I hope that this helps someone else and if anyone has any info to share about this please do!