RandR extension missing

When I try to run xrandr on Ubuntu 17.10 (artful) with xfce 4.12 over VNC I get the error

RandR extension missing

I've tried installing libxrandr2 but it's already installed. When I run lxrandr I get the error:

Xlib: extension "RANDR" missing on display ":1.0".   

I'm using tightvnc as the VNC server. I've tried all the usual sudo apt-get repair things.

When I do

sudo apt-get update
sudo apt-get install x11-xserver-utils

I'm told that the package is already the newest version.


Solution 1:

you have to set display size before starting the vnc like vncserver -geometry 1920x1080 :1