[HowTo] Install a vnc server on the Raspberry pi


root@vero:~# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 4.9.2 (Debian 4.9.2-10)
Thx for your input btw :slight_smile:


I got the 4.9 on my pi2…but at first i was trying with 4.7.
Here is a post that i made when i was having problems compiling @patrikolausson version:

but thats a totally different error message.
Really no idea about how to make this work with vero2…Maybe there are some things missing or the architecture is different…I dont know :confused:@sam_nazarko should be able to clear things up.


Hi – didn’t see these posts, apologies.

My long term goal is to get VNC in the App Store. You cannot simply copy the Pi instructions, because Vero 2 uses a different windowing system.

In the interim, I will create a [HowTo] for installing VNC on the Vero 2.



@Sandbird, I’ve PM’d you some instructions for you to try. Let me know how you get on. I’ll make it a HowTo if you have some success.



I have been unsuccessful getting VNC working with my Mac. I have a Raspberry Pi 3 with OSMC installed. I’ve installed dispman_vncserver. On my Mac I try to establish a VNC connection by going to the Connect to Server… window and entering vnc:// as the Server Address. (I’ve assigned as the fixed IP address for the RPi.) Apparently there is some communication between the Mac and the VNC server on the RPi but I never see a window for the RPI and eventually the connection request times out.

Has anyone ever gotten VNC to work using the default VNC client on a Mac and dispmanx?


Did you try that MacOS tip at the guide?
If you want to use OSX tool “screen sharing”, start the vnc server with the password option:
osmc@osmc:~/dispmanx_vnc$ ./dispmanx_vncserver --password=osmc

Maybe you need to open port 5900 and forward it to your pi first as well


What MacOS tip at the guide are you referring to, Sandbird? Can you provide a link?

I did try using the password option on the command line, and that didn’t have any effect.

I have port 5900 open for VNC already. I use Apple Remote Desktop and am able to use VNC to view/control my Macs. In my attempts to use VNC with the Raspberry Pi I have seen an error log file message reporting that the VNC server was using an outdated software version. (Sorry, I don’t remember the details.)


Here’s a screen snap showing the port mapping for my Airport Extreme router:


hmm, i havent used my hackintosh for quite some time now…so i am a bit rusty when it comes to macs…but in this picture here you are why does it say ? I thought your pi3 was on ?

Lets try a few things…Back to the basics:

  1. If you set your pi to get an automatic ip address which address does it take? Is it in the range of 10.0.1…? Did you try to let it have an automatic ip and try connecting to that first ?
  2. Do you have an iphone ? If yes, can you try downloading Vnc viewer and try connecting from there (before trying with more advanced tools like RD from the mac?
  3. Did you create a service for the vncserver ? I mean are you sure it’s running ? IF yes, then do this:
    systemctl stop dispmanx_vncserver
    then manually start the server with : dispmanx_vncserver --password=osmc. You should be seeing this:

    Now try to connect…(so we are sure the vncserver is running and listening for connections.


Why would you do port mapping if all your devices are on the LAN?


Thanks, guys, for the replies. With your comments I made some progress.

I installed vnc viewer on my iPhone and was pleasantly surprised to see that I was able to establish a vnc to my Raspberry Pi:

osmc@osmc:~/dispmanx_vnc-master$ ./dispman_vncserver
Open display[0]…
Display is 720 x 480
Server bpp:16
Server bigEndian:0
Server redShift:0
Server blueShift:10
Server greeShift:5
21/07/2016 16:42:48 Listening for VNC connections on TCP port 5900
21/07/2016 16:42:48 Listening for VNC connections on TCP6 port 5900
open /dev/uinput returned 7.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
21/07/2016 16:43:15 Got connection from client

My home network has a couple Apple AirPort Extreme routers at and I have a Mac mini running Apple Server at I have a number of devices assigned to IP addresses using their MAC addresses, and one of them is my Raspberry Pi at

The screen snap showing Port Forwarding shows values established when I set up the Server software, and you’re right it shows the server IP address (

I need to educate myself a bit to see what I need to do to set up port forwarding for the Raspberry Pi. Sorry for my ignorance. Once I have done some reading I may be able to solve the problem on my own or at least be able to ask an intelligent question.


You ONLY need to mess with port forwarding when you are attempting to connect to devices from outside your home LAN.


@ActionA: If you use a Mac, then maybe you can explain why I can’t use the VNC client embedded in Mac OS. In the Go menu I select Connect to Server… and in the Server Address field I enter “vnc://”. In a Terminal window, logged into the Raspberry Pi via ssh, I’ve started the VNC server and I do see that it responds when I hit the Connect button after I’ve entered “vnc://” and entered the osmc password (‘osmc’):

21/07/2016 17:37:42 Got connection from client
21/07/2016 17:37:42 other clients:
21/07/2016 17:37:42 Normal socket connection
21/07/2016 17:37:42 Client Protocol Version 3.3, y1=36
21/07/2016 17:37:42 Protocol version sent 3.3, using 3.3
21/07/2016 17:38:17 rfbProcessClientInitMessage: client gone
21/07/2016 17:38:17 Client gone
21/07/2016 17:38:17 Statistics events Transmit/ RawEquiv ( saved)
21/07/2016 17:38:17 TOTALS : 0 | 0/ 0 ( 0.0%)
21/07/2016 17:38:17 Statistics events Received/ RawEquiv ( saved)
21/07/2016 17:38:17 TOTALS : 0 | 0/ 0 ( 0.0%)
21/07/2016 17:38:17 Got connection from client
21/07/2016 17:38:17 other clients:
21/07/2016 17:38:17 Normal socket connection
21/07/2016 17:38:17 Client Protocol Version 3.3, y1=36
21/07/2016 17:38:17 Protocol version sent 3.3, using 3.3
464/480 Picture (025 fps) x0=664, y0=22, x1=673, y1=36

However, the cursor spins with “Connecting…” and I never see an osmc screen":


I just noticed that when I successfully used VNC Viewer on my iPhone I get a message from the VNC Server that it connects using Client Protocol Version 3.8 but trying to connect from my Mac I’m informed that I’m trying to use Client Protocol Version 3.3. Maybe the Mac is using an outdated incompatible protocol to establish the VNC connection?


Yeah could be…i am not that familiar with mac os vnc apps, thats why i wanted to try with the iphone since i know that it works 100%. Well at least now we know where is the problem.
You could always try with : https://www.realvnc.com/download/viewer/macosx/
Realvnc works fine on the pc, so i guess it would work well on the mac as well…Just need to tweak the ‘speed’ option first…Cant go up to million of colors…basic 256 colors connection will work fine…Anything higher and it the connection breaks. … Maybe thats what happens with your current mac app ? does it have any speed settings ? If yes try connecting with the lowest setting first.

ps: I got 4 pcs and 2 pi’s in my house…thats why i keep specifying the ports because all of them are running similar services…but yeah…you dont really need portforwardning inside your lan, if you only have 1 pc/pi running vnc. Nonetheless when something is going wrong its a necessary step to find the culprit…so you know at least that portforwarding is not to blame here.


@Sandbird: vnc viewer worked on the Mac. It uses RFB protocol version 3.8, so maybe MacOS’s use of the older version 3.3 is the problem. Anyway, thanks for the help.


I didn’t make it very far as shown here. Would someone please advise?

osmc@KublerRPi:~$ unzip master.zip -d /home/osmc/
Archive: master.zip
creating: /home/osmc/dispmanx_vnc-master/
inflating: /home/osmc/dispmanx_vnc-master/BCMHost.hh
inflating: /home/osmc/dispmanx_vnc-master/DMXDisplay.cpp
inflating: /home/osmc/dispmanx_vnc-master/DMXDisplay.hh
inflating: /home/osmc/dispmanx_vnc-master/DMXResource.cpp
inflating: /home/osmc/dispmanx_vnc-master/DMXResource.hh
inflating: /home/osmc/dispmanx_vnc-master/DMXVNCServer.cpp
inflating: /home/osmc/dispmanx_vnc-master/DMXVNCServer.hh
inflating: /home/osmc/dispmanx_vnc-master/Exception.hh
inflating: /home/osmc/dispmanx_vnc-master/Makefile
inflating: /home/osmc/dispmanx_vnc-master/README.md
inflating: /home/osmc/dispmanx_vnc-master/UFile.cpp
inflating: /home/osmc/dispmanx_vnc-master/UFile.hh
inflating: /home/osmc/dispmanx_vnc-master/dispmanx_vncserver.conf.sample
inflating: /home/osmc/dispmanx_vnc-master/main.cpp

osmc@KublerRPi:~$ rm master.zip
rm: remove write-protected regular file ‘master.zip’? y

osmc@KublerRPi:~$ cd dispmanx_vncserver-master
-bash: cd: dispmanx_vncserver-master: No such file or directory

osmc@KublerRPi:~$ mkdir dispmanx_vncserver-master

osmc@KublerRPi:~$ cd dispmanx_vncserver-master

osmc@KublerRPi:~/dispmanx_vncserver-master$ make
make: *** No targets specified and no makefile found. Stop.

osmc@KublerRPi:~$ sudo cp dispmanx_vncserver /usr/bin
cp: cannot stat ‘dispmanx_vncserver’: No such file or directory


Well looking at this I guess
cd /home/osmc/dispmanx_vnc-master/

Would have done the trick


Hi Lucalobe , how you solve realvnc error ?
assertion failed one … its work on tightvnc … but i need it on realvnc :S


Works also on OSMC with Krypton without any errors