[HowTo] Install a vnc server on the Raspberry pi

Every time I restart OSMC / RPi, I have to re-rerun sudo chmod 666 /dev/uinput in order to get dispmanx_vncserver to run.

If I don’t do this I get the following error when start the vncserver. Exception: Error create uinput device %d.

Is there a fix?

Either connect an input device (e.g. a remote) or just create a start script that includes the chmod and dispmanx command

I already have Generic USB IR remote dongle / IR remote attached to the RPi via USB. I’ve tried switching the receiver to a couple of different USB ports. But still the issue persists. Very odd.

Well the IR reciever may not trigger the input module. Anyhow just put this lines into a script and use it to start vncserver

sudo modprobe uinput
sudo chmod 666 /dev/uinput
sudo modprobe evdev
/home/osmc/dispmanx_vncserver

I’ve been staring at this forum (and many others for hours and hours. I’ve been struggling trying to get this all set up on my system and after that frustration i have come to this point.
VNC is installed and compiled configured and running. I can connect with my viewer however i face the osmc start up screen with a small cursor. Input from my cursor or keyboard is translated to osmc (i can see the reaction on the tv my rpi is plugged into) however the screen in my viewer never changes.
Any thoughts or ideas?

Which Viewer?
How connected?

I’m using RealVNC. Its connected over wifi, I can log in with both PuTTy and RealVNC viewer, my commands and controls from my laptop are transmitted to OSMC, my rpi is plugged into a small tv, I can see the screen change, and navigate the menu using my keyboard, but the screen in my viewer never changes from the startup splash screen.

I’ve found a couple comments in forums that suggest for other issues to adjust the “depth”?? I’m not sure of where to find this configuration file and how to adjust it. Could this be my issue? I’ve been digging through the system files looking for any hints.

Suggest to try another viewer like ultravnc

I get the same response with TightVNC, RealVNC, and now UltraVNC. I’m stumped…

Ok that is strange you could try:

  1. Run a Live Linux (e.g. Ubunutu) from USB stick and use vncviewer from there to ensure your client is not the problem
  2. Test your network throughput between your PC and OSMC with iperf
  3. Try to add this to /home/osmc/dispmanx_vncserver.conf

relative = false;
port = 0;
screen = 0;
unsafe = false;
fullscreen = false;
multi-threaded = true;
password = “”;
frame-rate = 15;
downscale = true;

These steps didn’t lead me any further unfortunately…

Tell us more! What was the outcome of each step?
Also if you start the dispmanx via SSH what is the output on the screen when you connect via VNC?

The bit depth made a huge difference for me.
Try the lowest setting in server and client.

Ok so with iperf i get
iperf response
[1900] local 192.168.0.77 port 57838 connected with 192.168.0.48 port 5001

Client connecting to 192.168.0.48, TCP port 5001
TCP window size: 256 KByte (default)

[ ID] Interval Transfer Bandwidth
[1900] 0.0- 2.0 sec 13.0 MBytes 54.5 Mbits/sec
[1900] 2.0- 4.0 sec 6.75 MBytes 28.3 Mbits/sec
[1900] 4.0- 6.0 sec 12.4 MBytes 51.9 Mbits/sec
[1900] 6.0- 8.0 sec 0.00 Bytes 0.00 bits/sec
[1900] 8.0-10.0 sec 2.25 MBytes 9.44 Mbits/sec
[1900] 0.0-10.6 sec 36.8 MBytes 29.0 Mbits/sec

The client is able to connect to my second raspberry pi, running rasbian pixel, without any issue. dispmanx_vncserver.conf is already configured this way per the instructions in this tutorial.
Starting the server through the console makes no difference. Also within the client it seems none of the quality setting yeild any changes.

Did you try the live linux to have a different client to test?

would running a virtual machine be effectively the same thing? I’ve done that and saw no change

Yes, you mean you run a Linux in a virtual machine and used vncviewer and same result?
Then I guess something wrong on your OSMC side. You can try to recomplie the vncserver otherwise a reinstall maybe the only way out.

Yes i’ve run linux mint in a virtualbox and saw no change, just that blue startup screen staring back at me taunting me. I’ve reinstall about a half dozen times, this is very frustrating, it has to be something simple I’m missing. I’ve followed this tutorial to the letter, posed these questions to a couple different forums, tried recreating the startup script once, which left me with a weird situtation where i could connect to vnc only after ssh in with putty. I guess when i’ve got the time i’ll try again from square one and hope for the best.

As a first step don’t use a startup script. Just login via ssh and start dispmanx than you also see what goes on when you connect!