Clipboard does not work using tigervnc, even with options enabled on client and server

I cannot get clipboard (Ctrl-C, Ctrl-V to work on a tigervnc session). The vncserver is running Ubuntu 18.04 and XFCE. I'm starting the server using the following command:

vncserver -xstartup ~/.vncxstartup

My xstartup file has the following contents:

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/usr/bin/autocutsel -fork
exec startxfce4

(The autocutsel command was added recently due to other answers here on SO, but it doesn't seem to help the issue).

I've checked vncconfig on the server, as well as client config menu, and have enabled all options to send and receive clipboard to and from client and server.

When I connect to the server (also from tigervnc on an Ubuntu client), I am not able to copy and paste text to or from the server. How can I go about troubleshooting this?


I was able to fix this by installing adding vncconfig -nowin & to my ~/.vncxstartup file. That, in combination with autocutsel -fork, allows for copying and pasting to and from server and client.

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
vncconfig -nowin &
autocutsel -fork
exec startxfce4