VNC access to Raspberry Pi

While enabling SSH, we also enabled VNC. VNC is a tool that enables remote viewing of the Raspberry Pi desktop. Because VNC is already enabled on the Raspberry Pi, download and install VNC viewer (https://www.realvnc.com/download/viewer/). VNC viewer is available for all operating systems:

  1. Log in is very simple. Just enter the Raspberry Pi's username and password:
Login
  1. It should take you directly to the Raspberry Pi's desktop.
Raspberry Pi desktop via VNC

SSH via USB OTG port

This trick is meant for advanced users only.

We came across this nifty trick at https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a. This is helpful when you do not have a USB Wi-Fi adapter and a USB OTG converter. We can connect the Raspberry Pi's USB-OTG port directly to the USB port of a computer (using a micro-USB cable) and access it via SSH. This is enabled due to the fact that the USB OTG port of the Raspberry Pi Zero enumerates as a USB-over-Ethernet device when connected to a computer:

  1. Once the micro SD card is flashed with the Raspbian Jessie OS, open the SD card's contents and locate the file config.txt.
  2. At the end of the file, config.txt, add the following line to the file: dtoverlay=dwc2.
  3. In the file, cmdline.txt, add modules-load=dwc2,g_ether after rootwait. Make sure that each parameter of this file is separated by a single space.
  4. Save the file and insert the SD card into your Raspberry Pi Zero.
  5. On a command-line terminal, log in using ssh pi@raspberrypi.local. This should work on Mac/Ubuntu environment. In a Windows environment, Bonjour protocol drivers are necessary (https://support.apple.com/kb/DL999?locale=en_US). In addition, RNDIS Ethernet drivers are also necessary (http://developer.toradex.com/knowledge-base/how-to-install-microsoft-rndis-driver-for-windows-7).