Webster’s Revised Unabridged Dictionary (1913) on StarDict on Ubuntu/Debian

So, after reading “You’re probably using the wrong dictionary,” I thought I would give installing Webster’s Revised Unabridged Dictionary (1913) on a Debian-flavor of Linux a try and write it up the process and some observations of its use.

Installation on a Debian-flavor of Linux is straight-forward:

$ sudo apt-get install stardict
$ cd Downloads
$ wget https://s3.amazonaws.com/jsomers/dictionary.zip
$ unzip dictionary.zip
$ cd dictionary
$ tar -xvjf stardict-dictd-web1913-2.4.2.tar.bz2
$ cd stardict-dictd-web1913-2.4.2/
$ sudo mv *.* /usr/share/stardict/dic/
$ stardict

This launches the main application. There is also a mini-window that can be moved to where you like and then you can use it with other applications by highlighting text. Here’s a screenshot of this article:

When you highlight a word, it will automatically be searched for and displayed in the mini-window.

Entries include pronunciation, etymological origin, related words, definition and an example of usage, often from literature. I can imagine this being a very useful tool. It might be worth checking if my writing from this date changes in an appreciable way and whether it is an improvement or not.

Politeness is Two-Faced

Note: This is an one-sheet explainer for myself. I have never encountered politeness theory before this week. I wanted to do a quick one page review of the concepts from Wikipedia and a quick web search, then put together a short one-page summary. This summary can serve as a reminder for understanding what politeness theory entails without going through the whole Wikipedia page, which badly needs editing for readability.


Politeness theory holds that politeness is universal. We present a “face” to others in a particular social context that represents how we wish to be perceived in that context.

Face has two aspects, positive and negative. Positive face is the desire to appear competent, to be accepted and to have value to others. It means that one’s self-image is in alignment with the perspective of other individuals and one’s social group(s). Negative face is the desire for autonomy and often involves the maintenance of the status quo.

Attacks on Face From Others & Our Response

Attacks on our negative face from others include: orders, requests, offers, suggestions, advice, remindings, threats, warnings, compliments, promises, and expressions of envy, admiration, anger, hatred, or other strong negative emotion toward someone. We damage our own negative face when we: express thanks, accept a thank you or apology, offer excuses, accept an offer, respond to a violation of social etiquette, or commit to doing something we don’t want to do.

Attacks on our positive face from others include: expressions of disapproval, excessively emotional expressions, belittling, discussing topics that inform identity (e.g., politics, sex, religion), interrupting, non sequiturs and misreading the face of others (e.g., calling a trans-man a “she”). We damage our own positive face when we: apologize, accept a compliment, are unable to control our physical or emotional selves, engage in self-humiliation, or confess.

Politeness Strategies

There are four politeness strategies: bald on-record, positive politeness, negative politeness, and off-record. Bald on-record is for close relationships and does not account for face at all. Positive politeness attempts to make the person feel like they belong. Negative politeness attempts to not impose on other people. Off-record is an indirect communication that relies on the awareness of the other person to read in between the lines and understand what is being communicated.

Specific Examples

Leadership: If someone tries to becomes a leader of a group. It is changing their positive face from being a member of a group to being its leader. If there is a current leader of the group, this is an attack on the current leader’s positive and negative face. It is also an attack on the negative face of other members of the group because it is changing the status quo and putting them into a position of making a choice, where they might not wish to make this choice.

Proselytizing: When we try to convert others to our point of view, we are violating both their positive and negative face. It violates the positive face because it is not accepting the face that they are presenting. It violates negative face because someone else is trying to impose their viewpoints and change other people’s minds.


Erving Goffman. Interaction Ritual: Essays on Face-to-Face Behavior. New York: Doubleday, 1967.

Penelope Brown and Stephen C. Levinson. Politeness: Some Universals in Language Usage. Cambridge: Cambridge University Press, 1987.

The Minto Pyramid Principle for Writing

Barbara Minto‘s “The Minto Pyramid Principle” is a how-to guide for writing concise reports in a management consulting firm that has been around for years. I wrote a one sheet summary of her book over a decade ago that I still sometimes find to be a useful aid for writing. While it might be overkill for most writing we do, it is still a useful reference.

First Things First, Subject/Predicate

  1. What is the subject you are writing about?
  2. What is the question you are answering in the reader’s mind about the subject?
  3. What is the answer?

Make It a Story

  1. What is a situation where the Subject/Predicate can be illustrated?
  2. What problems complicate the situation?
  3. Do the question and answer still follow?

Find The Key Line or Take-Away

  1. What new question is raised by the answer?
  2. Will you answer it, inductively or deductively?
  3. If you answer inductively, what is your plural noun?

Always Do

  1. Dramatize the main idea using imagery.
  2. Imagine a doer – for analysis and writing.
  3. List all the points you want to make, then find relationships.


  1. Ideas at any level must always be summaries of the ideas below.
  2. Ideas in each grouping must always be the same kind of idea.
  3. Ideas in each grouping must always be logically ordered.

For Beginners

  1. Always try top down first.
  2. Use the Situation for thinking through the introduction.
  3. Don’t omit to think through the introduction.
  4. Always put historical chronology in the introduction.
  5. Limit the introduction to what the reader will agree is true.
  6. Be sure to support all key line points.

Initial Questions

  1. What is the problem?
  2. Where does it lie?
  3. Why does it exist?
  4. What could we do about it?
  5. What should we do about it?


  1. Introductions are meant to remind not inform.
  2. They should contain the three story elements.
  3. Length of introduction depends on reader and subject.


  1. Never use only one element for a heading.
  2. Show parallel ideas in parallel form.
  3. Limit to the essence of thought.
  4. Don’t regard headings as part of the text
  5. Introduce each group of headings.
  6. Don’t overdo.

Critical Focus

  1. Question the order in a grouping – time, structure, or ranking.
  2. Question source(s) used in the problem solving process.
  3. Question the summary statement.
  4. Question your expression.

Structures for Evaluation

  1. Financial structure – consider strictly financial issues.
  2. Task structure – focus on how work gets done.
  3. Activity structure – focus on what needs to happen to create problem.
  4. Choice structure – bifurcate choices.
  5. Sequential structure – combination choice and activity structure.

Installing LineageOS on a Samsung Device

Updated: December 2020 after updating two Samsung S5 Qualcomm devices to LineageOS 17.1 or Android 10.

LineageOS is an alternative operating system for your phone. It’s what stock Android looks like, i.e., it doesn’t have the unnecessary software from device manufacturers and phone carriers. Installing it is also an interesting exercise in how taking more control of technology often means taking more responsibility and risk.

Note: Installing alternative operating systems like LineageOS on your phone is a great way to learn more about how your phone works. You are going to make mistakes. You may brick your phone. But, most problems can be fixed. If you are interested in attempting it, use an outdated phone you already have on the LineageOS device list or get one from eBay to learn on (A Samsung S5 can be purchased for <$60). In the beginning, it’s best not to attempt installing LineageOS on a device that is important to you until you know what you are doing.

Installing LineageOS on your phone is relatively painless. It requires two steps. First, install either a custom recovery or TWRP into the RECOVERY partition using flashing software, i.e., Heimdall or Odin. Second, install LineageOS and then OpenGAPPS as described on the LineageOS website for your device.

It sounds difficult. But, it’s pretty straight-forward. The most important step? Make sure you are installing the right files for your device.

Note: If you are on Windows, Odin sounds easier to use than Heimdall. I didn’t use it, so I do not know if this is true. It is also software with unclear origins. User beware!

Download required software

There are two choices for recovery software: custom recovery and TWRP. To illustrate, here is the link to the Samsung S5 custom recovery and TWRP files. Notice that the device code name is the same for each. I recommend installing custom recovery to start.[1]

First, select your device from the left side of the LineageOS build downloads page. Then download the custom recovery and LineageOS (most recent nightly for the device).

Second, if you want Google’s suite of software to work, such as Maps, you’ll need OpenGAPPS. Select the appropriate architecture listed in your devices’ information page, e.g., ARM is listed as the architecture for a S5 device. Select the same version of Android as the LineageOS build you downloaded, e.g., Lineage 17.1 is equivalent to Android 10. Then, select how much of Google’s software you want, e.g., pico is the minimum for most of Google’s software to work as expected.

Take a look at the installation instructions. If you are installing from recovery, then transfer the LineageOS and OpenGAPPS files to the SD Card on your phone. If sideloading, then put them in whatever directory makes sense, e.g., just leave them in the Downloads folder.

Enable developer mode

Enable developer mode for your device (in my case, going to Settings, About Device, and tapping on Build Number 7 times) then select USB Debugging in developer options. You will then be able to connect your phone to your computer, agree to connect on your phone and use any file utility to transfer files to your phone. USB Debugging needs to be enabled to flash the custom recovery or TWRP.

Install Heimdall

Install Heimdall: Try an apt-get install.

$ sudo apt-get install heimdall-flash

Then, check your version. Update: As of February 2020, Ubuntu installs v.1.4.2, which works as intended.

$ heimdall version

If you get v.1.4.1 (or if you cannot get Heimdall to work), try compiling from source. Previously, I could only got it to work by installing from source. Now, the repository files from Ubuntu work normally.

Install Heimdall from source (if necessary)

$ sudo apt-get install build-essential cmake zlib1g-dev qt5-default libusb-1.0-0-dev libgl1-mesa-glx libgl1-mesa-dev 
$ mkdir ~/bin
$ cd bin
$ git clone https://gitlab.com/Benjamin-Dobell/Heimdall
$ mkdir -p Heimdall/build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
$ sudo cp bin/* /usr/local/bin 

If this doesn’t work or you don’t use linux, official instructions for your operating system can be found at the Heimdall site.

Install custom recovery

$ heimdall-frontend

Turn off your device. Boot into download mode, on my device (SAMSUNG) download mode was started by holding down Volume Down, Home and Power. Then connect to your computer using the USB cable.

  1. Go to Utilities tab in the Heimdall frontend.
  2. Detect Device.
  3. You will see Download PIT, which stands for Partitions Information Tables. Go to Save As, indicate a location on your computer, then click Download.
  4. Go to Flash tab.
  5. In PIT category, click Browse and select PIT file you downloaded from device in step 3.
  6. Click Add button.
  7. For partition name select where you want to flash it. BE CAREFUL! If you flash it on wrong partition you can perma-brick device. For most devices, the recovery partition is RECOVERY.
  8. Go Browse for file and select lineage-[version]-[date]-recovery-[device-name].img file you downloaded in step 1. In Session, check No Reboot.
  9. Click Start.
  10. When complete, disconnect device from the USB cable, pull the battery and immediately restart into recovery. On my device, you can boot into recovery by holding down Volume Up, Home and Power. If you don’t, your phone will likely write over the TWRP file you have flashed, and it will look like nothing has happened.

Install LineageOS

From here, it was straight-forward per the instructions on the LineageOS Installation Instructions for my device.

  1. Boot into recovery. On my S5 device, download mode was started by holding down Volume Up, Home and Power
  2. Wipe the Cache, System and Data partitions.
  3. Install or sideload LineageOS.zip first, then OpenGAPPS.zip second – using the installation instructions for your device at the LineageOS site.

Different devices use different instructions, such as install from within recovery or sideloading the software. For a Samsung Note 4, the instructions suggested LineageOS and OpenGAPPS could be installed from an sdcard after TWRP/custom recovery was installed. The Samsung S5 instructions suggested sideloading the operating system using adb. Your best bet is to follow the official instructions, but I was able to do it either way with a S5 device.

When done, custom recovery will ask if you want to reboot. If you sideloaded the software, you’ll need to restart your device manually, e.g., by pulling the battery.

That’s it. Good luck!

[1] The difference between custom recovery and TWRP is that custom recovery is more tightly integrated with LineageOS but it has fewer features, specifically it doesn’t allow you to back up your phone. TWRP does allow you to back up your phone. However, it doesn’t always do the system update properly, and it tries to install the TWRP app, which requires root, when you reboot from recovery. There are tradeoffs to each choice, but if you doing this for the first time, use custom recovery. You can always go through the install recovery process and try either later. In fact, I recommend trying both. The correct TWRP file ends in *.img.

Mutt on OpenBSD & Linux: configuring gpg/gpg2 & ~/.muttrc

Update: August 2019. In August 2017, I wrote this post to document my process for getting gpg2 working on OpenBSD 6.1 after not finding a straight-forward explanation online. In the two years since, I have used these notes to set up mutt on both OpenBSD and several varieties of Linux, such as Debian derivatives, Arch and others. With a little work, I have managed to get mutt working on each of these systems.

In the update, I went through through and cleaned up the post a bit for clarity and fixed some formatting now that WordPress has better options for including code. If you are trying to get gpg/gpg2 working with mutt, hopefully, this will help you too. If you find errors, please feel free to comment below and I’ll try to fix them.

Install mutt and gnupg

[OpenBSD] # pkg_add -i mutt gnupg 

A series of options will display. Pick the current version of mutt-1.8.0v3-gpgme-sasl and gnupg-2.1.15p2.

[Ubuntu/Debian] # sudo apt-get install mutt gnupg

Change to the relevant package manager equivalent if you don’t use apt. You may also need to add cyrus-sasl to your package manager on linuxes without it baked in.

Copy gpg.conf to your home directory

[OpenBSD] $ cp /usr/local/share/gnupg/options.skel ~/.gnupg/gpg.conf
[Ubuntu/Debian]$ cp /usr/share/doc/mutt/examples/gpg.rc ~/.gnupg/gpg.conf

On Ubuntu/Debian, this step might not be necessary. If using gpg2, you’ll need to substitute gpg2 for all the gpg commands in the config file should you need it.

Add text to gpg.conf

# Enable gpg-agent
 pinentry-mode loopback

This step seemed required on OpenBSD. On many varieties of Linux, it does not seem to matter. I’d guess gnome has something that automagically handles this in the background.

Start the gpg-connect-agent daemon

$ gpg-connect-agent

On some linux distros, this step may already be taken care of for you.

Import your secret and public gpg keys

$ gpg2 --decrypt file.sec.gpg | gpg2 --import --batch

If you don’t have gpg keys yet, check out man for gpg or the Ubuntu privacy documentation for details about doing it.

Check your gpg keyring

$ gpg2 -K

Important step. It’s very easy during the import process to type in a key, password, or command wrong and not import your secret keys. I ended up troubleshooting my mutt configuration for a couple of hours before I figured out it wasn’t working because I didn’t have my gpg keys on my keyring. Save yourself this trouble and check.

Create a text file with your email password

set imap_pass = "yourpassword"
set smtp_pass = "yourpassword"

Save this file to ~/.gnupg/email-password.gpg

Encrypt your email-password.gpg file

$ gpg2 --encrypt /home/cafebedouin/.gnupg/email-password.gpg

Add a .mailcap configuration file for HTML email in Mutt

Put the following in your ~/.mailcap file or create one if it doesn’t exist. Install lynx or another text browser of your choice. If different, change lynx to the alternative in the text below.

text/html;  /usr/bin/firefox %s >/dev/null 2>&1; needsterminal
text/html;  lynx %s; copiousoutput; nametemplate=%s.html

Create a ~/.muttrc configuration file

# .muttrc                                                                      
# GPG                                                                          
# gpg.rc is unnecessary on some systems.                            
# On OpenBSD, you're probably going to need it.                              
# OpenBSD: /usr/local/share/examples/mutt/gpg.rc                               
# source ~/.mutt/gpg.rc                                                        

set pgp_use_gpg_agent = yes                                                    
set pgp_sign_as = 0O0ABCDZ  # replace with your key                            
set pgp_timeout = 7200                                                         
set crypt_autosign = no                                                        
set crypt_replyencrypt = no 

# password: tell mutt where to find your encrypted
# password, depending on what you installed, you 
# may need to change initial command to gpg
source "gpg2 -dq ~/.mutt/email-password.gpg |"                       
# mailbox configuration                                                        
set imap_user           = login@example.net                                    
# Only need the example.net if your root email address is different from server, otherwise just use your login                     
set folder              = imaps://login@example.net@example.com:993            
set spoolfile           = imaps://login@example.net@example.com/INBOX               
set smtp_url            = smtp://login@example.net@example.com:587                  
set postponed           = +Drafts                                              
set record              = +Sent                                                
set trash               = +Trash 
mailboxes               = +INBOX                                               
set hostname            = example.net                                          
set from                = login@example.net                                    
# mutt configuration                                                           
set ssl_starttls        = yes                                                  
set use_from            = yes                                                  
set postpone            = ask-yes                                              
set delete              = ask-yes                                              
set editor              = "emacs -nw" # or vi               
set pager               = lynx                                          
set charset             = "utf-8"                                              
set visual              = "emacs"                                              
set signature           = ~/.mutt/sig.txt
set alias_file          = ~/.mutt/aliases                                      
set mailcap_path        = ~/.mailcap                                           
set fcc_clear                                                                  
set noconfirmappend                                                            
set hidden_host                                                                
auto_view text/html             # auto render html to text                     
alternative_order text/plain text/enriched text/html    # read html last       
# Reduce polling frequency to a sane level                                     
set mail_check=60                                                              
# keep a cache of headers for faster loading (1.5.9+?)                         
set header_cache=~/.hcache                                                     
set edit_headers=yes                                                           
# Display download progress every 10K                                          
set net_inc=10 

The line to decrypt your password activates the gpg-connect-agent daemon and will not ask for you to enter it again for the duration of pgp_timeout specified in the file.

This should get you to a working set-up to read and write email. If you are having trouble logging in, double check your encrypted password file, particularly if your password requires escaping special characters.

Good luck!