Possible to install a VNC server?

Worked. Thanks. On both repos.o

What is this cmd?

@patrikolausson can you make a PR with your changes in

as soon we have this version Iā€™m sure @sam_nazarko will add to OSMC shop
thanks!

I did that a long time ago. Letā€™s hope he has the time to pull it.

If you are still considering pulling my code, I would strongly suggest getting the latest version as I think it has turned out really well. Check the readme for highlights, but in short the performance, stability and that it does not use any (well almost) resources while not being used makes it quite useful. I have it running on all my devices at all times without a glitch.

I second that. No issues so far. And it only uses resources when connected

@sam_nazarko
I was just checking out ā€œthe new Wikiā€ and it says that a VNC Server can be installed from the App Store. I checked and itā€™s not there.

1 Like

When can we finally expect this xd

@patrikolausson

I installed OSMC on my RPiZERO and followed your instructions on installing vnc, but I get the below and the pi locks up. I cant CTRL-C or CTRL-X out of itā€¦ Any ideas? Or this simply doesnt work on the ZERO?
I also instaled g++ as stated in one of the earlier post, but to no change. Still locks and wont connect via tightvnc.

root@mom_osmc:/home/osmc/dispmanx_vnc-master# ./dispman_vncserver
Open display[0]ā€¦
Display is 2048 x 1152
Server bpp:16
Server bigEndian:0
Server redShift:0
Server blueShift:10
Server greeShift:5
09/12/2015 10:19:26 Listening for VNC connections on TCP port 5900
09/12/2015 10:19:26 Listening for VNC connections on TCP6 port 5900
open /dev/uinput returned 7.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.

I havenā€™t tried as high resolution as you have before, but tried it now and get the same problem that you have. For some reason taking a snapshot of the screen hangs using that resolution. I have tried to debug a bit now, but have not been able to figure out why. Try to lower the resolution to e.g. 1920x1080 and see if that works better.

Are you using the latest version from my fork on GitHub - patrikolausson/dispmanx_vnc: VNC Server for Raspberry PI using dispmanx ?

Yes I was, I just finished re-installing OSMC on it now, I will try again. I see that on your link, the instructions are missing a few steps. Is it possible to add all steps?

Also, where do I change the resolution?

Check the ā€œscreen resolutionā€ - section in README.md.

Which steps are missing from the instructions?

Oh you mean in the /boot/config.txt ? ok i did that nowā€¦

the section that is missing is:

sudo wget https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip
unzip master.zip -d /home/osmc/
rm master.zip
cd /home/osmc/dispmanx_vnc-master/
make
sudo modprobe uinput (is this needed?)
sudo chmod 666 /dev/uinput (is this needed?)
./dispman_vncserver
sudo cp dispmanx_vncserver /usr/bin
sudo chmod +x /usr/bin/dispmanx_vncserver

As well as the whole section related to setting it up to start on boot.

Also noticed that your Screen resolution is wrong for CAEā€¦

16 = 1080p 50Hz

16 is 60hz not 50 as per Raspberry Pi Documentation - Configuration

im obviously doing something wrongā€¦ Now after a reboot (to take the config.txt changes, now it locks up. I only see the kodi screen (influance screen) and cant work with mouse or keyboard and canot ssh to it either, cant seem to ping either.

You are right of course, fixed the typo now. Thanks. I will consider including a more complete set of steps or a script sometime in the future if and when I get the time.

@patrikolausson

Here you goā€¦ This works for me on a Pi ZERO

sudo apt-get update
sudo apt-get install build-essential rbp-userland-dev-osmc libvncserver-dev libconfig+Ā±dev
sudo wget https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip
unzip master.zip -d /home/osmc/
rm master.zip
cd /home/osmc/dispmanx_vnc-master/
make
sudo cp dispmanx_vncserver /usr/bin
sudo chmod +x /usr/bin/dispmanx_vncserver
sudo modprobe evdev
cp dispmanx_vncserver.conf.sample /etc/dispmanx_vncserver.conf

to setup vnc to startup on boot

sudo vi /etc/systemd/system/dispmanx_vncserver.service

And copy/paste this text there (dont forget to press i first) :

[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

sudo systemctl start dispmanx_vncserver.service
sudo systemctl enable dispmanx_vncserver.service
sudo systemctl daemon-reload

Lastly, reboot

Im noticing that on the Pi Zero, itā€™s almost not usable though, doing a top while being on VNC shows:
263 root 35 15 56576 18416 4404 R 67.8 5.1 1:18.29 dispmanx_vncser

67.8% CPUā€¦ not sure what or how to fix this, but this is not usable at all.

will this work on a RPi2?

Yes

1 Like

@dosch ā€¦ I went through this setup on RPi2 and documented the same :slight_smile:

VNC server on RPi2

1 Like