Having a big problem with opening UI with using tight VNC viewer

September 21, 2017 696 views
DigitalOcean Ubuntu 16.04

I tried everything to open viewer but nothing really worked.

I set up these two but nothing worked.
ssh -L 5901:127.0.0.1:5901 -N -f -l root {IP address}
and
ssh -L 5901:localhost:5901 -N -f -l root {IP address}
when I typed in vncserver -l I get this message "Couldn't start Xtightvnc; trying default font path", even though I installed "apt-get install xfonts-base", still didn't work.

I always get "Error in TightVNC Viewer: No connection could be made because the target machine actively refused it".

I disabled firewalls and restarted from beginning but nothing worked.

Could you please help me out with this.

Thanks.

1 Answer

VNC configuration and troubleshooting can be a pain. You can check your VNC logs to see if there is more information being recorded.

Another option (and one that I would recommend unless you have requirements that must use VNC) would be to use x2go. It is an open source alternative to VNC that uses a newer protocol providing better performance. It tunnels over ssh by default so there is no need to take extra steps to secure it as there are with VNC.

You can use the following script to download, install and configure an XFCE Desktop environment on x2go:

#!/bin/sh
#
# This script will set up an xfce desktop environment which can be
# accessed remotely via the x2goclient http://wiki.x2go.org/doku.php/doc:installation:x2goclient
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get -y install software-properties-common xubuntu-desktop;
add-apt-repository -y ppa:x2go/stable;
apt-get update;
apt-get -y install x2goserver x2goserver-xsession;
Have another answer? Share your knowledge.