• Tip Jar

CLI Day 2016

I didn’t have much time to do anything for CLI Day this year. But, I certainly didn’t want to neglect the holiday I created, so I threw something together at the last minute.
This year being a leap year, I thought it may be of interest to show how to find out which day CLI Day falls on. CLI, or the Roman Numeral 151, is also the day the holiday is on, so most years, it would be 5/31. However, this year is a leap year, so this time it is on 5/30. So, to see which day try this command:

\date +'%j' --date="5/31"

This year, that command yields the result 152, meaning of course that CLI Day would fall on 5/30. I know it’s not much, but I’ve been struggling with getting a CLI based screen reader for my new Odroid, and CLI Day sneaked up on me. I was hoping to have compile instructions for speakup on the Odroid for this year’s CLI Day, but that just didn’t happen.
Anyway, happy CLI Day, and I can’t wait to see what everyone else comes up with, it is pretty awesome how many people participate now in the holiday I started just for fun and to push myself to learn to use the console for everything.

Command Line Word Tools

It is sometimes nice to have the ability to spellcheck, or find a definition for something right on the command line. There are several tools that can help you accomplish this. For spellchecking, I use a program called hunspell.

pacaur -S hunspell hunspell-en-us-large

hunspell-en-us-large comes from the aur, so if you don’t use pacaur or some other UR helper, you wil need to download and install it.
To use it, simply enter something like the following:

echo "neibor" | hunspell -d en_US-large
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
error: unknown encoding UTF8: using iso88591 as fallback
Hunspell 1.3.3
& neibor 1 0: neighbor

Here we see that neighbor is mispelled, but the output is a bit ugly. Plus, who want’s to type echo “blah” and pipe it through hunspell every time. Fortunately, you can write a small script, I call it spellcheck, that cuts all the extra typing out as well as cleaning up the output. Let’s see the output from the script:

spellcheck neibor
Hunspell 1.3.3
& neibor 1 0: neighbor

Much better. So, to create this script, simply add the following to ~/bin/spellcheck if you have added that to your path, or /usr/bin/spellcheck if you prefer to have it system wide.

echo "$@" | hunspell -d en_US-large 2> /dev/null
exit 0

Save the file and remember to make it executable with chmod 755 /path/to/spellcheck
Now, you can spellcheck without seriously interupting your workflow. But, what if you come across a word and you don’t know its meaning? Never fear. There’s no need to go firing up a browser and wating for some dictionary site to load so you can wade through pages of ads just to get a one-line definition. There are two command line dictionaries I like to use. First, there is dictd:

pacman -S dictd

To use, type dict and the word you want:

dict skullduggery
1 definition found

From WordNet (r) 3.0 (2006) [wn]:

n 1: verbal misrepresentation intended to take advantage of you
in some way [syn: {trickery}, {hocus-pocus}, {slickness},
{hanky panky}, {jiggery-pokery}, {skulduggery},

You may notice the result comes from something called wordnet. Which is the other dictionary program I tend to use from the CLI. It is in the UR:

pacaur -S wordnet

Usage can vary. On some distros like ubuntu, you type out the word wordnet and the word you want, whereas in arch, you type wn and the word you want. Here’s an example of usage:

wn storm -over

Overview of noun storm

The noun storm has 3 senses (first 2 from tagged texts)

1. (8) storm, violent storm -- (a violent weather condition with winds 64-72 knots (11 on the Beaufort scale) and precipitation and thunder and lightning)
2. (3) storm, tempest -- (a violent commotion or disturbance; "the storms that had characterized their relationship had died away"; "it was only a tempest in a teapot")
3. storm -- (a direct and violent assault on a stronghold)

Overview of verb storm

The verb storm has 5 senses (first 2 from tagged texts)

1. (2) ramp, rage, storm -- (behave violently, as if in state of a great anger)
2. (1) storm, force -- (take by force; "Storm the fort")
3. storm -- (rain, hail, or snow hard and be very windy, often with thunder or lightning; "If it storms, we'll need shelter")
4. storm -- (blow hard; "It was storming all night")
5. storm, surprise -- (attack by storm; attack suddenly)

Finally, you may need to solve an anagram. Or perhapse you’re one of those people who likes playing around with words. Either way, wordplay is for you. Just install it from the UR:

pacaur -S wordplay

Of course there are lots of options so you can refine what you are lookind for, but in its simplest form, wordplay looks like this:

wordplay dragon
Wordplay Version 7.22 03-20-96, 1991 by Evans A Criswell
University of Alabama in Huntsville criswell@XX.XXX.edu

Candidate word list : no
Anagram Generation : yes
Adjacent duplicates : no
Vowel-free words OK : no

Max anagram depth : 32
Maximum word length : 128
Minimum word length : 0

Word list file : "/usr/share/wordplay/words721.txt"
String to anagram : "DRAGON"

Initializing. Please wait while words are being loaded
and unnecessary words are being filtered out ...

42 words loaded (4096 byte block). Longest kept: 6 letters.

Anagrams found:

Note I Xed out the email address. I have no clue if it is still in use, but I don’t want to send anyone spam because of an article here. Armed with these powerful word tools, you should be able to do pretty much anything you need right from the CLI without bothering to open a browser. If you have any other useful tips for word related command line apps, please leave a comment. Thanks for reading.

Cheers Mate

To tell the tale of Linux desktop based accessibility is a long and daunting endever. There have been several screen readers most started and abandoned after a short time, some possibly not abandoned, in name only, and the only one to really make any headway as far as a graphical environment goes is Orca. There is good old reliable speakup of course, but it is console only. The Copernicus screen reader has been left by the wayside, in fact, I doubt many people still remember it. there is another one, or was, called LSR (Linux Screen Reader) but, as far as I know, that project is also dead.
As if that isn’t a twisted road enough, let’s take a look at the desktop environment situation. First, accessibility wise, there was Gnome. Gnome 2 was great. Accessibility chugged along at a decent rate,bugs got fixed eventually, except that thing in terminal that caused the first letter of words on a line to be dropped by Orca. It had a great, easy to use interface, and everything just worked and worked well, and except for the little hiccup caused by the Oracle Fiasco, Orca development went along at a decent pace. Of course, the Oracle travesty screwed lots of projects and it fell to the open source community to fix the mess left behind when Oracle acquired Sun. As is usally the case, the open source community did an excellent job, making new and better projects to replace the stuff destroyed in the takeover. But, I digress. All in all, Gnome 2 was great. Then, Gnome 3 came out.
I’m not going to rant about Gnome 3. Out there, somewhere, there are Gnome 3 users and developers who love the project, and out of respect for those poor souls, I will keep my opinion to myself, well for the most part anyway. Let’s just say, I like it only slightly better than Unity, which is one of the key reasons I left Ubuntu and its derivitives such as Vinux in favor of Arch. It’s really too bad about Vinux, the projecthad a lot of potential, but it is so tied to Ubuntu that accessibility seems to take a back seat to sticking with a distro that seems to become less and less accessible as time passes.
So, without Gnome, which I refuse to use in its current condition, I was in need of a desktop. There were supposed to be two of them that worked with accessibility, LXDE and XFCE. I can’t comment on LXDE, because I was never able to get it working with Orca. The closest I ever got was getting Orca to say “Welcome to Orca”. Other people had better luck with it than I did, and the accessibility was supposed to be pretty good for the most part.
I went with XFCE. It really seemed to have a lot of potential. Most of the programs that came with it work with Orca. The file manager, desktop, and panels did not read at all though. So, I went to the propper IRC channels, file the propper bugs, was told the usual “accessibility is very important to us, it will be fixed in the next release.”
The next release came and went, and nothing. I was told that it had been kind of rushed and that the accessibility stuff was definitely going to be in the next release. Well, that release came and went as well. After that one, there was really no more communication. No one answer quearies in the IRC channel, no one replied to messages on the XFCE accessibility mailing list, nothing improved with accessibility at all.
Things stayed that way for about a year, until one day a friend of mine tried the Mate desktop. For those who don’t know, Mate is a fork of Gnome 2. Apparently, there are more people than just me who refuse to use Gnome 3. We were both surprised to find that Mate was very accessible. The last we had heard, the accessibility stack had been completely removed from it. Either that was completely wrong, or sometime afterwards they put it back in. There were a couple problem areas, once again with the desktop and panels, and the propper channels were once again followed. And, unlike with previous experiences, the bugs were fixed right away.
As far as the Mate desktop itself goes, I can’t say enough good stuff about it. It’s like the good old days, the desktop is fun again. I once again enjoy using a graphical environment. Of course, I think I have become a hard core CLI user, but when I need a desktop, Mate is completely awesome.
The one thing I kind of don’t like, is if you install the mate and mate-extra packages and select the defaults, you get stuck with pulseaudio. I have disliked pulseaudio for as long as I can remember. I probably would have stuck with XFCE if there wasn’t a way around it. Fortunately, though, you can select packages 1-12, and 14-23 I think it is and it will skip the pulse dependancy. In the mate-extra packages also skip the package that pulls in pulse, and it will fall back to using gstreamer.
To install, just do the usual pacman -S mate mate-extra.
So that Orca will talk when you first open Mate and launch Orca, add this to your ~/.xinitrc

#accessibility enabled
export GTK_MODULES=gail:atk-bridge

There is a second way to do this using gsettings directly. I haven’t tried this method yet, but others say it works just as well.

gsettings set org.mate.interface accessibility true
gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true

So, in closing, if you want a great, accessible desktop that is fun to use, works well, and behaves like a desktop should instead of something that appears to have a Mac and/or tablet identity crisis, use Mate. Even the people who can see prefer mate to the other desktops, the interface is well thought out, and just plain better in pretty much every way.

A Quick Update

Over the last few months I have been getting used to my new Distro of choice, Arch Linux. It has been an excellent experience so far. I am really enjoying my new choice of graphical desktop too, XFCE. The XFCE accessibility is in pretty good shape, but new progress is kind of slow, and the accessibility list almost never responds to queries. There is a lot of potential though, and I am hoping for the best. If you follow the arch installation guide and are interested in setting up XFCE with accessibility, you will need to install the orca and speech-dispatcher packages. Remember to run spd-conf before launching speech-dispatcher for the first time. One of the really great things about Arch Linux is you aren’t forced to use pulseaudio by default. So, if you hate pulseaudio as much as I do, remember to set your sound output to alsa in the speech-dispatcher configurations. To enable accessibility, you will need to add the following line to your .xinitrc
export GTK_MODULES=gail:at-bridge
That should be enough to get you up and running, if you decide to enter the wonderful world of Arch.

Accessible Games for Linux

If you ever happen to have some of that mythical stuff known as spare time, you may be wondering if there are any accessible games for Linux. The answer is, there are several of them. There are a couple of MUD clients that work well with Orca. Gnome-mud and tintin++ are both very accessible. to get them, simply type:
sudo apt-get install tintin++
sudo apt-get install gnome-mud
in a terminal. Tintin++ is a terminal based client, so you can also use it with speakup if you have it installed. It is also a very powerful client with aliases, speed walking, triggers, scripting, and a lot more features.
There is also a package called bsdgames you can install that has text based games. The games include go-fish, adventure, and wumpus. To get it, type:
sudo apt-get install bsdgames
in a terminal.
there are more games that are accessible. They require a bit more effort to install.


AudioQuake is located at http://www.agrip.org.uk/download/. I got the Linux/x86 installer (3.2M) file. It is a script that will install everything for you, well, almost everything. To get it up and running, open a terminal and switch to the directory where the file was downloaded, usually ~/Downloads. make sure the file has permission to run with the following command:
chmod 700 AudioQuake-
then execute it with:
It will guide you through the installation of both Quake and AudioQuake. When it is finished, you still need to install a couple of things before you can play. To get the packages you need, type:
sudo apt-get install eflite libconfig-tiny-perl
Once that is done you can play the game by doing the following. in your home directory, type:
cd .zquake
At this point it is a good idea to turn off Orca because from my experience the game will not run if Orca is open. Then, type:
From this point on the game should be totally self-voicing. I have to include that I have only ever gotten AudioQuake to work on one computer. I have tried it on at least five.


SoundRTS is very fun. You can get it at http://jlpo.free.fr/soundrts/py25/. Unzip it in your home directory or on your Desktop, it doesn’t matter which. Before playing it you will need to install python2.5 and python-pygame. So, in terminal, type:
sudo apt-get install python2.5 python-pygame
then, to launch it, change to the soundrts directory:
cd soundrts
and launch with:
python2.5 soundrts.pyc
In Ubuntu 10.04 Lucid and later Python 2.5 is no longer available. You can still play SoundRTS by downloading a patch from http://jlpo.free.fr/tmp/soundrts1.0.1-python2.6.zip. Unzip the patch and move all of the contents from inside the folder to your soundrts folder. If you are asked if you would like to replace files select replace all. SoundRTS should now work just by switching to the soundrts folder and typing:
python soundrts.pyc
The patch makes the latest stable version of SoundRTS work. You can get the latest version from http://jlpo.free.fr/soundrts/soundrts-1.0.1-en.zip
If you would like to add a launcher to your desktop, you can do so with the following script. Open your favourite text editor and copy the following lines:
cd soundrts
python2.5 soundrts.pyc
exit 0
Save the file as ./soundrts.sh in your home directory. If you put your soundrts directory somewhere else other than your home folder, be sure you change the path in the script to match the location. For example, if your folder is on your desktop, it would be:
cd Desktop/soundrts
Make the script executable with the command:
chmod 700 .soundrts.sh
Then, on your desktop, press control+f10 and choose create launcher. In the name, type SoundRTS then press tab to get to the command field. In the command box type:
Tab to the OK button and press enter. You can now start the game by pressing enter on the SoundRTS launcher on your desktop.
If you used the patch you need to replace python2.5 with python.
If you get the very latest alpha versions of SoundRTS they include several different python folders to insure it will work in your version of python. If, for example, you need python2.6 simply navigate to the SoundRTS directory, enter the python26 directory, press control+a to select all, press control+c to copy, press backspace to go back a directory to SoundRTS, then press control+v to paste. when you are asked if you would like to replace files select "replace all".
The game is completely self-voicing. You do not need to turn off Orca before starting this one, it works fine even if Orca is running.

RS Games Client

This game client gives you access to the web based games developed by RS Games. So far the games you can play with it are Monopoly and Uno but more will be added as they are completed.
To install the game client, download it from http://zanosoft.net/rsgames/ccount/click.php?id=18 and extract it to your home directory or where ever you would like. When you unzip the file the extracted directory is called src. You can rename it to RSG-Client or something similar. Before running the game you will need to install a few packages. To get them open terminal and type:

sudo apt-get install python-wxversion python-wxtools wx2.8-i18n

As the client has evolved, additional package requirements have been added. I no longer use Ubuntu or any of its derivatives, so I am unsure what the packages are called there. Here is a list of packages that are required in Arch:

  • python2-speechd
  • wxpython
  • wxgtk2.8
  • python2-crypto
  • python2-configobj
  • python2-faulthandler

The game is available for Arch users in the AUR.
If you would like to create a launcher to the game client place focus on the desktop and press control+f10. Select "Create Launcher" from the menu and give the launcher a name. In the command type the path to rsg.pyc. Assuming you used the name RSG-Cliet in your home folder the command would be something like this. Remember to replace USER with your home directory:
python /home/USER/RSG-Client/rsg.pyc
You can now use the shortcut on your desktop to launch the RS Games client. For updates and general information you can follow rs_games on Twitter. Orca can be left running while you play the game.

Tomb Hunter I – Mysteries of the Ancients

In this game by USA Games Interactive Angela Carter, an explorer, and world renown archeologist, has discovered a scroll that will lead her to the Orb of Wisdom. She can’t just walk in and take it though because it is very well guarded. To set up the game open terminal and type:
sudo apt-get install libsoil1
wget http://www.usagamesinteractive.com/downloads/requirements/libsfml-1.6-i386.tar.gz
If you are using a 64 bit system the link in the command above should be changed to:
Then, after the download has completed:
tar xzvf libsfml-1.6-i386.tar.gz
cd libsfml-1.6-i386
sudo dpkg -i libsfml-system1.6_1.6_i386.deb libsfml-window1.6_1.6_i386.deb libsfml-audio1.6_1.6_i386.deb libsfml-graphics1.6_1.6_i386.deb libsfml-network1.6_1.6_i386.deb
After the packages have installed switch back to your home directory by typing:
Now, to download the game itself:
wget http://www.usagamesinteractive.com/downloads/usa-games/MOTA-Standard-Beta15.tar.gz
When the download is finished type:
tar xzvf MOTA-Standard-Beta15.tar.gz
To launch the game:
cd MOTA-Standard-Beta15/
To create a desktop shortcut, when focus is on the desktop press control+f10 and select "create launcher". Type the name in the name field, and press tab. In this box type:
Tab to ok and press enter. Remember to replace the word USER in the line above with your home directory. Now you can launch the game with the shortcut. For more information visit the USA Games Interactive website.

Installing Speakup in Ubuntu

I was told that speakup isn’t as difficult to install any more because you don’t have to recompile the kernel any more, So, I thought I would give it a go. It took a few minutes, but over all, it was very easy to get it up and running. If you too would like to install speakup, here are the instructions. Thanks goes to Paul Hunt for helping with the instructions. This was done an a Dell Studio 1536 running Ubuntu Intrepid.
First, we need to install the git-core package. In a terminal, type:
sudo apt-get install git-core
After that package is installed, get the speakup packages with this command:
git clone http://www.linux-speakup.org/speakup.git
This one takes a while, so play a game or something, but keep checking back on it. It will finish eventually. After that happens, it is time to compile and install. To do this, type:
cd speakup/src
sudo make modules_install
After the above three commands have completed, you need to move some files around because they aren’t installed in the right place. Enter the following commands:
cd /lib/modules/`uname -r`/extra/speakup
sudo cp * ..
Once that has been done, activate by typing:
sudo depmod -a
Now everything should be ready. So to start the module, type:
sudo modprobe speakup_soft start=1
So that you don’t have to type the above line every time your computer is restarted, do the following:
sudo vi /etc/modules
This will open the vim text editor. Press the escape key to make sure you are in command mode. Use down arrow to move to the bottom of the file. Once there, press shift A to get in to append mode. Type the following line exactly as it is here:
speakup_soft start=1
Press the escape key to get back in to command mode. Then type the following to save and exit vim:
Once you press enter the file will be saved. To get espeak working with speakup, do the following:
cd ~/speakup/contrib
unzip espeakup with the following:
bunzip2 espeakup-0.60.tar.bz2
tar xvf espeakup-0.60.tar
then install:
sudo make install
Launch it with:
sudo espeakup –default-voice voice name
So, for US English, the command would be:
sudo espeakup –default-voice en-us
You can add espeakup to /etc/init.d/rc.local, so you won’t need to launch espeakup every time your system is restarted. Place the line at the very end of the file.
You can not use speakup with plain old gnome-terminal. You need to open a text console. You can do this with control+alt+f1 through f6. You can get back to your normal desktop with control+alt+f7. when you bring up the text console you will need to log in with your user name and password. You can read the speakup manual in the ~/speakup/doc directory. For those of us who don’t like using key echo, you can disable it. You need to be root to make this change, so type:
sudo su – root
then, to disable it, type:
echo 0 > /sys/module/speakup/parameters/key_echo
after that is done, type exit to logout from the root account. To do this automatically, add it to /etc/init.d/rc.local. There are other parameters you can change as well such as volume and rate. In the above command change the number 0 to 9 and key_echo to rate to set the voice rate.
echo 9 > /sys/module/speakup/parameters/rate
That’s about it, have fun. Remember, when you find a setting you like, just add it in to the end of /etc/init.d/rc.local to make it happen at startup.

Keyboard Shortcuts

Sometimes in Ubuntu, you will want to create global keyboard shortcuts that aren’t possible in the keyboard preferences in the system menu. There are a couple of ways to do this, but probably the easiest is a program called xbindkeys. To get it, open terminal and type:
sudo apt-get install xbindkeys xbindkeys-config
If you are using Orca, the screen reader, you don’t need to get xbindkeys-config because Orca doesn’t work with it.
The first thing to do after the program is installed is type:
xbindkeys –defaults > ~/.xbindkeysrc
This basically creates the initial settings for xbindkeys in the file called .xbindkeysrc
After that is done, type:
this command starts the xbindkeys daemon. In order to have it start at login, go to system, preferences, session. On the additional programs tab click add then type xbindkeys in both the name and command boxes. Click add then click close and it will start automatically on login.
To create a keyboard shortcut, you can launch the gui, called xbindkeys-config, by pressing alt-f2 to open the run dialog and type:
For Orca user, the process is a bit different. Because xbindkeys-config doesn’t work with Orca, you will need to open the .xbindkeysrc file and edit it directly. To do this, in your home directory, type:
gedit .xbindkeysrc
This will open the file in text editor. Once that is done, use the control-end keys to quickly navigate to the bottom of the file. Move up 3 lines. The bottom 3 lines are basically just a fancy ending for the file. On a blank line above the three bottom lines, you can type in your keyboard shortcut. This consists of two lines. The first is the command you want the keyboard shortcut to execute. To launch orca, for example, you would type the word orca surrounded by quotes:
On the second line comes the actual shortcut. In our example, we shall use control plus alt plus o as the shortcut. So, to put it altogether:
control+alt + o
Press control-s to save the file and close gedit. Now, control-alt-o will launch orca. This can be done for any program you choose. It works on Kubuntu, Ubuntu, and Xubuntu.

  • Tip Jar