Possible to install a VNC server?


well it depends who is using the pi. Setting up a vnc server on the pi behind my parent’s TV allows me to fix stuff or install addons remotely, so i dont have to go to their house and do it manually. For situations like this a remote vnc server is a really nice addition.


True, you won’t hear me saying it’s useless … but before the final has arrived and maybe some bug fixes … if it was me … I wouldn’t spend my time on it :wink:


It is stated that the vnc server can be downloaded from the app store (See this page), but I can’t see it on my PI 2.
When will the vnc server be available for osmc on a PI 2?


You can do it manually if you want. Instructions here:


I have done some major changes to the dispmanx_vnc code. I have included and somewhat changed the performance improvements that Na1w committed some weeks ago. It seems now to be completely stable, surviving changes in resolution and refresh rates (and if given the -f option, it will most likely not exhaust dispmanx while doing so). It has some new features like using (almost) no CPU when no-one is connected, it is possible to specify port, display number, an optional password, a mode for limiting bandwidth and a few other things. I don’t really know how well received it will be, but it now requires c++11, so at least g+±4.7. As the original author has previously rejected to pull changes, so I have pushed most to the Na1w branch, but the last changes are still pending. If you would like to try it out you can get it here: https://github.com/patrikolausson/dispmanx_vnc . Please note that I have added -mtune=native to the makeit file, in case it would disturb cross compilation.

[HowTo] Install a vnc server on the Raspberry pi
[HowTo] Install a vnc server on the Raspberry pi
[HowTo] Install a vnc server on the Raspberry pi

Can you please post the libraries we need to install to compile this ? i have g+±4.7 installed but still cant compile it.

*** Error in `g++': double free or corruption (top): 0x008ca1d8 ***
./makeit: line 1: 12243 Aborted                 g++ -std=c++11 -O3 -Wall main.cp                                                            p -o dispman_vncserver -mtune=native -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HO                                                            ST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vco                                                            s/pthreads -I/opt/vc/include/interface/vmcs_host/linux -L/opt/vc/lib/ -lGLESv2 -                                                            lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lvncserver

[HowTo] Install a vnc server on the Raspberry pi

It seems like g++ is crashing, it is not complaining about missing libraries as far as I can see. Which version of 4.7 do you have? check with “g++ --version”. Can you try upgrading? I have built the code on 4.7.2-5+rpi1. (and 4.8.2 as well as 4.9.2).

It’s a long shot, but you could try to remove -Wall and -mtune=native from the makeit file.

I have seen some bug reports on 4.7 on e.g. lambdas and I have used one of those. I could try to remove it as I was planning to anyway if nothing else works.


Can you submit this as a PR to github.com/samnazarko/dispmanx-vnc?


my g++ --version is: g++ (Raspbian 4.7.3-11+rpi1) 4.7.3

Removing those 2 things worked :smile:
Nice !!!


Good to hear. Would you mind checking which parameter that was the problem?


with only -Wall enabled i got:

main.cpp: In member function 'void UFile::WriteEvent(__u16, __u16, __s32)':
main.cpp:147:39: warning: missing braces around initializer for 'timeval' [-Wmissing-braces]

with only -mtune=native enabled:

*** Error in `g++': double free or corruption (top): 0x0019b188 ***
./makeit: line 1:  1481 Aborted                 g++ -std=c++11 -O3 main.cpp -o dispman_vncserver -mtune=native -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -L/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lvncserver

so i guess it needs both out



help here?

osmc@osmc:~/dispmanx_vnc-master$ sudo apt-get install gcc-4.7 g+±4.7 libvncserver-dev libconfig+±dev
Lendo listas de pacotes… Pronto
Construindo árvore de dependências
Lendo informação de estado… Pronto
Note, selecting ‘gcc-4.7-base’ for regex 'gcc-4.7’
Package g+±4.7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘g+±4.7’ has no installation candidate

osmc@osmc:~/dispmanx_vnc-master$ sudo make
g++ -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCH IQ_ARM -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/in clude/interface/vmcs_host/linux -c main.cpp -o main.o
main.cpp:18:25: fatal error: libconfig.h++: Arquivo ou diretório não encontrado
#include <libconfig.h++>
compilation terminated.
Makefile:26: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1

UPDATE: I removed the -4.7 and it went ok. I didn’t run the “sudo update-alternatives”.
started vnc, runned ok but like the original fork, I could not use mouse/keyboard.


Try the following before starting dispmanx_vncserver:
sudo modprobe evdev


Worked. Thanks. On both repos.o

What is this cmd?


@patrikolausson can you make a PR with your changes in

as soon we have this version I’m sure @sam_nazarko will add to OSMC shop


I did that a long time ago. Let’s hope he has the time to pull it.


If you are still considering pulling my code, I would strongly suggest getting the latest version as I think it has turned out really well. Check the readme for highlights, but in short the performance, stability and that it does not use any (well almost) resources while not being used makes it quite useful. I have it running on all my devices at all times without a glitch.


I second that. No issues so far. And it only uses resources when connected


I was just checking out “the new Wiki” and it says that a VNC Server can be installed from the App Store. I checked and it’s not there.


When can we finally expect this xd