And here is a way to bind vncserver to a key in your remote control and toggle it on/off by pressing a button. (at the bottom)
discourse.osmc.tv/t/built-in-functions-for-skins/1520/4
I have it bind to the button “win”. You’ll have to find the proper ID for the key you want to use.
The vncboot script is just a simple bash script. Just go to folder /etc/init.d/ or wherever you want really…and type:
nano vncboot
Then copy paste the script Ctrl+X and save…(if you dont place it in another folder dont forget to change the path in the python script as well)
(The above script needs dispman to be at /usr/bin/dispman_vncserver)