You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

235 lines
11 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Orca, Emacspeak and Chromium Accessibility on A Raspberry Pi Running Manjaro ARM | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Tait Hoyem">
<meta name="keywords" content="orca linux raspberry-pi rpi raspberry pi screen reader screen-reader 64 bit 64-bit 64bit aarch64 emacs emacspeak manjaro manjaro-arm manjaro-aarch64">
<meta name="description" content="">
</head>
<body>
<div id="wrapper">
<header>
<h1>tait.tech</h1>
<nav>
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="/ideas/" class="nav-link" >Ideas</a>
<a href="/links/" class="nav-link" >Links</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
</nav>
</header>
<main>
<article>
<header>
<h1 class="post-title">Orca, Emacspeak and Chromium Accessibility on A Raspberry Pi Running Manjaro ARM</h1>
<time datetime="20-12-14" class="post-date">Monday, December 14 2020</time>
</header>
<hr>
<p>I wanted to get a gift for my blind friend who has been interested in learning Linux for a while now.
Just when I was about to start looking for something I decided to take a look at <a href="https://lbry.tv/@Lunduke:e/raspberry-pi-400-looks-rad:c">Brian Lundukes newest video</a> featuring the <a href="https://www.raspberrypi.org/products/raspberry-pi-400/?resellerType=home">Raspberry Pi 400</a>.
The Raspberry Pi 400 has come full circle in terms of computing.
It is a keyboard. All the computing is done from within the keyboard.
Much like the Comodore64, this computer comes without a screen but is still technically fully functional without one.
I had my Aha! moment, and decided that the Raspberry Pi 400 would be a very cool present.</p>
<h2 id="no-headphone-jack">No Headphone Jack</h2>
<p>My first problem was that the Raspberry Pi 400 does not come with a headphone jack,
even though every other Raspberry Pi A/B/B+ board with the exception of the compute modules and Zero series have included one.
That said, the Raspberry Pi audio jacks are also known to crackle and pop due to either bad drivers or cheap manufacturing.</p>
<p>To compensate, I got an external USB audio card.
I ended up going with the <a href="https://www.amazon.ca/DuKabel-ProSeries-Mic-Supported-Headphone-External/dp/B07RS11M1T/">DuKabel USB to 3.5mm Jack Adapter (Amazon)</a>.</p>
<p>There are cheaper options for sure, but when I was looking around Raspberry Pi forums and Amazon reviews, this specific model seemed to come out on top in terms of performance.
It costed me around 40 Canadian dollars.
I figure this isnt too bad considering my friend doesnt need a screen, haha!</p>
<h2 id="distribution">Distribution</h2>
<p>I wanted to choose something which will age well, and run the latest and greatest.
For visually impaired users, the most important piece of software is the screen reader. If the screen reader doesnt work, the rest of the work is toast!
Some Raspberry Pi Orca installation guides <a href="https://techesoterica.com/getting-the-orca-screen-reader-working-on-a-raspberry-pi-4-with-raspbian-buster-and-the-mate-desktop/">like this one</a>,
have actually asked the user to <em>compile Orca from source</em> to get the latest version due to how out-of-date Debians package repositories are.
A distribution which has none of these fusses was top priority,
especially because Orca receives frequent updates.</p>
<p>I decided to go with <a href="https://manjaro.org/download/#raspberry-pi-4-xfce">Manjaro ARM Xfce</a>:</p>
<ul>
<li>Xfce is lightweight.</li>
<li>Runs a 64-bit kernel.</li>
<li>Is based on Arch Linux, so receives very frequent package updates.</li>
<li>Has the AUR (<a href="#aur">with some effort</a>, as well see).</li>
</ul>
<p>The only downside of Manjaro ARM, and likewise other Aarch64 (ARM 64-bit) architecture kernels is that it did not have HEVC nor H264 hardware decoding available.
Apparently, support for the Raspberry Pis VC4 graphics is getting mainlined <a href="https://www.debugpoint.com/2020/12/linux-kernel-5-10-features/">in Linux kernel 5.10</a>.
Unfortunately, running the release candidate (RC) kernel did not make the Raspberry Pi 400 use hardware decoding.
Perhaps other applications like <code class="language-plaintext highlighter-rouge">ffmpeg</code> and Chromium need to add support as well before this works.</p>
<h2 id="orca">Orca</h2>
<p>As stated before, minimum requirement for a visually impaired desktop Linux user is a screen reader.
The most used screen reader for Linux is Orca, headed by the <a href="https://wiki.gnome.org/Projects/Orca">GNOME Project</a>.
This is relatively easy to install with a standard <code class="language-plaintext highlighter-rouge">pacman</code> command.</p>
<pre class="terminal">
# pacman -S orca
</pre>
<p>If logged in via SSH, you can start Orca with the <code class="language-plaintext highlighter-rouge">orca</code> command. This will start reading the screen to you so you can do the next parts.</p>
<p>To activate Orca on login with LightDM, enable it in the LightDM GTK+ Greeter Settings application. The Misc. tab will have a drop-down for asking which screen reader you want to use.
This will start Orca when the LightDM login system starts.</p>
<p>LightDMs Orca will not help us once we are logged in however.
To activate Orca on login, open the Session And Startup application program, then add Orca to the “startup” list of apps.</p>
<p>And now Orca will be activated on boot and login.</p>
<h2 id="aur">AUR</h2>
<p>The AUR, or the Arch User Repository has community maintained and distributed packages.
Basically, you download a file which will tell your computer how to download, build and install a package for you.</p>
<p>To get the AUR working in a more automatic way, we need to install the <code class="language-plaintext highlighter-rouge">pacaur</code> helper.
This merited its own article, so check that out here:
<a href="/2020/12/01/pacaur-rpi/">How to Install Pacaur on Manjaro ARM</a></p>
<p>The TL;DR is that we need to open the <code class="language-plaintext highlighter-rouge">/etc/makepkg.conf</code> file and replace any mention of <code class="language-plaintext highlighter-rouge">-march=armv8-a</code> with <code class="language-plaintext highlighter-rouge">-march=armv8-a+crypto</code>.</p>
<p>This can be done as a oneliner, thanks to the <code class="language-plaintext highlighter-rouge">sed</code> command.</p>
<pre class="terminal">
# sed -i 's/-march=armv8-a/-march=armv8-a+crypto/' /etc/makepkg.conf
</pre>
<h2 id="emacspeak">Emacspeak</h2>
<p><a href="https://www.gnu.org/software/emacs/">Emacs</a> is a scriptable document editor run by the <a href="https://gnu.org/">GNU Project</a>.
Infamous for its high learning curve though it may be,
there is a very extensive speech extension for it called <a href="http://emacspeak.sourceforge.net/">Emacspeak</a>.
Emacspeak is built entirely by <a href="https://tvraman.github.io/vita/resume.html">T. V. Ramen</a> and has been freely available since its inception in 1999.
Due to its age (and thus maturity), Emacspeak is an important tool in any “eyes-free” software developer toolkit.</p>
<p>Lucky for me, Emacspeak appears to not only to be available in the AUR,
but also compilable with the Aarch64 architecture—the architecture of the Raspberry Pi 400.
So this is as easy to install as:</p>
<pre class="terminal">
$ pacaur -S emacspeak
</pre>
<h2 id="web-browsers">Web Browsers</h2>
<p>Ill cover a couple web browsers here based on how they worked.</p>
<h3 id="firefox">Firefox</h3>
<p>Firefox will run in accessibility mode with <a href="https://en.wikipedia.org/wiki/Caret_navigation">caret browsing</a> enabled automatically when it detects Orca is running.
This makes Firefox <em>by far</em> the best browser for the job.</p>
<h3 id="chromium">Chromium</h3>
<p>Chromium… Ugh. So it works, sort of.
You need to enable two special flags, and add an environment variable.</p>
<p>To do this, I suggest editing the main profile in <code class="language-plaintext highlighter-rouge">/etc/profile</code>.
Add the following line to the end of that file:</p>
<pre class="file">
export ENABLE_ACCESSIBILITY=1
</pre>
<p>Next, add two flags to the <code class="language-plaintext highlighter-rouge">$HOME/.config/chromium-flags.conf</code> file.</p>
<pre class="file">
--force-renderer-accessibility
--enable-caret-browsing
</pre>
<p>You will need to relog to set the ENABLE_ACCESSIBILITY environment variable. Now Chromium should work with Orca.</p>
<h3 id="badwolf">Badwolf</h3>
<p>The <a href="https://www.mankier.com/1/badwolf">Badwolf browser</a>
is based on the WebkitGTK engine, as opposed to Firefoxs Gecko and Googles Blink engines.
It <em>almost</em> works out of the box. It is really fast compared to the other two,
but it lacks some features like announcing a page is done loading and it doesnt appear to support caret browsing,
which will cause some other problems.
Interesting though for such a young browser to have a minimal level of accessibility so early!</p>
<p>I would be interested where this goes in the future.</p>
<h2 id="ps">P.S.</h2>
<p>Somehow I forgot that you would need to setup the dummy display driver to work with the graphics without a display attached.
To do this, install the <code class="language-plaintext highlighter-rouge">xf86-video-dummy</code> pacakge:</p>
<pre class="terminal">
# pacman -S xf86-video-dummy
</pre>
<p>Next, override any <code class="language-plaintext highlighter-rouge">/etc/X11/xorg.conf</code> you may have with this:</p>
<pre class="file">
Section "Monitor"
Identifier "Monitor0"
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
# https://arachnoid.com/modelines/
# 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
EndSection
Section "Device"
Identifier "Card0"
Driver "dummy"
VideoRam 256000
EndSection
Section "Screen"
DefaultDepth 24
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection
</pre>
<p>Now, when you boot, you should head Screen reader on.</p>
<h2 id="conclusion">Conclusion</h2>
<p>It took a bit of messing around to get this working, but Im glad I did!
Now I can nerd out with another Linux friend and given how well they seem to find problems with accessibility, hopefully a few upstream patches can be made.</p>
<p>Happy hacking, for everyone!</p>
</article>
</main>
<hr>
<footer>
This page will be mirrored on <a href="https://beta.tait.tech/2020/12/14/orca-raspberry-pi-manjaro/">beta.tait.tech</a>.
</footer>
</div>
</body>
</html>