OSMC ver 2016.01-1 -VNC Server doesn't autostart at boot

Working config for anyone else who is trying to configure VNC on ver 2016.01-1.

Thanks fzinken once again!!


//install vnc server on osmc
osmc@lmc:~$ sudo apt-get install build-essential rbp-userland-dev-osmc libvncserver-dev libconfig+±dev
osmc@lmc:~$ sudo wget https://github.com/patrikolausson/dispmanx_vnc/archive/master.zip
osmc@lmc:~$ unzip master.zip -d /home/osmc/
osmc@lmc:~$ sudo rm master.zip
osmc@lmc:~$ cd /home/osmc/dispmanx_vnc-master/
osmc@lmc:~$ make
osmc@lmc:~$ sudo cp dispmanx_vncserver /usr/bin
osmc@lmc:~$ sudo chmod +x /usr/bin/dispmanx_vncserver
osmc@lmc:~$ sudo modprobe evdev
osmc@lmc:~$ sudo cp dispmanx_vncserver.conf.sample /etc/dispmanx_vncserver.conf
osmc@lmc:~$ cd
osmc@lmc:~$ sudo nano /etc/modules
evdev
Ctrl-O & Ctrl-X to save the file and exit

osmc@lmc:~$ sudo nano /boot/config.txt
// This enables HDMI resolutions when HDMI is not connected
hdmi_force_hotplug=1
// Group
// 1=CEA, used for connecting to consumer TV sets
// 2=DMT, used for connecting to a computer monitor
hdmi_group=1
// CEA Modes
// 4 = 720p 60Hz
// 19 = 720p 50Hz
// 16 = 1080p 60Hz
// 31 = 1080p 50Hz
// DMT Modes
// 39 = 1360x768 60Hz
// 82 = 1920x1080 60Hz
hdmi_mode=16
Ctrl-O & Ctrl-X to save the file and exit

osmc@lmc:~$ sudo nano /etc/systemd/system/dispmanx_vncserver.service
[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
Ctrl-O & Ctrl-X to save the file and exit

osmc@lmc:~$ sudo systemctl start dispmanx_vncserver.service
osmc@lmc:~$ sudo systemctl enable dispmanx_vncserver.service
// output rcvd. after previous command is executed … Created symlink from /etc/systemd/system/multi-user.target.wants/dispmanx_vncserver.service to /etc/systemd/system/dispmanx_vncserver.service.//
osmc@lmc:~$ sudo systemctl daemon-reload
osmc@lmc:~$ sudo reboot

// Once the RPi2 reboots you should be able to connect to it using a VNC viewer client. Connect to RPi2 IP over port 5900

//command to launch vnc server service manually
osmc@lmc:~$ sudo /usr/bin/dispmanx_vncserver

// disable auto start of vnc at system boot (CPU hog!!!)
osmc@lmc:~$ sudo systemctl disable dispmanx_vncserver.service
// output rcvd when service is disabled … Removed symlink /etc/systemd/system/multi-user.target.wants/dispmanx_vncserver.service.//

fzinken :raised_hands: