How it works...

X Windows and X11 is what provides the method by which Raspberry Pi (and many other Linux-based computers) can display and control graphical Windows as part of a desktop.

For X11 forwarding to work over a network connection, we need both SSH and X11 forwarding enabled on Raspberry Pi. Perform the following steps:

  1. To switch on (or off) SSH, you can access Raspberry Pi Configuration program under the Preferences menu on the Desktop and click on SSH within the Interfaces tab, as shown in the following screenshot (SSH is often enabled by default for most distributions to help allow remote connections without needing a monitor to configure it):
The advanced settings menu in the raspi-config tool
  1. Ensure that X11 forwarding is ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.