Off the Grid Computing

Posted on April 17, 2019 by vi

The weather is getting better and I am currently spending a lot of time on my bike. This is one of the reasons I am thinking more about how to improve my computing experience while being disconnected from high-bandwidth internet.
In addition to this, there are quite a few more situations I find myself in where there is usually no uplink available. Being on a ferryboat for 9 hours having programming work to do is only one example. Another one would be visiting friends in remote places or using a train in Germany.

Some people in my sphere are heavily dependent on online-services. May it be google-docs, dropbox or their online calendar. This is why I thought I’ll write down some of my workflow which doesn’t depend much on online-services.

I would like to share my experience in this matter, which tools I found to be good to be used if you can’t rely on an all-online solution.
In this post I might leave out some details but it is not meant as a howto or guide but as a number of hints on which ways to go with your daily computing.

Blogging

To start with, I am writing this text as a plain markdown file locally on my laptop, sitting outside, not having any wifi nearby. Usually I wouldn’t even notice since this website is statically generated on my local machine with hakyll. I can just write down whatever I want, run a simple command to generate the html and push everything to my server when I’m back online.
Having the task of composing separated from the act of publishing makes me independent of a permanent network connection. This was the main reason (apart from hakyll being written in haskell and haskell being generally awesome) for me to build this blog without any CMS that require a web-based interface to add/edit content.

Keeping Track of Files with git

Usually I put everything into a git repo if it’s text-files in some way. In contrast to, let’s say, SVN or the file-versioning of your cloud-service (e.g. dropbox) git works completely offline. Of cause I also use (semi-)centralized gitservers to work collaboratively and share my files, but with git you don’t depend on it completely. For example, if several people are editing the same file on their machines, these changes get merged together afterwards and conflicts can be resolved in a sane and secure manner.
I strongly advise you to learn to use git.

Using plain Markdown files

Since you (hopefully) now have read all the git-tutorials available you might have noticed that git only works well with plain text-files. But people want formatting in their documents to make them more readable and structured compared to just plain text, whereas programs like LibreOffice use complex data-formats and make it virtually impossible to keep track of changes in git.

This brings us to the topic of writing markdown files.
Markdown is a minimalistic markup language (like html or LaTeX) that is easy to learn, human readable and easy to convert into various output formats. It supports only basic formatting features but for most documents that’s usually enough.

Example

Would look like this, when converted to html:

There are Headlines

With different depths

Also plain text is possible, as well as italic text, bold text, hyperlinks,

  • As well
  • as lists

To convert a markdown-file into a pdf or html I use a commandline tool called pandoc, which is a universal document converter that can be used to convert all kinds of formats. The html-code of this website for example is generated by pandoc from markdown files. There might be other markdown converters which are more easy to use as well.
An alternative to markdown is also the Asciidoc format which has a few more features.

RSS

Many news-websites, podcasts and blogs (such as this one) publish their content not only on the web in form of websites you can read in your browser, but also in a machine-readable form. RSS, which stands for Really Simple Syndication is a standardized machine-readable format for web-feed alike content. Usually you would use a RSS-reader, such as newsboat to subscribe to a number of feeds. The reader then periodically downloads new content from the subscribed websites to read offline.
This way, having my RSS-reader open in the background all the time, I always have the latest news at the time of the last internet-contact on my laptop, ready to be read later.

Vdirsyncer and Offlineimap

Of cause I also want to have access to my calendars, addressbooks and e-mails while being offline. There are two similar tools for these kind of tasks that I found to be the most reliable so far.

Calendars and Contacts

I usually have my calendar, my wife’s calendar and my contacts synced with some self-hosted online-service (e.g. Nextcloud), but a google-account would work in this setup, too. Vdirsyncer is a small commandline-utility to synchronize calendars and contacts from an online-service onto a local machine, where they can be accessed by a regular Calendar/Contacts manager such as Khal, Khard or thunderbird.

E-Mail

Offlineimap does essentially the same but for e-mails, syncing all your directories from your e-mail provider on your local machine where they can easily be accessed with any e-mail client such as mutt, alpine or thunderbird.

Documentation

Graphical user-interfaces have the reputation to be easier to use and to be more self-explaining than commandline-based software. This may be true on first contact but as soon as you want to perform a more sophisticated task you quickly end up googling your problem, eventually finding a solution.
But what if you don’t have google at your fingertips. Most graphical programs have a online-help function that won’t be of much use offline. Commandline utilities usually come with full documentation included. So, if you want to know how to perform some task on with a specific program, just type in man <program_name> or info <program-name> to access it’s documentation.

Recap

You might have noticed that I mostly use commandline tools for my daily tasks. I do so, not neccesaryly because I am offline sometimes but just out of personal taste, experience with UNIX-ish operating-systems and plain nerdyness. It just happened to turn out that many of these tools are still great to use without an internet-connection. I didn’t go much into details where to find more information on the tools described, simply out of lazyness. I have no reason to assume that I am more capable in using a search engine then you are.

PS

I also would like to write something about Secure Scuttlebutt, a distribbuted peer-to-peer social network with great offline capabilities, but I just started using it about a week ago. Maybe I’ll cover that in a later blogpost.

Discussion