Change the director to the user (pi, usually /home/pi/) account directory:


In that folder, there should be a .config directory. Change to that one:


If it not already exists, create a directory named ‘autostart’:


Autostart in config

Change to that directory:


In that folder create (if it does not already exist) a file named tightnc.desktop. It can be created/edited with


Then add the following:


Save the content with CTRL-O and then exit with CTRL-X.

That’s it: Reboot Linux, and the VNC server will be running automatically.

Summary

Virtual Network Connection (VNC) with a VNC viewer is a good way to avoid too many input and output devices on a workbench: It allows me to use my desktop display, mouse, and keyboard for the Raspberry Pi. All it requires is a viewer on the desktop and a VNC server running on the Linux machine. To autostart the VNC server, a file (tightvnc.desktop) has to be created.

Happy VNCing!

Links

Like This Article? Read More From DZone

raspberry pi ,vnc ,iot ,connected devices ,tutorial
Published at DZone with permission of Erich Styger , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.