VNC server on Vero4K

What reason? VNC Server works fine on Vero4k!

I’m using a mix of Nomachine NX and xtightvncviewer on another linux computer (with GUI) and VNC on the Vero, both on the same local network. NX improves remote bandwith usage.

To install VNC on Vero (standard install):

sudo apt-get update
sudo apt install libvncserver1
sudo wget https://github.com/zjoasan/vnc-vero3/raw/master/aml-vnc 1 -O /usr/bin/aml-vnc
sudo chmod +x /usr/bin/aml-vnc

To install Nomachine NX on a linux computer (here Debian Stable):

sudo apt-get install -y gdebi xtightvncviewer parallel
wget -O nomachine_amd64.deb "$(wget -q -O- "https://www.nomachine.com/download/$(wget -q -O- "https://www.nomachine.com/download/$(wget -q -O- "https://www.nomachine.com/download" | grep -i -A10 -B10 "amd64" | grep -i -A10 "&id=" | grep -i -A10 "linux" | grep "/download/" | sed "s/^.*href=.\/download\///g;s/\('\|\"\).*$//g" | head -n1)" | grep  -A6 -i "\"deb" | grep -B5 -A5 -i amd64 | grep "href=" | sed "s/^.*href=.\/download\///g;s/\('\|\"\).*$//g" | head -n1)" | grep deb | grep "download.nomachine" | sed "s/^.*http/http/g;s/\.deb.*$/.deb/g")"
sudo gdebi --n nomachine_amd64.deb
rm -f nomachine_amd64.deb

So:

  • remotely, you connect to the local PC with Linux and a GUI, using NX.
  • then open a terminal
  • then using GNU Parallel, start the VNC server on the vero and connect to it using this command below. It’s only one line, and I’ve added some ssh bridging for extra minimal security (I’m assuming you can connect to your Vero via ssh, using a password-less login).
parallel --halt 2 -j0 -k --line-buffer ::: "ssh osmc@$vero_local_ip -p$vero_local_ssh_port \"killall -9 aml-vnc; aml-vnc\"" "sleep 10; ssh -p $vero_local_ssh_port -2 -N -L 127.0.0.1:5901:localhost:5900 osmc@$vero_local_ip" "killall -9 xtightvncviewer; sleep 15; xtightvncviewer -truecolour -compresslevel 1 -quality 0 127.0.0.1:5901; sleep 1; kill -9 \"\$(echo \"\$(ps auxf)\" | grep \"\\_ ssh osmc\" | grep -v grep | awk '{print \$2}')\";"

It uses standard port 5900, resolution 960x540, True Colour (24-bit, medium quality), and can interact with CEC commands or key directions, Enter, Backspace/ESC + ‘c’ as KEY_TITLE (menu key on the OSMC remote). Other controls are here: https://kodi.wiki/view/Keyboard_controls
Once you close xtightvncviewer, the vnc server doesnt stop.

You should probably test this command locally to see if everything works:
xtightvncviewer -truecolour -compresslevel 1 -quality 0 $vero_local_ip:5900

I just want to add another vote to make a vnc server a part of OSMC on the Vero 4k+. I prefer to do most of configuration on the Vero 4K+ from my PC, where I can have a web browser running in another window for reference information. Getting the vnc server to autostart would be another plus.

I’m not concerned with video playback over the vnc, just access to the controls. I haven’t had luck getting the web server to run smoothly.

Steve

1 Like

It’s something we could look at in the future perhaps when we have a more unified windowing approach across all platforms. This would save us the pain of platform specific implementations and give us a more consistent experience.

Got this working, any way to specify a password and change the port perhaps?

Trying to set this up for a family member and need remote access beyond SSH.
You know parents, so I need to see the actual screen, not the web interface system that Kodi uses. I am used to using Core/LibreELEC which has an addon for Amlogic VNC however it doesn’t seem to function with the Vero4K even when manually installed.
If it’s not possible to specify a port or password, that’s fine as access goes through a VPN anyway - figured I’d ask though.

Cheers.

If you can access via SSH you could use port forwarding and only start the vncserver when you access the device.

Alternatively see help for port/password

osmc@osmc-vero4k:~$ aml-vnc -h
aml-server [parameters]
-f <device>	- Framebuffer device
-h		- Print this help
-p <password>	- Password to access server
-R <host:port>	- Host for reverse connection
1 Like

It’s been a while since this original post, but @dtech took an interest in packaging up the VNC Server for the OSMC App Store.

I’ve given him a hand with things and a VNC server should now be visible for Vero 4K / 4K + and Vero V devices under the OSMC App Store.

There are also a number of improvements to the VNC server implementation itself since the original build from March 2017 was posted here.

This is available to install now.

4 Likes

Hi there. Just testing.
This is really nice to in mutliple circumpstances, one being when just want to stream audio content and do not stand next to TV. Works on RealVNC with iPad… and Vero remote for navigating through menus, change volume.
A big help for stream web radio when sometimes I got to pick various options / substreams.
Now that I have upgraded to Vero V, I will also considering to use my Vero4k as headless for audio only, like an audio satellite.

Performance not gorgeous but looks promising and already useful to me in addition to kodi remote control app (iPhone) which has its own limitation. Thanks!!

There will some improvements with an upcoming version.

While VNC is nice for that I have to save using Yatse is much easier for that.

1 Like

Thanks for the information. looking forward

Good to know but Yatse not available on iOS as far as I could check, right?

Yes unfortunately on Ipad you have limited options. While the official Kodi Remote should be good enough

Should be released later this evening

1 Like

If anyone has questions, finds a bug, or has an idea to implement, please let me know.

Thanks.

1 Like