I recently got a raspberry pi 4 and wanted to access its gui because I wanted to use the pi like a note taking device. I wanted a spreadsheet, a browser with quick key navigation and a familiar interface. Yes, I could have used emacs with emacspeak which is something I am exploring but I am familiar with the Linux gui and it is an easier interface to use when coming from Microsoft Windows. As of this writing, I have been unable to get the default lxde desktop to work with Orca. I hear “screen reader on” and can indeed access some desktop elements. I suspect that the accessibility infrastructure in the lxde desktop that is bundled with the raspberry pi is incomplete but cannot be sure of this because I have not tried looking at the events that fire when I navigate screen elements.
Things are different when I use the mate desktop. Orca comes up talking and I can easily navigate screen elements.
Here are the steps I took to get orca with the mate desktop working on the raspberry pi 4. . You must have the following prerequisites in place.
- The pi should be connected to the internet. Use a wired connection else you can also use a wireless connection though that will need you to create a text file on the sd card
- A physical keyboard must be connected to the pi. You will need this keyboard to issue commands on the pi.
- An external USB sound card to avoid the crackling with the 3.5mm jack. This is not necessary any more but is good to have.
- A pair of headphones or speakers to hear speech output once you have launched Orca
I started with raspbian lite because I wanted a clean gui system to start with. However, you can as easily start with the full version of raspbian. Once I had flashed it to a sd card, placed a blank file called “ssh” without the quotes in the boot partition to enable the ssh server of the pi upon boot up, and had booted my pi, I was ready to begin the actual work of installation.
The first thing I had to do was to switch to an external sound card. This is because when I tried using the raspberry pi 4’s native 3.5mm jack for sound output, I got too much crackling. The speech was unintelligible. Please note, in the latest version of raspbian, an external soundcard is no longer necessary.
How can I use an external USB sound-card and set it as default?
Once you have implemented the steps in the above post, you are ready to move to installing the mate desktop.
The following post told me how to install the mate desktop. I have however not moved it to an external drive. Everything is on a sd card which seems to work just fine in my limited testing.
Install Mate Desktop on the Raspberry Pi using an External Hard Drive
I am going to paraphrase the above post.
You will need to run the following commands on the pi. Use ssh from your machine to do so.
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
Install the mate desktop
Many of the commands have been taken from the below post.
Steps for Configuring Mate Desktop on 4GB Raspberry Pi 4B – (Rev.7)
sudo apt install mate-desktop --no-install-recommends -y
sudo apt install mate-desktop-environment-core -y
sudo apt install mate-themes -y
sudo apt install mate-session-manager -y
sudo apt install xinit -y
sudo apt install mate-terminal -y
sudo apt install mate-applets -y
sudo apt install software-properties-gtk -y
sudo apt install xserver-xorg -y
sudo apt install lightdm -y
sudo apt install xserver-xorg-video-dummy
Setting to boot to mate
Please run the following step to select the mate desktop.
sudo update-alternatives --config x-session-manager
The above command will show you a list of desktops. You will be able to select the mate desktop from the list by using the up and down arrow keys.
Add a text editor
sudo apt install gedit
It is time to install the orca screen reader
The version of orca that comes with the package manager on Raspbian buster is very old. In addition, orca is updated almost every alternate day especially when bugs are found and enhancements are implemented.. Therefore, we will do an installation from source.
Enable any commented out sources
You need to install orca’s dependencies first. However, on my installation of raspbian buster, I had to remove the “#” from a sources line in the following file. This may change from update to update therefore check this before installing dependencies.
Install the git client by using the following command.
sudo apt-get install git
Install orca build dependencies
sudo apt-get build-dep gnome-orca
Get the orca source code
Ensure you are in your home directory or where ever else you want the source code to be. You do not need to create a separate directory for the source code because the git command will do so.
Run the following command.
git clone https://gitlab.gnome.org/GNOME/orca.git
Build and install orca
Run the below commands. Check the output of each command to ensure that there are no errors.
sudo make install
This completes the installation of Orca.
Configuring the dummy display driver
We need to configure mate to run the dummy display driver. If we do not do this, the GUI will exit with an error message stating that no screens were found. A physical display is needed. We use the ddummy display driver to get around this.
You need to edit the following file.
If the file is not there, then create a fresh file.
The file must contain the following contents.
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
Getting orca running
Launch raspi-config and set the pi to login into the text console automatically.
Reboot the pi by using the following command.
Give a minute to the pi to boot.
At this point, you should be at the shell prompt. type the following to launch the gui.
Wait for about a minute and you will hear “screen reader on”. At this point, you can begin navigating the mate desktop and setting up Orca the way you want too.
If orca does not start, then hit the left windows + alt + s keys. If that still fails, hit alt+f2, type orca and press enter.
Enabling accessibility on chromium
One of the things you would probably like to have on your pi is an accessible web browser. As of this writing, raspbian comes with the chromium web browser. You need to add a flag when launching chromium to enable accessibility. The best way to do this is to add the flag to the chromium shortcut on the pi. Take the following steps to do this.
- Navigate to the following path.
- You will see many files here. Most of them are desktop shortcuts. Edit the following file.
- For every line that starts with the word “exec” ensure you add the following flag to the end of that line.
The line should look something like the below line.
Exec=chromium-browser %U --force-renderer-accessibility
- Go through the entire file changing all the lines that start with the word “exec” as I have shown above.
- Save and close the file.
When you launch chromium, you will find that orca is able to read the contents of the page that has been loaded in chromium.
My thanks to
Vojt?ch šmiro and Sanchit Ghule