Skip to main content

Sysadmin, interested in new technologies, communications, multimedia, accessibility, better Linux than Windows, better Android than IOS and similar.

pvagner

pvdeejay

mastodon.sk/@pvagner

Peter Vágner

Emacs A11y Tip #3: Emacs with speechd-el running on Termux for Android

5 min read

After a long while I am here with another post in my collection of .
This time I am not going to talk about emacs environment with speech as provided by speechd-el, I will try to describe how I have managed to get a lot from emacs on the go while running it on Termux for Android.
My reasoning behind this setup is that Emacs can be run on pretty much any computing device. I have used to carry a RPI 2 with me to have access to basic linux CLI tools and emacs. Now I believe using my phone with external keyboard connected will serve this purpose even better. Additionally after a bit of learning now I can use emacs even with braille touch keyboard as provided by the Corvus access solution for android as it can emulate ctrl and alt keys. Emacs letter based keyboard shortcuts and braille keyboard are perfect fit together.
There appear to be multiple ways on how to run emacs on Android. Up to now I was not aware of a single setup where I can also have speechd-el and its dependencies working on Android in a way so I can make some good use out of it.

I know the title of this article has a lot of things mixed together so before I'll describe the setup I'll at least link to more details about all these things I have mentioned so far.

Android is an operating system that powers your mobile phone or tablet.
Termux is an awesome app for Android that includes powerfull partially accessible terminal emulator and features repository of traditional command line apps similar to most linux distributions. As of this writing termux is returning to google play it can be installed easily again and for running emacs it's more than capable enough.

So here are the steps:

  • Install Termux either from F-Droid or from Google play.
  • Launch termux and use it directly on your device with Talkback running at least to pass this initial setup.
    On first launch termux will show its terminal view and enable the keyboard. While typing on the keyboard keys are directly passed to the app running in the terminal. You can dismiss the keyboard by pressing the device back button and review the terminal view content with your screen reader. You can double tap the terminal view to get the keyboard back if the app running is not consuming the double tap as a click (emacs does this for example). Termux also has an app drawer you can reach by pressing the back button of your device when the keyboard is closed or you can swipe two fingers from the left hand side if screen reader is running (single finger when it's not). On the drawer there is a list of terminal sessions and two unlabelled buttons. First one shows the keyboard, when long pressing it displays extra row of buttons that complement the keyboard such as ctrl key, alt key, arrow keys and similar. These extra buttons are displayed on the bottom part of the screen inside a view pager. Swiping the buttons to the left switches to the second page with the text input view that can be used with all the android keyboard and accessibility specific review capabilities while typing. While emacs is not running on the device I like to type in commands into this input entry field. When this text entry field is empty pressing the enter key also sends the enter key into the terminal view.
    Also don't forget to read termux documentation where it's talking about the touch keyboard and even the hardware keyboard if you have one.
  • Allow termux to read and write to storage by running
    termux-setup-storage
  • Then install ssh daemon on Termux by running these commands into the terminal one after the other paying attention to the output
    pkg update
    pkg upgrade
    pkg install openssh
  • In order to be able to login to Termux via SSH, you need to prepare a private / public key pair on your PC by running ssh-keygen, then transfer public key to termux saving it into ~/.ssh/authorized_keys. See more about running sshd on termux at the Termux wiki.
  • Start ssh daemon on Termux just by running
    sshd
  • If you like you can execute the following steps inside an SSH session from your PC. You can connect to termux via SSH like this
    ssh user@<deviceIP> -p 8022
  • Install speech-dispatcher and emacs along with its dependencies such as needed termux specific packages and espeak
    pkg install speechd emacs
  • Clone speechd-el git repository where emacs can load it
    git clone https://github.com/brailcom/speechd-el.git $HOME/../usr/share/emacs/site-lisp/
  • Test if speech-dispatcher is working by launching
    spd-say "Hello world"
  • If you can hear espeak saying hello world it's all working fine.
  • Now make a symlink so speechd-el can find speech-dispatcher unix socked with no other configuration changes.
    cd && ln -s .cache/speech-dispatcher .speech-dispatcher
  • Configure emacs to start speechd-el by writing this content into the .emacs file for example by using nano a text editor bundled with termux.
    nano $HOME/.emacs
  • Put this content into the file
    (setq speechd-out-active-drivers '(ssip ))
    (autoload 'speechd-speak
    "speechd-speak" nil t)
    (speechd-speak)
  • Finally launch emacs by simply typing in
    emacs

Refer to other to find out more.

 

Peter Vágner

Peter Vágner

I finally figured out what prevented me opening TV channels in VLC on windows. Under Configuration -> General ... change authentication type to both plain and digest. On linux this has never been an issue.

Peter Vágner

I've installed to serve my music collection last night.
Initially it looks simple and straight forward. I can use both its web UI and the dedicated app called . There is a addon so I'll be testing that soon as well.

Peter Vágner

Yeah! Link to this site I update irregularly with my feelings is featured at blindrevue.sk. Thank you guys for counting me in!

Peter Vágner

Peter Vágner

Awesome explanation and a command line example of transcoding analog video to webm on linux with . Tip to a linux friendly capture device is great too!

Peter Vágner

Chromium is getting #Accessibility support on linux

2 min read

Update: More up to date snapshot than chromium-snapshot-bin 80 is now available. Make sure you are running the latest snapshot for testing and reporting bugs.

 

Accessibility support with Chromium on linux is a thing that developers are working very hard on this year and it turns out it’s getting better and better all the time. I’d say now it’s very usable already. Joan Marie has written a wiki article explaining its current state. I’ve expressed that it looks to be awesome, feels snappy.

Now I’ll add a few simple steps explaining how to install the latest chromium snapshot and enable its built-in accessibility support on Arch linux and other linux distros based off of it.

  • All the commands you are executing should be executed as a normal user i.e. not root. Those that require super user privileges are starting with sudo.

  • Download and install chromium-snapshot-bin package from the AUR

    wget https://aur.archlinux.org/cgit/aur.git/snapshot/chromium-snapshot-bin.tar.gz
    tar xvzf chromium-snapshot-bin.tar.gz
    cd chromium-snapshot-bin
    makepkg -s
  • Now pay attention what package version this will end up building for example as of today it’s chromium-snapshot-bin-80.0.3970.0.r716024-1-x86_64.pkg.tar.xz.

  • Install the package like this

    sudo pacman -U chromium-snapshot-bin-80.0.3970.0.r716024-1-x86_64.pkg.tar.xz 
  • Now set a required variable named ACCESSIBILITY_ENABLED to 1 and write it to your desktop session profile

    sudo bash -c 'echo "export ACCESSIBILITY_ENABLED=1" > /etc/profile.d/chromium-accessibility.sh'
  • Now Write suggested chromium command line flags to the config file wrapper script responsible for launching chromium is looking for

    echo "--force-renderer-accessibility --enable-caret-browsing " > ~/.config/chromium-flags.conf
  • Now relogin to your desktop session, launch chromium whatewer way you prefer and you should enjoy its accessibility support with orca.

Peter Vágner

This is amazing although I must say I nevertheless would like to try it out one day.

Peter Vágner

an awesome editor for has got some love in version 2.2.1 get it from github, googleplay and soon. https://github.com/gsantner/markor