[HowTo] Install a vnc server on the Raspberry pi


#349

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.


#350

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


#351

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”.


#352

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.


#353

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


#354

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


#355

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


#356

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


#357

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”


#358

Well


#359

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 ?


#360

Means you still have all necessary packages installed from last time


#361

did you make an sudo apt-get update?


#362

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:


#363

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

#364

It looks like you’re missing the libconfig dependency.
Please install the following:


#365

Hi,

I have already installed them but without luck!


#366

@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


#367

dpkg-query: no packages found matching libconf*


#368

And the output of apt install libconfig+±dev?