[HowTo] Install a vnc server on the Raspberry pi


#203

fixed thanks


#204

Nearly, but not quite. Try again! :relaxed:


#205

any news on vnc on vero?


#206

Which version?

I compiled it for Vero 2 for a user a few months ago.


#207

vero2, most recent version of osmc!


#208

I invited you to the thread – it was done with PM with a user.


#209

Hello,

I have the same error, how can I solved it?

thanks.
Diego


#210

Diego, I prepared a detailed procedure to install osmc on my Raspberry Pi 3, replete with screen snaps to illustrate the written instructions. I would be happy to email you a copy. I could post here as a pdf file if I knew that was permitted and possible.

I can also extract the parts related to VNC setup and email (or post here, if permitted).

All my hardware is from Apple, from AirPort Extreme routers to MacBook Pros, so the instructions are very Apple-specific. My procedure requires no keyboard or monitor, just my Mac and the capabilities that are already part of MacOS.


#211

Yes please,

Should I uninstall svn from my Pi? how can I do it?

Thank you very much!

Regards,
Diego.


#212

Diego, I’m not sure if you are addressing me with your question about svn. (This is quite a long thread and you may asking this of someone else.) As soon as I figure out how to post a pdf file, I’ll post my detailed instructions for VNC setup. (I’ll extract the relevant pages from my personal osmc installation guide.)

svn is a source management program and some people may have used it to maintain their software. It isn’t used in my VNC setup but it makes absolutely no difference if it’s installed on your Raspberry Pi. You probably needed it for installation of some other software. That would be my guess anyway.


#213

osmc VNC Installation (draft).pdf (2.0 MB)


#214

This works perfectly for me.
This might be a stupid question, but how do I set the pi up to tunnel the session over ssh and stop the 5900 port connecting to anything external?
I have public keys set up for ssh and want the vnc to be secure…


#215

Well, @patrikolausson kindly changed his code to include the option to only allow localhost connections via a switch in the configuration file. You have to recompile the vnc server using make. I’m trying this on another pi (an rpi3), and am unable to make due to

osmc@osmc:~/dispmanx_vnc-master$ make
cc -c -o main.o main.c
main.c:21:22: fatal error: bcm_host.h: No such file or directory
#include “bcm_host.h”
^
compilation terminated.
: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1
osmc@osmc:~/dispmanx_vnc-master$

=============

I’m not familiar with compiling or Linux in general and make my through all these things with judicious use of Google, but it’s letting me down here.
My /opt/vc/include has the file Bcm_host.h so I don’t understand what I’m doing wrong.

Can anyone help?


#216

export CFLAGS="-I/opt/vc/include"
export LDFLAGS="-L/opt/vc/lib"

Then run make.


#217

Perfect, thanks


#218

Nice, thanks, didnt notice the files were changed. I updated the guide to include those new values


#219

Did you get the code from my repo on the other pi (the pi3)? I think not since it builds main.c, while my repo has the file main.cpp and includes the proper include paths.


#220

I used this one
https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip

Is that wrong?


#221

No, that is the correct one. Could it be that you have remains from an earlier attempt with another repo? The folder should contain main.cpp and not main.c, I suspect you have both. Try unzipping to a new folder, or remove/rename the old folder and unzip again, or just delete main.c.


#222

All worked perfectly - I can now only connect via either server use ssh tunnel or vpn. Many thanks!