[HowTo] Install a vnc server on the Raspberry pi

Hello, and sorry to put this question here, if that would be the wrong topic.
I installed everything according to what was written here (dispmanx) and installed vnc viewer on my ipad. When I make the connection I actually see the screen of the rapsberry pi 2, but cannot enjoy that for more than a second: then I see a message “error, network connection is lost”. End of session, helas!
Any advice what to do now? I would very much like to steer my raspberry without putting the TV on!

Thanks for considering to answer this!

Actually that happened to me too :smile:
The solution is to lower the colors on the connection. Instead of a thousand try 256, if that doesnt work lower it more to 128 or something. After that it will work. I guess too many colors messes up the connection.

hello,
I install the dispman_vnc.
this vnc is not working with confluance old interface.

the keyboard and mouse interaction does not work when no ring road is plug into the raspberry pi.

I am interesting, because I would like make an information display panel with a rasberry pi2. I want to take control remotely to monitor the display status.

An equivalent version of the raspbmc it is in progress?

Thank you for your response.
best regards.

@sam_nazarko dispmanx_vnc will be in the next release ?

Im getting this error:

sudo apt-get install libvncserver-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libvncserver-dev : Depends: libgnutls28-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

hi, i’ve been using this version of vnc server now posted by patrikolausson: Possible to install a VNC server? - #12 by patrikolausson

You might wanna give that a try and see ?
Read my comments on the thread on how to compile it…you have to remove -Wall and -mtune=native from the makeit file.

Its been working fine for the past months, and with low CPU consumption.
His github page is: GitHub - patrikolausson/dispmanx_vnc: VNC Server for Raspberry PI using dispmanx

does this work on RC3?

my current system:

root@osmc:~#  cat /etc/os-release
PRETTY_NAME="Open Source Media Center"
NAME="OSMC"
VERSION="Release Candidate Two"
VERSION_ID="0.9.9"
ID=osmc
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.osmc.tv"
SUPPORT_URL="http://www.osmc.tv"
BUG_REPORT_URL="http://www.osmc.tv"

root@osmc:~# cat /proc/version
Linux version 3.18.10-1-osmc (root@vero) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP PREEMPT Mon Apr 6 15:34:17 UTC 2015
1 Like

@Sandbird I can’t get kodi/osmc to detect my keypresses and mouse moving using vnc

  • Mouse and touch is enabled in KODI
  • TVNC “view only” is disabled

any other setting I have to check?
thanks!

Hmmm thats weird, did the compile of the server went well? Try lowering the graphics quality to the minimum on the vnc client.
Did you try a reboot? Try running vnc client as admin. Maybe you got a weird antivirus blocking stuff? Tried connecting from another device inside your home network? Maybe an iphone? Does it work there?

did the compile of the server went well? - “./makeit” showed no
Try lowering the graphics quality to the minimum on the vnc client. - didn’t worked
Did you try a reboot? - yes
Try running vnc client as admin - didn’t worked
Maybe you got a weird antivirus blocking stuff? - no AV
Tried connecting from another device inside your home network? - yes

result after running:
osmc@osmc:~$ sudo dispman_vncserver
Open display[0]…
Display is 1920 x 1080
Server bpp:16
Server bigEndian:0
Server redShift:0
Server blueShift:10
Server greeShift:5
21/06/2015 12:03:50 Listening for VNC connections on TCP port 5900
21/06/2015 12:03:50 Listening for VNC connections on TCP6 port 5900
open /dev/uinput returned 7.
First write returned 1116.

is that it?

Those last 2 lines are probably the key to whats going on, but i got no idea what the mean.
When you connected from your mobile, you couldnt move the cursor as well ?
btw, did you try my method or the once i posted further down this thread from : Possible to install a VNC server? - #12 by patrikolausson

?

tried this HowTo (first post)

using “vnc viewer” for android. Mouse and keyboard does not work also.

why “sudo chmod 666 /dev/uinput” ?

UPDATE:
tried install in RPI1 and same problem
maybe an issue vnc in github master?

try this version patrikolausson mentions bellow my post here : Possible to install a VNC server? - #12 by patrikolausson
This is the one i have on my pi2.

The 666 is for this reason mentioned here: chmfp - a linux driver and utility for CH Multi-Function Panel

I created this unit to run VNC

[Unit]
Description=VNC Server
After=network-online.target mediacenter.service
Requires=mediacenter.service

[Service]
Restart=on-failure
RestartSec=30
Nice=15
User=root
Group=root
Type=simple
ExecStartPre=/sbin/modprobe evdev
ExecStart=/usr/bin/dispmanx_vncserver
KillMode=process

[Install]
WantedBy=multi-user.target

If your vnc server is working fine as a standalone then do this part here:

where is says Automation and run at boot
thats what i did to make it start on boot and also be able to start/stop it when i want to.

update. it’s working now with systemd. changed type to simple

I have 3 installations of OSMC (all up to date) and all had dispman_vncserver running fine (not all the time only when I need them), however now one decided to stop to receiving input but I can still see video from vnc.

The only difference between the three pi2/installs is that I use CEC on this one to remote control kodi, I don’t suppose that would cause any problem though, would it?

Any idea what the problem could be? this one install is an image of another one that is working with several settings/language differences. Weird thing is that it was working for a while not sure what could have changed as I didn’t touch much the systems since it was last working.

I found the solution. I removed the keyboard and that made vnc stopped receiving keyboard input from VNC. I plugged in, the remote/keyboard infrared and input to vnc came back.

So no physical keyboard, no VNC input from keyboard either it seems.

Try “sudo modprobe evdev” to make it work without a keyboard