[HowTo] Install a vnc server on the Raspberry pi

The December 2017 osmc update seems to have broken the dispmanx_vnc install which was working fine based on these instructions. Manually restarting it seems to have no effect.

sudo systemctl status dispmanx_vncserver

  • dispmanx_vncserver.service - VNC Server
    Loaded: loaded (/etc/systemd/system/dispmanx_vncserver.service; enabled; vend
    Active: activating (auto-restart) (Result: exit-code) since Sat 2018-01-20 10
    Process: 7037 ExecStart=/usr/bin/dispmanx_vncserver (code=exited, status=127)
    Process: 7035 ExecStartPre=/sbin/modprobe evdev (code=exited, status=0/SUCCESS
    Main PID: 7037 (code=exited, status=127)

When I run

sudo /usr/bin/dispmanx_vncserver

I get:
trying: /etc/dispmanx_vncserver.conf
Read config file: /etc/dispmanx_vncserver.conf
/usr/bin/dispmanx_vncserver: symbol lookup error: /usr/bin/dispmanx_vncserver: undefined symbol: _ZNK9libconfig6Config11lookupValueEPKcRSs

Which I think may be something to do with libconfig, but not sure.

Iā€™ve updated everything using sudo apt-get update to see if anything needed updating, but nothingā€¦

Any ideas? I canā€™t be the only one.

Well reading the posts in this thread that are after the December update should have given you the answers.
Libvncserver has been updated and the vncserver must be recompiled to match that.
So just follow the steps in the first post to do a recompile of the vncserver binary

You beat me to my reply - I had scanned though but missed wbeard52ā€™s post which details the steps.
Just a note to beginners like me:
On the ā€˜makeā€™ step, if you get a message ā€œmake: Nothing to be done for ā€˜allā€™ā€, use ā€œmake cleanā€ , then ā€œmakeā€.

1 Like

I donā€™t think the issue is unique to osmc! I am using dispmanx server on Raspbian and it occasionally stops working on there too.

this vnc server tutorial has been work for my raspberry 3 , until 3 days ago i cannot remote my raspi and i found this error on log

Jan 22 08:16:27 RaspberrySitaSafa dispmanx_vncserver[349]: /usr/bin/dispmanx_vncserver: error while loading shared libraries: libvncserver.so.0: cannot open shared object file: No such file or directory
Jan 22 08:16:27 RaspberrySitaSafa systemd[1]: dispmanx_vncserver.service: Main process exited, code=exited, status=127/n/a
Jan 22 08:16:27 RaspberrySitaSafa systemd[1]: dispmanx_vncserver.service: Unit entered failed state.
Jan 22 08:16:27 RaspberrySitaSafa systemd[1]: dispmanx_vncserver.service: Failed with result ā€˜exit-codeā€™.

what should i do ?

Thanks all

Read this thread which already clearly indicate that you need to recompile following the original steps to match the new library

1 Like

do i need to stop vnc service and remove all instalation files , or just follow instruction from first step ?

Just follow Step1 + the copy and chmod part. No need for reconfigure

2 Likes

i follow step 1 , until chmod section , but when on ā€œmakeā€ command , raspberry response with text "make: nothing to be done for ā€˜allā€™
and i go same error like before ā€œdispmanx_vncserver[979]: /usr/bin/dispmanx_vncserver: error while loading shared libraries: libvncserver.so.0: cannot open shared object file: No such file or directoryā€

Well

2 Likes

what about response ā€œ0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.ā€ when i type sudo apt-get install build-essential bla bla bla ā€¦ on first step " ? is it okay ?

Means you still have all necessary packages installed from last time

2 Likes

did you make an sudo apt-get update?

markuslange ā†’ i use sudo apt-get install but now my
problem solved , with make clean first before make , and now i can remote my raspberry with vnc client , Thanks all :smiley:

For some reason the instructions in post #1 no longer work for me when updating Dispmanx. I have experience this problem

++ -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -c main.cpp -o main.o
main.cpp:18:25: fatal error: libconfig.h++: No such file or directory
 #include <libconfig.h++>
                         ^
compilation terminated.
Makefile:28: recipe for target 'main.o' failed
make: *** [main.o] Error 1

It looks like youā€™re missing the libconfig dependency.
Please install the following:

1 Like

Hi,

I have already installed them but without luck!

@Aaron_Spehr Could you give me the output of:
dpkg-query -l 'libconf*'?

Should look somewhat like this:
~# dpkg-query -l ā€˜libconf*ā€™
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++Ā±========================-=================-=================-=====================================================
ii libconfig+Ā±dev:armhf 1.5-0.3 armhf parsing/manipulation of structured config files (C++
un libconfig++8-dev (no description available)
un libconfig++9 (no description available)
ii libconfig++9v5:armhf 1.5-0.3 armhf parsing/manipulation of structured configuration file
ii libconfig-dev:armhf 1.5-0.3 armhf parsing/manipulation of structured config files (deve
un libconfig-doc (no description available)
un libconfig8-dev (no description available)
ii libconfig9:armhf 1.5-0.3 armhf parsing/manipulation of structured configuration file
ii libconfuse-common 3.0+dfsg-2 all Common files for libConfuse
ii libconfuse1:armhf 3.0+dfsg-2 armhf Library for parsing configuration files

1 Like

dpkg-query: no packages found matching libconf*

And the output of apt install libconfig+Ā±dev?