Tech Veganism

“One place where the veganism metaphor breaks down is that, although nearly anyone can be a vegan, tech veganism is mostly practiced by those who are expert enough or privileged enough to learn the elaborate workarounds to avoid the GAFAMs of the world. Setting up an Ubuntu laptop, a LineageOS phone, a Fastmail account, and wiring it all together so that you actually get calendar notifications is no easy feat. You will probably have to get your hands dirty on the command line.

I find that there’s a bit of a ‘let them eat cake’ attitude among tech vegan boosters, because they often discount the sheer difficulty of all this stuff. (‘Let them use Linux’ could be a fitting refrain.) After all, they figured it out, so why can’t you? What, doesn’t everyone have a computer science degree and six years experience as a sysadmin?”

-Nolan Lawson, “Tech Veganism.” nolanlawson.com. May 31, 2019.

Reposting my comment here:

The point that a lot of people miss is that there are two tech revolutions going on.

On one end, there’s the application, end-user technology that is designed to fit some specific need and be easy to use. Ideally, it’s just tapping buttons on a screen.

These tend to follow direct physical analogs of specific, single purpose tools: Search/Keep replaces the file cabinet, Maps replaces maps, YouTube is mobile television, Play is mobile board games, News replaces the newspaper, Gmail is mail, Contacts replaces the Rolodex, Drive replaces the suitcase, calendar replaces the Day Planner, Translate replaces the foreign language phrase book, Photos replaces the photo album, etc.

They do one thing. They do it well. They are useful. And they are all being combined in one device. But, they aren’t the standard by which every tool needs to be judged.

Some tools are general tools that can be applied to a wide variety of problems. Any idiot can pick up an arc welder or write a Python script. But, it takes time to learn how to use these general purpose tools well. They’re never going to be easy in the way that using email is easy. And there is no need to use Python or an arc welder on your phone.

Should TeX be compared to Word? It’s apples and oranges. How much does that Venn diagram overlap, regardless of definition?

Emacs is as different from a word processor as a word processor is from the legal pad. There’s inherent capability that doesn’t reduce down to the level of a pull-down menu or button. As soon as you make ease of use the defining feature, you narrow down capability to what a pull down menu can handle.

Most people aren’t solving problems that require training A.I.s, collaboratively writing programs with a tool like Git, making CGI movies with Renderman, etc. So, they have no need to learn these tools, and these tools do not need to simplified to suit them. They are what they are. OpenBSD is about security, not being “user-friendly” to the novice user. If you want “user-friendly,” use what everyone else uses.

“Tech vegans,” as you describe them, have different needs and different values. Some day, it would be nice if a LineageOS device were available at your telephone carrier’s store, Google didn’t mess with ad blocking extensions in their browser to make more money, and so forth. But, the incentives are what they are. Opting out of the default is hard by design. That’s not only a technology problem. It’s also an economic one.

OpenBSD’s Guide to Netiquette

The OpenBSD’s mailing list page netiquette section is excellent. It is a distillation of how to communicate online, i.e.:

  • Plain text, 72 characters per line [or simplest formatting available]
  • Do your homework before writing
  • Include a useful subject line [or headline]
  • Trim your signature
  • Stay on topic
  • Include important information
  • Respect differences in opinion and philosophy

Using only plain text is extreme outside of email. But, the idea that formatting should not get in the way of content is good. Know what you are talking about. Help others to understand. Give them all the relevant information. Trim out anything that does not move the discussion forward or is confusing. Treat everyone with respect.

It’s good advice for any kind of communication and for life. It’s relevant to writing an email, a newsletter, a blog post, an article or anything else you may do.

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
 use-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 or the Ubuntu privacy documentation for details about doing it.

Check your gpg keyring

$ gpg2 -K

$ 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/bedouin/.gnupg/email-password.gpg

Add a .mailcap for HTML

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 -dump %s; nametemplate=%s.html; copiousoutput

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!

OpenBSD & The Command Line

Lately, when I’ve been using a computer, I’ve been using a laptop with OpenBSD installed. It’s changing what I want a computer to do, and how I want to interact with one.

OpenBSD isn’t an easy system to use. For example, you cannot just plug-in a USB drive and have it work. You have to determine the device name, create a directory as a mount point, login to the root account, then type in a command that might look something like this:

# mount -t msdos /dev/sd1i /home/cafebedouin/usb

The default configuration makes the graphical window managers look terrible. Popular, resource intensive desktop environments on Linux systems that automagically mount usb drives are available, such as GNOME. But, they run so slowly on the default OpenBSD installation settings that they are impossible to use without making significant changes to OpenBSD configuration files, such as to the limits on user file sizes.

I know GNOME can run on the laptop in question, because GNOME works just fine when I boot it with a USB version of Linux. But, OpenBSD demands that you learn what you are doing in order to get what you want. It’s not user-friendly.

But, what should I learn? Do I want to figure out how to change the settings on a window manager to get it usable and have it mount this usb drive for me, or would I rather just figure out how to mount the usb myself from the command line?

The answer to that question is easy. The command line is for me.

The documentation on OpenBSD is fantastic, with detailed discussion of every system daemon, how to configure system files, and so forth in the man files. Still, sometimes it is necessary to look up information on the Internet. And, rather than launch X Windows and then Firefox, the text browser lynx made more sense to use. 

Nothing cuts through the crap of the Internet, such as ads, like a browser that will only render text. Further, no tabs or windows means I am rarely multi-tasking. Another thing I am rarely using? A mouse. You do not need one on the command line.

For me, using OpenBSD has been an education in thinking through the tools I use. There’s a difference between LibreOffice and emacs/vi. If you want to write text, why get involved in formatting at all? Further, if all you are doing is modifying configuration files and writing text, why use a tool with so much other functionality, when a simpler editing program like mg will do the job? On the other hand, limiting yourself to the command line is an excellent way to gain an appreciation for all the functionality an editor like Emacs provides, such as an in buffer window browser eww.

If you have an old machine, installing OpenBSD on it will likely be very easy. The hard part will be figuring out how to use it, which will invariably increase your understanding of how UNIX derivative systems work.