Running a Raspberry Pi Headless
Running and Connecting to a Raspberry Pi in headless Mode
Your first use of a Raspberry Pi will probably be by connecting to it with another computer over the secure shell, SSH.
This will allow you to make use of any screen reader or Braille display running on the host (connecting) machine.
There are a few things you will need, and need to know before you do this. Read the following sections to understand how to proceed.
The IP Address
Once you have connected your Raspberry Pi to your home network, inserted a correctly written memory card and booted the Pi you will need to find the IP address.
Here we encounter some problems. There are a large number of different broadband routers and hubs out there. Most of these have a management web page from which you should be able to find the host name or IP address.
The accessibility or not of these web pages can be a bit hit and miss. My router is a BT Home Hub, and although some pages in the management system are quite complex, the host names of devices currently connected to my wired network appear on the front page.
From this I have been able to discern that the out-of-the-box host names for the two distros I have used are:
- raspberrypi for Raspbian Buster
- alarmpi for Arch Linux
And here is another problem, that of DNS or Domain Name System.
This is a system which translates the easily understandable host names, such as raspberrypi into the IP address that software needs in order to connect to a remote host. Whether the host is truly remote, in another part of the world, or just sitting on your desk at the other end of a length of wire, or a WiFi link.
Not all domestic routers and hubs will provide DNS inside your LAN (local area network). So you may need to know the IP address of the Pi in order to connect to it.
Follow these steps:
- Look at the management page of your hub or router, to check the range of IP
addresses which will be allocated to machines connecting to it using DHCP,
the Dynamic Host Configuration Protocol.
- You may also be able to see the Raspberry Pi by spotting the hostname,
either on the main router configuration management page, or by navigating
to the DHCP client-list page.
- Make a note of the IP address., and also the hostname.
Example:
Suppose we have connected a Raspberry Pi running raspbian and from looking at the router configuration pages we can see raspberrypi, and see that the IP address allocated is 192.168.0.100.
The connection details you will need to know are these two things, the hostname and the IP address.
- You may also be able to see the Raspberry Pi by spotting the hostname,
either on the main router configuration management page, or by navigating
to the DHCP client-list page.
Host Software
If you are using a Windows machine to connect to your Raspberry Pi with an SSH connection, I know of two different pieces of host software which are accessible:
- PuTTY
- Tera-Term
Probably the most well known of these two is PuTTY. Download PuTTY from here.
I am using the NVDA screen reader on Windows, which includes a module to make PuTTY more accessible, but I still find Tera-Term more accessible.
When installing Tera-Term it is important to note one phenomenon I have found using NVDA, which might equally have ill effects with other screen-readers; the install gives the option of installing a macro-helper sub-program. When I installed this I got a program which appears in the system-tray in Windows and which obviously ‘hooks’ into key-strokes and menu selections for recording macros. This caused menus to become silent for some reason. I fixed it by stopping the Tera-Term macro recorder from starting at boot.
This macro recorder is called ‘collector’ by Tera-Term.
You need to also be careful to install a version of Tera-Term which includes the SSH plug-in.
You can download Tera-Term from here.
From a Linux machine, simply typing ssh at a terminal prompt followed by the user and the hostname seperated by an ‘@’, like this:
ssh pi@raspberrypi
Will launch an SSH session and from there you can give the password and connect.
Here are instructions for using SSH from a Mac, provided by Erik Burgraf.
Mac OS includes an accessible shell called terminal.
You can find terminal by opening the finder from the dock, pressing command shift A to open the applications folder, Typing u, or UT or arrowing down to utilities and in the utilities folder, press T for terminal.
Once terminal is focused, you can press command shift T to add terminal to the dock since you may be using it frequently from now on.
press command O to open terminal.
To connect to your pie, type ssh followed by a space, then username, at sign, host name like this:
ssh pi@raspberrypi
Voiceover reads new output from the terminal automatically and should prompt you for the password. If you want to read the terminal window’s history, press control option left arrow.
Thanks for the help on this Erik.