Remote-viewer spice not working on kvm image

when following instructions from here , running remote-viewer spice://<ip-address-of-kvm-host>:5924 results in error message (remote-viewer:7738): Gtk-WARNING **: 22:58:38.630: cannot open display: