Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help setting up VNC server (Linux)
Can somebody help me to setup VNC server?

I have done whatever was in my power, but I can't make Display working. It says "Failed to connect to server".

I'm using Ubuntu 18.04, all dependencies are satisfied, I can connect to "remote machine", all other tabs in Portal are working fine. Only Display doesn't work.

I can connect to VNC server locally (on the same computer) and from LAN, using Remmina. So, VNC server is working.

Firewall has ports 5900/5901 open (but I have tried also with firewall turned off).

Besides suggested vnc4server, I have also tried TigerVNC and X11vnc, but no avail. With X11vnc (without password, as suggested by somebody here on forums) I get "Failed to connect" message. I can't start vnc4server without password, so I tried "ehorus" as password (again, as suggested by somebody on forums) and then it doesn't give me any message, but no connection.

Note #1: I said "vnc4server" but I'm actually using x0vnc4server. And yes, I have changed vnc_port in conf file to 5900.

Note #2: I'm starting VNC server manually, in terminal, so I can see server's messages. When I try to connect (from another PC, through Portal > Display > Connect) I can see in terminal that something is trying to authenticate.

So, is there "official" password I have to give to my VNC server so that eHorus agent can connect to it? Or do I have to tell (somehow) to eHorus agent what password to use to connect? I didn't find anything in conf file.
OK, I found it myself. I'll write what I did, for the sake of others who, like me, will face with VNC for the first time when they try to install ehorus.

I tested this, and it all works, on my 3 computers, all of them running Linux Mint Xfce. (During testing, I had also one Gnome desktop - in VirtualBox - but once I figured out what to do, I deleted it.)

First, it was my mistake to think that I can't start vnc server without password. Yes, it's true that it complains about password UNLESS I force it to "stop complaining", with -securitytypes=none.

So, when I started vnc server with:

x0vnc4server -securitytypes=none

it worked! Now, that's a little scary, to run a vnc server without any authentication, so I added -localhost=1, to prevent hijacking. So, my startup command grew like this:

x0vnc4server -securitytypes=none -localhost=1

Then, it happend that I got truncated screen. Instead of 1360x768 I got 1024x768 and wasn't able to access whole screen. I guessed it was because vnc server started before graphics card settled with final screen resolution, so I added some delay and my final startup command is:

/bin/sh -c 'sleep 10;x0vnc4server -securitytypes=none -localhost=1 &'

(Yes, I have automatic login on my computers)

Some final remarks:

Here on forums you will find advice to open ports 5900/5901 on you firewall. IGNORE that. If you don't need/want to access your vnc server directly, then you don't need to open your firewall. eHorus will be able to connect to vnc server, because it connects locally (not going through firewall).

Here on eHorus site you will find that you need to install lots and lots of dependencies: vnc4server gnome-core gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal... If you don't use Gnome desktop, IGNORE that. It asked to install additional 190 MB of (for me) useless stuff to my Xfce (and probably would bork it). All you really need is vnc server (vnc4server).

Talking about vnc server... You can probably use any vnc server of your liking, some users reporting to use (and being happy with) X11vnc, me using vnc4server, but also tried tigervnc-xorg-extension because of the claims that it's "more efficient". And yes, it was really much more efficient (bandwidth-wise) but for the price: it didn't refresh whole screen, but only small area under the mouse pointer.

But again, I'm VNC newbie, maybe I didn't set it properly, or it was simply because of my setup.

I settled with vnc4server package, but used x0vnc4server command. Compared with "regular" vnc4server, it captures your existing screen (x0), while vnc4server creates a new one (virtual, x1). That's why I had to change vnc_port setting in conf file to 5900 (x0: port 5900, x1: port 5901...).

At the end, it IS really easy to set up the whole thing, once you know how to do it... EHorus documentation (VNC part) can and should be better. Actually, currently all the "instructions" about VNC are: if you want to use Display tab, install VNC.
Great work, Slavko. This should be in the official documentation, to be honest. I would have never figured this out on my own.

Users browsing this thread: 1 Guest(s)

(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. |

Theme © MyBB Themes