Beyond MacOS and Windows: The Linux Alternative


Linux Penguin Mascot and the Logos of Various Linux Distributions

Here are some of the reasons why you might want to try out Linux, the free, alternative computer operating system:

  • You’re adventurous and willing to try something new.
  • You’re broke and can’t afford to keep up with software prices and subscriptions.
  • You have an older PC or laptop you’d like, or need, to use beyond its best-by date.
  • You’re going into STEM studies and need a more technical computing environment.
  • You’re a rebel who dislikes the near monopoly of Microsoft and Apple.
  • You’re a skeptic who wants to see if Linux is as good as its users claim.
  • You want to be as cool as your techie roommate.
  • _You want to attract love interests_ (Sorry, N/A)

If you find yourself in this list, or have a special need of your own, let’s take a layman’s view of Linux without getting overly technical.

The Linux Operating System

Linux, like MacOS and Windows, is a computer operating system that runs on PC desktops and laptops. Unlike MacOS and Windows, there is no corporation that owns it. It was built by volunteer programmers around the world who not only created the operating system, but also most of the software that it runs.

Linux was borne of many early grassroots computing projects, including those of the Free Software Foundation (FSF) that created what are known as the GNU utilities. A University of Helsinki student, Linus Torvalds (who has long since moved to the United States), created the Linux kernel, the core of the operating system which, when combined with the GNU utilities, created a complete operating system sometimes called GNU/Linux but more frequently is called just Linux.

From the early 1990s when Linux was first introduced, until today, Linux has undergone a tremendous era of growth and improvement in which it has become a modern operating system that measures up well against the ones from Microsoft and Apple.

While Linux is a distant third behind Windows and Mac in terms of general use on personal PCs, in the technical world Linux is frequently the operating system of choice. Linux is also widely used as an Internet server for web services. And if your phone is an Android, you’re already using a modified version of Linux behind the scenes without even knowing it.

What Does Linux Offer?

Choice

Because Linux is a community-supported operating system, it’s not monolithic like MacOS or Windows. Because there is so much choice available, different groups of developers have packaged Linux in different ways. These packages are called “distributions” or “distros” and there are many to choose from. They vary from lean, tight distributions that will still work well on old PCs, to slick, larger distros with all of the bells and whistles one expects from a major operating system.

There are several distros that emphasize ease of use and installation. These are ideal for new users. Linux Mint is but one example of a good beginner’s distro with user-friendly software included, such as Firefox, LibreOffice, Thunderbird Mail, and an easy interface that a Mac or Windows user can feel right at home with.

There is another sense of choice that is more philosophical. People often choose Linux because they believe in what its developers are doing. In a departure from corporate greed for profits, Linux is entirely free to download and use.

Software Galore

Nearly every kind of software that most people use on their computers has a counterpart in Linux. Most of this is open-source software created by communities of programmers working with each other. There are browsers, office apps such as word processors, spreadsheets, and presentation software, as well as photo editors, sound editors, video editors, 2D and 3D creation packages, and chat software, not to mention the more technical computer languages that are freely available to users.

Some widely used software such as Firefox and Chrome have Linux versions, and there are native Linux clients for Dropbox, Zoom, and Skype. And if you absolutely must have access to Microsoft Office for collaboration with others, you can use Office for the Web. Similarly, photographers and designers can use the web version of Photoshop, though there are open-source programs such as Gimp (GNU Image Manipulation Program) that are worthy alternatives.

In other words, there is no shortage of native Linux apps to choose from.

One area where Linux falls short, however, is for gaming. Serious gamers are pretty much stuck with Windows, although Linux, like MacOS, offers some quality games of its own, and offers a client for Steam streaming games.

Security

The first principle of computer security is that no operating system is totally secure. This applies to Linux in the same way it applies to MacOS and Windows. The difference is that when exploits are discovered in Linux, they are fixed quickly. Neither Apple nor Microsoft is as quick to deliver fixes. It’s easier to keep a Linux computer up to date with the latest security fixes.

Community

There is a strong sense of community among Linux users. Each Linux distro provides user forums where users can ask and answer questions and pick the brains of more advanced users. This is especially helpful to those who venture forth into using Linux as a home server for sharing a printer or as a backup server for storing personal files.

Satisfaction

The satisfaction factor in using Linux can be very high, if you click with it (no pun intended). Openly admitting that Linux is not for everyone, it can be deeply satisfying for those who respond to its charms. That person might be you.

How Do I Get Started?

There are distros that are very beginner friendly, providing easy installation procedures and help in getting oriented to the system. Here is a good overview of some of the best distros for beginners:

Best Linux Distributions That are Most Suitable for Beginners
Brief: It’s easy to get overwhelmed by the list of Linux distributions available. In this article, we mention the best…itsfoss.com

If your Windows PC desktop or laptop has sufficient disk space, you can install Linux side-by-side with Windows, booting into either system. If you have an older PC around, you can use one of the lightweight beginner’s distros to bring it back to life.

Modern Linux distributions are easy to install and recognize most hardware components such as built-in wifi adapters, Bluetooth, and ports including USB-A, -B, and -C. It supports HDMI ports and SD card ports as well. Overall, Linux has very good printer support.

You can use Linux without have to type commands into a Linux terminal, though as you grow into Linux, you may discover the power of the command line. Technical users will love the command-line programs and utilities.

Bottom Line

For all the reasons mentioned, Linux makes an attractive alternative to Windows and MacOS. It should be mentioned that Macs are inherently Linux-like under the hood and that if you are technically inclined, you can install more up-to-date open-source utilities by installing Homebrew, making the Mac even more Linux like.

Windows users can install Microsoft’s Windows Subsystem for Linux or WSL as it is called. This will install a version of Ubuntu Linux that you can run concurrently with Windows.

Neither of these options, however, is as satisfying as a dedicated Linux system, complete with one of the attractive graphical user interfaces that some users find more logical and easier to use than either MacOS or Windows.

Linux is a viable alternative for both general and technical users. I’m obviously a big fan of Linux myself and recently purchased a Lenovo ThinkBook just to run Linux Mint, my personal favourite distribution.

Should you decide to give Linux a try, chances are that you’ll be well rewarded.

Good luck, and be brave.


Gene Wilburn is a writer, photographer, and retired IT professional. He has been writing about Linux since the 1990s.

Fedora 36 Linux: First Impressions

By Gene Wilburn


Fedora GNOME Interface

When I started using Linux in the early 1990s, my first distro was Slackware, followed soon after by Red Hat. Eventually I discovered Debian Linux and it quickly became my favourite, especially after Red Hat evolved into an enterprise company.

Along the way I tried Ubuntu Linux and Linux Mint and liked both, partly because they were part of the Debian family of distributions. Over the years I’ve watched them become easier to use and more polished. I run the latest Linux Mint on my desktop machine.

Even so, I enjoy trying out different distributions to see what they offer. Of course, Linux is Linux, no matter which distribution — under the hood they pretty much all do the same things. Where they differ the most is in packaging systems, method of installation and maintenance, and the user interface.

My test computer for experimenting with distributions is a Lenovo Thinkpad E431 i3 laptop, introduced in 2010. It contains 4GB RAM and 500GB of hard disk. Not a speed demon, but it has plenty of memory and storage, and is supported by all the Linux distributions I’ve tried.

Using this laptop, I took a look at the no-nonsense Fedora 36 Workstation. Fedora is sponsored by Red Hat and is characterized as a “bleeding edge” distribution, continuously introducing the newest versions of applications. It is popular and has a large support community.

Installation

After loading the Fedora .iso file onto a stick disk, I booted it up on the Thinkpad and asked it to install to my hard disk. The installation procedure worked but was less explicit about what was going on than, say, an Ubuntu installation.

The only confusion I encountered was in letting it know it could blow away the existing Linux Mint and use the entire hard disk. There is less feedback than I’m accustomed to, and it was unclear to me whether I had set it to delete the existing partitions. It turned out to work fine, but I prefer the feedback I get with an Ubuntu-family install.

First Look

After Fedora booted up for the first time, it displayed the latest GNOME user interface, which left me wondering what to do. There were no docks or panels on the screen. My first hurdle was how to access stuff. I tried clicking at the corners and clicking on the background screen, to no avail. Then I pushed the Windows key, which led me to the dashboard, or “dash” as it seems to be called. From the dash I could launch selected software or invoke a full screen of installed apps, similar to Launchpad on a Mac.

I’ll never understand why most distributions, including Fedora, do not include a Terminal app in the initial dashboard. That’s always the first thing I need to use.

Fedora Workstation is highly integrated with GNOME and is configured to present an uncluttered screen, leaving most of the screen available to applications. I like this approach, especially when working on a restricted screen such as a laptop.

From apt to dnf

Instead of the apt command-line tool of the Debian variants, Fedora uses dnf for command line management of software installations. Fedora packages are .rpm files rather than .deb files and Fedora supports both Snap and Flatpack, which are increasingly used for software distribution. Fedora differs from Debian-based distros in its security mechanism. Ubuntu-family distros use AppArmor while Fedora uses SELinux.

In practice, switching to dnf is straightforward for an experienced Debian user.

In Debian distributions, you might install a software package such as btop by typing

sudo apt install btop

In Fedora you would type this instead

sudo dnf install btop

The two systems are similar enough that transitioning from apt to dnf presents no particular challenge.

btop

Changing the Look & Feel

Although I find the GNOME interface interesting and slick, I couldn’t get comfortable with it, so, in the great Linux tradition, I added my favourite GUI, Cinnamon, as an alternate GUI with the simple command

sudo dnf install cinnamon

and, upon completion, Fedora installed the Cinnamon option. This significantly increased my comfort level.

Cinnamon User Interface with Menu and Task Bar at the Bottom

Bottom Line

I give Fedora 36 highest marks: It’s a great distribution. I suspect, though, that it’s a better Linux for experienced users than beginners. For those new to Linux I think Ubuntu or, particularly, Linux Mint, makes a better choice.

If you want to use a solid, leading edge Linux, and have a bit of Linux experience, Fedora is one of the top choices.


Gene Wilburn is a Canadian writer, photographer, and retired IT professional.

Greppy: A Lightweight Perl/PHP Website Search Engine Based on Grep


GNU Grep

My friend and colleague Mark mentioned to me recently that one of his clients was interested in having a search engine on their website and did I have any ideas?

The scenario was this: the site is an informational site, with monthly updates and is hosted in the AWS cloud. It runs in a minimal instance of Linux, with only 1 GB RAM and very tight storage. It’s not an e-commerce site. Was there something small and lean enough to serve?

Mark and I had once worked together on a project for a different client where we installed Apache Solr to build a sophisticated search engine for large amounts of data, but Solr would be massive overkill for the site in question.

GNU Grep to the Rescue

As I thought about a solution for this small site, I immediately thought of grep, the open-source search utility with a long Unix heritage that can absolutely rip through text files to search for words or phrases and show them in context. All it needs are some text files to aim at.

The site in question has a large number of PDF files and HTML files. What, I thought, if copies of these were converted to plain text files and placed in data directory where grep could rapidly search through them? Text files could substitute for the usual inverted index of search engines and, at the same time, have a much smaller footprint on the system. The client wasn’t looking for fancy searches.

Similarly, grep doesn’t need much memory to run in. Furthermore, a lightweight website search engine based on grep could be built with a few day’s programming and testing. After getting the go-ahead to start programming, I invoked vim and began building a simple system.

Building the Text Database, or Index

I knew I’d use Pandoc to convert html files to plain text, but I needed something to convert the PDFs. I discovered the command-line utility pdftotext that is part of xpdf-tools in Linux. (For MacOS, Homebrew installs the utility when you install xpdf.) Between these two, pandoc and pdftotext, I had to tools for building a text database.

To that end, I wrote a batch-processing script in Perl, buildindex.pl that takes the results of a find command that selects all the PDF and HTML files on the site, and processed them through pandoc or pdftotext, putting the resulting text files into a collective data directory called textdata. The script also checks an exclude.txt file that can used to exclude directories that contain private information.

Embedded Filename Metadata

GNU Grep is not a fully-featured search engine, but with a little help from the GNU ls command I was able to prepend the date of last creation or update (mtime format) to the filename so it could later be sorted into most recently updated work to display at the top of a search.

The batch script populates the textdata directory with files that look like this:

1645031851dot0563837700dot_99_news_99_2021_April_Newsletterdotpdf.txt
1645031852dot5724170650dot_99_news_99_2021_August_Newsletterdotpdf.txt 1645031853dot9364470210dot_99_news_99_2021_February_Newsletterdotpdf.txt
1645031855dot7164861080dot_99_news_99_2021_January_Newsletterdotpdf.txt 1645031857dot1805182550dot_99_news_99_2021_July_Newsletterdotpdf.txt
1645031858dot7045517160dot_99_news_99_2021_June_Newsletterdotpdf.txt
1645031860dot2525857010dot_99_news_99_2021_March_Newsletterdotpdf.txt
1645031861dot6606166090dot_99_news_99_2021_May_Newsletterdotpdf.txt
1645031862dot7166397880dot_99_news_99_2021_September_Newsletterdotpdf.txt
1645460076dot2987186510dot_99_shift_99_ShiftHappensdotpdf.txt

Breaking this down, the initial part of the saved text file — 1645460076dot2987186510 — is the date in mtime format.

The word dot indicates an initial dot (.) in the relative pathname, and every _99_ represents a forward slash (/) in the original pathname. The added new file extension is .txt.

This metadata allows the search program to quickly reconstruct the path back to the original document, and to replace .txt with the original extension name.

The Search Module

The client’s website is powered by PHP, so that is the language I used for the search module.

A search form module, searchform.php, prompts for a search term or phrase, which is then passed to the main search program, search.php. The search.php script, in turn, calls on grep to do the search and stores the results in an array that is then reverse sorted. Looping through the array, the search script reconstructs the full path and original extension of the filename, turning it an <a href> HTML link.

To make the results easier to read, search terms found in the results are highlighted in red, to make them stand out in context. Overall appearance is controlled in HTML with an embedded CSS style sheet.

The results, reflecting the song lyrics in my test site, look like this:

Context and Word Boundaries

To refine the search somewhat, the searchform.php file offers two checkboxes. The first allows the searcher to search on whole words and phrases, or do stem searching. In a whole word search, the default setting, the word “train” for example would find instances of “train”, “Train”, or “TRAIN” as a whole word surrounded by spaces or by punctuation. A stem search on “train” would find “train”, “Train”, or “TRAIN” as well, but also things like “trains,” “training,” and “restrain.” This is sometimes useful as an option.

The second checkbox specifies the amount of context surrounding the search term. The default is up to 90 characters on either side of the term. Unchecking the box results in a context of three lines of text: the line before the search term is found, the line it’s in, and the line following.

Batch Processing

To keep the search index, or text data directory, in sync with the information on the site, the buildindex.plscript uses brute force. It deletes everything in textdata/ and rebuilds it from scratch. What this lacks in sophistication it makes up for it in efficiency. It takes no more than five minutes to rebuild the index for the entire site, which can be run manually when needed, or run as a cron job at desired times.

Bottom Line

To our delight, this lightweight, batch-oriented search engine is speedy, and is well suited to the needs of the client. In honour of grep, we named the search system Greppy.

Greppy follows the Unix philosophy of using existing discrete utilities combined together to process text files. There is no need to reinvent the wheel.

To make this engine available to others who might have a use for it, it is available here at Github.


Gene Wilburn is a Canadian IT specialist and technical writer

Antix Linux


antiX Linux: A Lightweight Speedster

antiX Linux Screenshot

antiX (pronounced “antics” not “anti-X”) is a lightweight Linux distro designed to run on minimal PC hardware, or “live” on a stick disk, similar to LXLE, Lubuntu, Linux Lite and others. AntiX Linux is based on Debian but proudly describes itself as free of systemd — a newer and widely used system startup environment that some Linux gurus dislike.

Two things immediately caught my attention about this distro. Despite being lightweight, it includes major software such as LibreOffice and Firefox. It uses the snappy IceWM as its default windows manager along with the Rox file manager. I’ve always liked IceWM so I decided to give antiX a whirl on my sandbox computer: an older Lenovo Thinkpad laptop with Intel i3 processor, 4GB memory, and 400GB HD — not exactly minimal, but not particularly fast either.

Installation

Installation is easy. The installation process has a somewhat different look and feel compared to Ubuntu-derived distros but it asks most of the same questions.

During installation it prompts for two different passwords, the user password and the root password. It’s possible to create a user with no password at all, which may be convenient for some users. I chose to create a user password to keep it in line with my Ubuntu and Mac systems.

Once installed, antiX presents an attractive IceWM environment with a bold wallpaper and an app called Conky that displays a number of runtime stats including current time, uptime, CPU, disk, and connection usage. Conky can be switched off via the Desktop menu if you find it distracting.

The IceWM menu is invoked from the start button in the lower-left hand corner of the screen, à la Windows, but it can also be invoked from anywhere on the desktop with a right-click of the mouse. IceWM has dozens of contributed schemes you can try out to subtly alter the appearance of the desktop environment. I particularly liked the metal 2 look.

The only app I found wanting in the initial setup is Rox file manager. Finding it too primitive for my taste, I installed PCmanFM ($ sudo apt install pcmanfm) and added it to the menu’s Personal tab for quick access.

The default terminal app is Roxterm. It seemed quite decent but it crashed on me when I moved my .profile file to .bashrc. It was also not exporting my customized $PATH statement. So I installed LXTerminal ($ sudo apt install lxterminal), which is also lightweight and fast, and configured it to be my preferred terminal application. LXTerminal interpreted my .bashrc file perfectly.

Next up was Dropbox, which I use to share my writing and scripting files across my computers. It requires installing the Dropbox daemon via the Synaptic package manager, a simple task. You choose Nautilus-Dropbox from Synaptic. Rest assured it doesn’t install Nautilus dependencies.

All my writing is done in Markdown plain-text format so I installed Ghostwriter, a dedicated Markdown editor. In line with Markdown, I installed Pandoc for converting Markdown files to other file formats. I use TeX/LaTeX for typesetting which required the installation of Texlive and, in my case, LyX, a graphical document editor to accompany LaTeX.

Likewise, I installed Sigil, an Epub creator and editor for producing nice-looking ebooks, and, not finding Gimp on the system, I installed that too.

Missing Utilities

One thing that never works well for me in Linux is a laptop’s trackpad. Unlike the slick trackpad drivers on a MacBook, Linux trackpadding ends up shooting me all over the screen so I end up typing things in the wrong paragraph — not something that makes a writer happy. To fix this problem I prefer to switch off the trackpad entirely and use a wireless USB mouse instead.

There is no simple way to do this in antiX. You have to issue the command synclient TouchpadOff=1 to switch the trackpad off. Because I usually forget how to invoke this command I created two .bashrc aliases:

alias padoff='synclient TouchpadOff=1'
alias padon='synclient TouchpadOff=0'

allowing me to switch off the trackpad by typing padoff, a command I can remember, at a terminal prompt.

The antiX Control Panel offers no visual support for a laptop’s power management. An Internet search tipped me off that some antiX users install xfce4-power-manager to set power levels for both plugged-in and battery options. It brings in very little of the xfce4 environment, keeping the distribution light. Using XFCE Power Manager I was able to easily adjust my Thinkpad to switch off the screen when the lid is closed, and to go to sleep after a certain timeout. This greatly improved the Thinkpad’s battery life.

Okay, But What is This?

I’m impressed at the way antiX Linux adds new programs to the IceWM menu. Painless. Except for one weird exception.

I’ve lately been using an open-source, Markdown-based note-taking app called Joplin across all my computing platforms — MacOS, iOS, and, of course, Linux. I hoped that I could type $ sudo apt install joplin, but this wasn’t in the repositories for antiX.

This took me to the Joplin site where I downloaded the Linux file Joplin-2.5.10.appimage. Neither antiX nor I had ever seen this file extension before. An Internet query explained that it was a self-contained Linux program (“container?”) with all the dependencies included. After setting the permissions of an AppImage file to execute, you can double click the app in a file manager to launch it. AntiX certainly had no built-in way to deal with an AppImage package, nor any way to add it to the menus.

To make it simpler for me to use, I placed the Joplin AppImage file in my $HOME/bin directory and created a symbolic link to it called joplin. Since I nearly always have a terminal open, this allowed me to launch the program simply by typing “$ joplin &”.

Bottom Line

To be honest, antiX Linux made my day. It’s not often I find myself highly attracted to a new distro, but I enjoy antiX so much I’m going to keep it as the default Linux on my Thinkpad laptop. Due to its speed and lightweight interface, it’s easily one of the top distributions to consider for aging computers. In fact, my Thinkpad has never run better. It’s made a believer of me.


Gene Wilburn is a tech writer and essayist with more curiosity than time.

Minimalist Writing Devices, #3: Raspberry Pi 400

By Gene Wilburn

My Covid-era 2020 Christmas present to myself was an eye-catching red and white keyboard with a computer inside: a Raspberry Pi 400. Like a 1980s-vintage Commodore 64 all it needed was a cable connection to my monitor and I was sitting in front of a fully operational Linux computer. Cost: $70 US for the unit alone, or $100 for a complete kit that includes the keyboard/computer, color-coordinated mouse, HDMI video cable, and a book, The Raspberry Pi Beginner’s Guide.

As a writer, I’m fascinated by low-cost,  minimalist writing devices and the Raspberry Pi 400 (RPi 400) delivers more power per dollar of computing device I’ve yet encountered. Let’s take a look.

Introducing the Raspberry Pi 400.

What you get in a Raspberry Pi 400 is not just an attractive keyboard, but a full 64-bit ARM CPU computer inside, with 4GB RAM, a microSD slot to store the operating system and local data, 2 micro-HDMI ports, 1 USB-2 port, 2 USB-3 ports,, a USB-C port for power, a Gigabit Ethernet port, built-in WiFi and Bluetooth, and a GPIO (general purpose input output) 40-pin port.

The GPIO port is for makers and experimenters — those who create things such as robots and robotic structures, specialty electronic circuit boards, art and light installations, and much more. To this crowd the Raspberry Pi is at the heart of many a specialty project. For them Raspberry Pi is as common a brand name as Dell, HP, Lenovo, Acer, or Asus to most home computer users. Chances are you’ve not heard the Raspberry Pi name bandied about much in writing circles … yet.

With the RPi 400 that may be about to change. This is the first Raspberry Pi model that is a ready-to-boot-and-use Linux computer with appeal beyond its usual user base. I can see parents picking up one or two of these for their kids. It’s a inexpensive and great way for anyone who has heard of Linux, but may have been shy about trying it, to get a hands-on introduction. The purpose of this review is to examine this device as a potential minimalist writing tool that could be used by someone with no previous experience with a Linux computer.

Setting Up the Unit

The RPi 400 arrives with a 16GB microSD card inserted, ready to boot up Raspberry Pi OS as soon as you add a monitor or TV, and a USB mouse for convenience. The first time you boot the system it prompts you for your country, language, time zone, and a new password. The RPi then scans for a WiFi connection and prompts for its password. 

Once set up, the interface looks similar to Windows or MacOS, with the task bar at the top instead of the bottom. Navigation is simple: click on the red raspberry icon in the top left corner to display a menu from which you may launch any of the included programs or apps. The RPi 400 comes loaded with programming editors, text editors, and the Libre Office suite, which includes a Word-like word processor. The default browser is Chromium, the open-source version of Chrome. A file manager allows you to browse through your folders to copy, move, delete, or select files. The operations are intuitive and familiar to any Windows or Mac user.

And that’s it! You’re ready to write.

The RPi 400 as Writing Device

Because I use Google Docs for much of my writing, I fired up Docs for this review and found the RPi a very comfortable device to work with. The keyboard is full size, minus a numeric keypad. Because it’s weighted with a computer inside, it has enough heft to feel solid as you work. The keys are well spaced and the layout is normal with well positioned arrow keys in the lower right-hand corner.

At this price you don’t get a first-class keyboard, but it’s completely serviceable. The one caution with the keyboard is that you occasionally get keyboard bounce — two characters appearing with one press of the key. The bounce is infrequent enough that it’s not a show stopper, but you need to keep an eye on the output for occasional misbehavings. Some of the bounce may be determined by your touch on the keypads. I’m a heavy-handed typist, raised on upright typewriters and the original IBM PC keyboards.

The RPi 400 is not a speed demon. It has enough zip that it doesn’t lag while you type but it’s not a sports car. It’s more like a cute VW Beetle with rear engine. Fun to use and it gets you there.

Who is the Raspberry Pi 400 for?

The RPi 400 is a variant of the small Raspberry Pi 4 used in maker projects. As such it will certainly be of interest to makers and experimenters, but putting the computer inside the keyboard opens the device to a much wider audience.

Parents can purchase this unit for their kids as a way to learn programming, or just for general use. It’s a little sluggish on websites that include heavy graphic material but that’s to be expected.

Writers may be interested in this unit if they’re in need of a cheap computer and already have a monitor or HD TV it can attach to. At this price, it could serve as a complementary machine to a laptop or tablet, or even a unit you might want to leave at a site you visit regularly, such as a cottage or other external location.

Overall, the Raspberry Pi 400 is cute, highly usable and cheap. For most writers I would recommend the $100 kit over the $70 standalone model. The kit comes with matching USB mouse plus the critical HDMI video cable.

The Command Line

Although you don’t need to know much about the included terminal app that is similar to the Windows Command Prompt and nearly identical with the Mac Terminal program, you will need to use the command line occasionally to make certain your software is up to date. This is done by starting up the terminal and typing the following two lines at the command prompt:

$ sudo apt update

$ sudo apt upgrade

Running this once a week or so will keep the Raspberry Pi 400 software and operating system up to date with the latest upgrades and security updates.

Bottom Line

As you can tell, I’m enthusiastic about the Raspberry Pi 400 as an inexpensive, minimalist writing device. The bang for the buck is incredible and there’s nothing difficult about using a Linux computer for writing. All the usual amenities are here, packed inside a keyboard. The unit, while easy enough to carry to other locations, is not a portable. This is a small desktop computer waiting for you when you’re ready to create the next best seller. Happy typing!

SongNet: Building a Private WiFi LAN

SongNet: Building a Wireless Private LAN with a Raspberry Pi and a pocket router

By Gene Wilburn

Songnet

Overview

There are times when you meet with a group and want to share documents in common, but your meeting place doesn’t have WiFi Internet access. It could be an informal classroom situation, a regular meetup group, or, as in my case, two music-jam/singing groups.

In one of my groups we use Dropbox for sharing electronic versions of lyric and chord sheets. In the other we use Google Drive. These work well enough when there is Internet access, but often the places we meet to set up and play don’t have WiFi available.

Dropbox and Google Drive also have two disadvantages: every time a new member joins the group, we have to set them up with Dropbox or Google Drive and Google Docs apps for sharing. Even worse is helping them make local copies of the lyric sheets on their tablets for offline access.

This was technically challenging for some members, not to mention that it requires each member to personally update their local storage regularly. In order to create a more user-friendly experience I put together a solution that I’ve dubbed SongNet.

It occurred to me, as I’m certain it must have occurred to many others, that a nifty solution would be to create a small private wireless LAN, or Intranet, that could be set up in the meetup venue room, creating a private hotspot that could be accessed by any device that members preferred, whether it was a smartphone, tablet computer, or laptop. The only required app is a web browser.

Equipment Needed

The gear needed to set up a private local wireless LAN has been around for some time and you might even have some of this in your parts bin.

  • A router that also serves DCHP addresses
  • A Raspberry Pi computer or equivalent

I focused on small size and portability by selecting the following three pieces of hardware:

  • Raspberry Pi Zero W Linux computer
  • TP-Link TL-WR802N Wireless N300 Travel Router
  • High-performance 32GB MicroSD card

Any Raspberry Pi model with a built-in or external USB WiFi adapter would work. I acquired the TP-Link travel router from Amazon for around $35 Canadian. Because the MicroSD card holds the operating system, the web server, and the web contents, I wanted one with plenty of storage and one that is as fast as possible. I selected a Samsung EVO Select 32GB microSDHC UHS-I U1 Memory Card with Adapter from Amazon for around $12 Canadian.

Setting up Raspberry Pi

The first order of business with the new MicroSD card is to set it up so it can boot the Raspberry Pi. Using the SD adapter that comes with the MicroSD card, put the card into an ordinary SD slot of a Windows, Macintosh, or Linux computer download NOOBS and add the NOOBS files to the MicroSD card, following these instructions and the ones that come with the download.

This done, remove the MicroSD card from the adapter and insert it into the Raspberry Pi and boot it, connected to a monitor, external keyboard, and mouse. When it boots, choose to install which version of Raspbian you prefer. I selected Raspbian (not Raspbian Complete or Raspbian Minimal). When that’s done, reboot the Raspberry Pi and follow the prompts for resetting the password to one of your choice and selecting an active WiFi network. More prompts will follow for updating the files. This takes awhile.

The Raspberry Pi Zero has so little RAM (512MB) it strains to run the graphical desktop environment and the GUI is a significant drain on system resources, so we want to eliminate it from regular use once we’re set up. We also want to activate the SSH server in order to log into the Raspberry Pi when it’s “headless” — that is, unattached to an external monitor or keyboard.

To so this, open a Terminal application and type the following:

$ sudo raspi-config

This brings up an easy-to-follow, character-based menu.

raspi-config-1

Select 3 Boot Options and press Enter.

Next Select B1 Desktop / CLI and press Enter.

raspi-config-2

Then select B2 Console Autologin hit the TAB key and press OK.

raspi-config-3

What this does is deactivate the GUI desktop environment from loading automatically, presenting you instead with a console screen with user pi already logged in. Should you need to boot up the GUI for any reason, when you’re attached to an external monitor, type the following at the Command-Line prompt:

$ startx

The next step is to activate the Raspberry Pi’s SSH server so you can log in from other machines using an SSH client:

raspi-config-4

Put the cursor line on P2 SSH then tab to Select and press Enter.

raspi-config-5

On the next screen tab the cursor to “Yes” and press Enter.

raspi-config-6

Setting up the web server

Next, in a Terminal window or at the console, type the following commands to set up the directories to prepare for installing the web server.

$ cd /var
$ sudo mkdir www
$ sudo mkdir www/html
$ sudo chmod -R 755
$ sudo chown -R pi

Because the Raspberry Pi Zero W is a minimalist Linux computer, I elected not to use the fully-featured Apache2 web server. Instead I opted for the simpler Webfs, a lightweight web server that is more than sufficient for serving static pages such as song lyrics.

To install webfs on the Raspberry Pi, type the following commands in a Terminal or at the Console and follow the prompts:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install webfs

In order to add content, we need to know the IP address of the Raspberry Pi. To find this out, type the following:

$ ifconfig

And look at the IP address for wlan0, the WiFi adapter. The IP address is the set of numbers just to the right of inet, in this case 10.0.0.10.

ifconfig

We can first test this by opening a Terminal on a Macintosh, Linux, or Windows Subsystem for Linux (WSL2) computer and typing:

$ ssh -l pi 10.0.0.10

or whatever your IP address is for the Raspberry Pi. Answer yes to accept the security credentials and if all is well you should now be logged into the RPi.

To populate the Raspberry Pi’s web site, we turn to another command-line utility called rsync. Go to the directory where your lyric sheets are stored on your Mac or PC and type the following in a Terminal window:

$ cd Lyrics (or whatever your directory name is)
$ rsync -avz * pi@10.0.0.10:/var/www/html/

Of course you use your IP address rather than the 10.0.0.10 for my Raspberry Pi. Then you can watch as the files transfer to the Raspberry Pi’s web directories.

To test the site, first log onto SongNet (password: singalong):

songnet-select

Then open a browser and point it to the IP address of the Raspberry Pi: e.g.,

http://10.0.0.10/

You should see an alphabetical listing of your song sheets. Webfs by default allows directory listing, which, if you don’t mind scrolling, may be all that’s needed for your site. The web listing will look something like this and you simply scroll and click on the song you want to see:

plain

If you know some HTML and want to create your own index.html page for the site, log into the Raspberry Pi and type the following:

$ sudo nano /etc/webfsd.conf

Go to the line that reads

web_index=""

And change it to

web_index="index.html"

Because Webfs defaults to port 8000, it’s also preferable to set the port to the standard 80. This too is located in the webfsd.conf file. Go to the line that reads

web_port=""

And change it to

web_port="80"

Save the changes and reboot.

$ sudo shutdown -r now

Because my groups have accumulated a very large number of files, I wrote a Perl script called buildIndex.pl that pretties this up by putting an Alphabet Selector at the top of the lyrics page and Anchors within the listing for quicker access. It also looks nice.

listing

Setting Up the Router

Following the instructions that come with your router, log into the router using a browser. The first thing to do is to set the IP address of the LAN (Local Area Network). Choose a network IP range that is different from the one you have at home to assign what is called a “non-routable IP” range, which is a set of numbers set aside for LANs that are not connected directly to the Internet. To make typing the addresses easy, I set my router to a 10.0.0.0 network, subnet 255.255.0.0.

router-1-lan

It’s important that the Raspberry Pi have a fixed IP address or the system won’t work. You can do this in one of two ways. One is to use the RPi’s graphical interface to log onto the portable router hotspot and follow the menus to manually assign a fixed, or static, IP address. Another way to do this is, if your router permits it, is to put the MAC address of the Raspberry Pi’s WiFi adapter in the router itself and have it automatically assigned by the router:

router-2-macip

Users of SongNet need to type this IP address into their browsers to access the songs, so I chose to assign the address 10.0.0.10 for ease of entry.

DHCP

One of the critical functions of the router is that of a DHCP server that serves dynamic IP addresses to the users of the network. When they log into SongNet they get a 10.0.0.X address that connects them to the system. This is handled in the router’s DHCP section where you set aside the range of IP addresses that are available. In this case the addresses from 10.0.0.100-199 (100 addresses) have been made available.

dhcp

 

Test Out the System

Now that it’s all put together, it’s time for a test. Disconnect the travel router from the Internet by removing its ethernet cable, disconnect the Raspberry Pi from its external monitor and keyboard, and put the router and RPi together in a room and plug them in.

At this point it’s necessary to use your tablet or computer’s WiFi setting to join SongNet.  I assigned the password singalong for joining SongNet.

songnet-select

Now open a browser and enter:

http://10.0.0.10

This should show you (and everyone logged in) your songs and allow you to select them for display.

Finally, before you unplug the local WiFi network to carry it or put it away, you should shut down the Raspberry Pi properly. To do this SSH into the Pi and type the following:

$ sudo shutdown -h now

Give it a minute to finish closing all its files then it’s ready to tote to the next gig.

Minimalist Writing Devices, #1: Lenovo C330 Chromebook

By Gene Wilburn

lenovo

Until recently I’d shied away from Chromebooks. They didn’t seem like real computers to me and for the price of even the basic ones, you could often pick up a used laptop with more overall functionality. I have several programs, such as Photoshop and InDesign, that require a high-end computer and I use both MacOS and Linux computers for these heavier-duty computing needs.

What softened me to the possibility of using a Chromebook was my iPad. It changed the way I used the Web. Between the iPad and the advent of reasonably-priced cloud storage, I began using the iPad more than my laptop computers, especially for writing. I went from being a touch typist to a single-finger poke typist on the iPad’s virtual keyboard. Occasionally I augmented this with Bluetooth keyboards and the combination of an iPad with a wireless keyboard made me wish for something along the same lines but in a single, integrated unit, similar to but not expensive like the Microsoft Surface.

I was intrigued by an announcement from Google in the fall of 2017 that they would soon upgrade ChromeOS to allow it to run both Linux and Android apps concurrently with ChromeOS apps on their Chromebooks. Linux is my favourite operating system and Android apps are pretty much identical to the apps on my iPad. It was beginning to look very interesting.

Deciding to take the plunge, I found the Chromebook unit that had the specs I was looking for in the Lenovo C330: 4GB RAM and a 64GB eMMC drive, plus extras that I thought of as gravy, such as a touch screen and a 180 degree pivot of the LCD panel. At roughly $360 Cdn, it seemed reasonably priced.

Setup and Experimentation

The first thing I did when the machine was in front of me was hold it up so I could check out the whereabouts of the I/O ports. On the left side, facing the machine, is one USB-C slot which the power supply uses but which can be shared with other peripherals. One USB3 slot for backward compatibility plus an SD card slot. Nice touches these. The right side of the unit has a mechanical volume control, on/off switch, and an earphone jack. Did you hear that, Apple? An earphone jack! A lot of us still have good wired headphones we’re satisfied with. It’s a real courtesy to customers to not expect all of us to upgrade to USB-C devices in one fell swoop. Kudos to Lenovo.

I opened the lid and feasted my eyes on the keyboard. An honest, full keyboard with all the keys exactly where I want them. Wide shift keys, easy-to-hit Enter key, full-size numeric keys, and a set of arrow keys at the bottom right, underneath the right shift key. The keys are coated in a kind of plastic that feels slightly rubberized. Response is on the soft side, but so far I have not witnessed any sign of keyboard bounce. Speaking as a writer, the Lenovo keyboard passes muster. It’s not as good a feel as my Macbook Air (old style non-butterfly) keyboard, but given the difference in price level, the Lenovo keyboard holds its own.

As I was about to turn on the unit, I paused momentarily for a big breath. I’d never before in my life ever used a Chromebook and had no idea what to expect, other than its reputation for ease of use. When it booted into the Chrome logo it asked the same kinds of setup questions you get on any tablet, such as network and password. It assumes you have an email account with Google. That’s mandatory, I believe, so I put in my Gmail ID name and password, and it began the setup, already familiar with my profile. There was the usual keyboard question, defaulting to US keyboard but I chose the Canadian-English spell checker. Boom, it was done. Installed and ready to go. Anything else you want, visit Settings and help yourself.

Naturally the default browser is Chrome. It went straight to my Gmail account and right into my Google Docs documents and folders. Seamless.

I studied my way through Settings next. I tested the Bluetooth adapter on a BT speaker and a pair of BT headphones and they both checked out fine. The only disappointment for me was that I didn’t see anything about Linux. I then guessed, rightly in this case, that ChromeOS wasn’t up to date so I updated it, rebooted, and this time in Settings, there was a new Linux section, with Install Linux as an option. It warns that this is still in beta, but I’ll take a beta Linux over no Linux any day.

When it finished installing Linux I opened the Terminal app. After a few seconds wait as things initialized in a KVM (kernel virtual machine), a beautiful Linux system appeared, at the command line. It turned out to be pure Debian, the latest version of Debian at that, which delighted me. I’ve been a Debian Linux fan since the mid–90s. I used Apt to update Linux and now both ChromeOS and Linux were up to date.

Android Stuff

The desktop of ChromeOS has a bottom panel called the Shelf that contains an icon for the Chrome browser, Gmail, YouTube, and Play Store. Play Store is where you find Android apps. I’ve populated my Chromebook with some of the same apps I use on my iPad: iA Writer (a writer-oriented Markdown editor), Netflix, a File Manager utility, Dropbox, Snapseed, Great Courses, plus a few more. Each, so far, has worked as expected. An Android app, such as iA Writer, has access to that same shared Downloads folder that is shared by ChromeOS and Linux, meaning you could edit the same document from three different operating systems, which I did out of sheer curiosity.

One of the noticeable things about using Android apps is that the fonts are not as crisp as you might like. The fonts have a slightly fuzzy, artificial look, unlike the well-formed ChromeOS native fonts. This is not a show stopper but it makes the Chromebook more of a Grade B tablet when running Android apps. I would not care to read an ebook with the Android fonts.

Linux Subsystem

For me the Linux subsystem (still in beta) is the jewel in the crown of the Chromebook. As mentioned, the default installation is based on Debian GNU/Linux, and there are hints that other distributions of Linux might be offered sometime in the future. Oddly the Chromebook default Downloads directory does not appear in my /home/gene personal space. Instead it’s mounted at /mnt/chromeos/MyFiles/Downloads. To make this more convenient I immediately made a symlink to that from inside my personal workspace with:

 $ ln -s /mnt/chromeos/MyFiles/Downloads/ Downloads

At this point the system was ready to easily share files among the three operating systems.

I used the Debian Apt utility to update Linux and install certain pieces of software to try. Among my downloads were Gedit, Wordgrinder, Joe, Emacs, Pandoc, and LibreOffice. All worked well, though there was occasional background screen flashing when using Gedit. I experimented with writing a bash script but could not get the system to chmod my file to an executable, even using $ sudo chmod a+x filename. It appears that the basic ChromeOS file system is mounted with a ‘noexec’ flag and at this time I haven’t yet figured out if this can be changed. The good news is that the shell script can be run as $ bash scriptname.

I installed and tried out a couple of different standard Linux terminal programs, Gnome-terminal and Konsole, and unlike the default terminal they can be launched in multiple instances either in separate windows or in tabs. The default terminal can only handle one thing at a time and there are no tabs for additional instances. What it does have, however, are better looking fonts.

There are occasional glitches in the Linux subsystem. Once in awhile, if I’d switched between environments several times while using Linux, it would lose its pathing and respond with “command not found.” When I closed the terminal app and opened it again everything returned to normal.

At a user level, the Linux subsystem generally works well, but I wouldn’t try any development in the environment, at least not at this point in its evolution. All the Linux utilities I tried worked normally, including the many text utilities.

I gave the Linux subsystem a serious workout by installing LyX and all its TeX and LaTeX components. It took four tries. The subsystem crashed three times, once with a segmentation fault, requiring me to shut down and restart the entire Chromebook each time, but it picked up each time where it left off after the previous try. Eventually it finished and I was able to run LyX and preview a typeset document. Not bad, but the Linux subsystem is not yet what I’d call robust. At this point it’s best to think of it as Linux Lite.

Choosing the Best Writing Editor

As a writer who is also a techie I’ve usually eschewed word processors. I like working with text files because they’re non-proprietary and there are many good utilities that work with them, but, like writers everywhere, I often need to italicize the title of a book or movie or a record album and sometimes I want to boldface a word. I also want to put hyperlinks in my text that point to places on the Web. To handle this, in plain text, I use the excellent Markdown system of notation.

My go-to editor for the past couple of years has been iA Writer, which comes in Windows, Mac, Android, and iPad versions. It’s a text editor wrapped around Markdown, making it easy for writers to use, and it has a first-rate HTML export function built in. It’s uncluttered and has a focus mode and a night mode that allows the writer to concentrate on the writing rather than the writing environment. The Android version is similar enough to my Mac and iPad versions that I suspected it to be my editor of choice on the Chromebook.

I’m also addicted to Linux text editors and as long as I was setting up shop anew on the Chromebook, I gave them a spin, using them with Markdown. I tried a number of console editors, including the very basic word processor called Wordgrinder, Joe, which has WordStar/Borland style keyboard shortcuts, and my favourite console editor, Vim, with stands for Improved Vi. These all work flawlessly in the Linux subsystem, and they’re light on resources. Occasionally, when I’m feeling exceptionally brave, I dabble with Emacs.

On a whim, however, I decided to try Chromebook’s featured editor, which is Google Docs. I’d used Google Docs occasionally to store information, but I’d never taken it seriously as a writing tool. I was surprised at how much I liked it, not least because the fonts are excellent and easy on the eyes. I wrote a few paragraphs then tested its various export formats. All were very good except for one quirk when it saves output to a plain text file. In text files it puts two blank lines between paragraphs where I only put in one while I’m typing.

Not being too sure about Google Docs, I asked writers in the “Canada Writes” Facebook group if any of them used it and what they thought about it. I got back several replies from writers who say they use it nearly exclusively and have found it to be stable and excellent for all their writing, including client work. That was enough to convince me it was worth a try and this review is my first piece written in Docs. I suspect Google Docs will become my main editor.

Conclusion

In the short time I’ve owned the Lenovo Chromebook C330, it’s become my favourite writing machine for drafting stories. It’s also a pretty decent machine for listening to music or watching streaming video. To be honest, other than seeing that it works, I don’t make use the feature that allows me to fold the viewing screen back 180 degrees. I already own an iPad which I greatly prefer as a tablet.

For the most part, the Chromebook is a writing machine with the side benefits of being a very good web browser and Gmail viewer. I use the Linux terminal to run utilities on text files, and to SSH (encrypted remote login) to my other Linux and Mac computers.

It has met my expectations and then some. Overall I’d give it high marks in the bang-for-the-buck department. At $360 Cdn, it’s a bargain, and a writer’s delight.

Linux on Mac

Linux on Mac

By Gene Wilburn

linux-on-mac

My Macbook Air is now a dual-boot MacOS/Linux laptop. I’ve always wanted to run Linux on really nice hardware so I decided to try installing the Ubuntu 18.04 LTS release after setting aside half my SSD, using Mac’s Disk Utility program to format it as MS-DOS. (Linux reformats this to native Linux Ext4.)

I chose Ubuntu because of its excellent hardware support and, to my surprise, it installed trouble free, though it didn’t initially recognize the built-in wifi hardware of the Mac. To fix this I booted with a USB wifi adapter inserted and Ubuntu downloaded the Broadcom device driver I needed for the Mac. One reboot and I had a live, fully functioning system.

The installation didn’t ask me to try to put Grub into any kind of pre-boot partition, like MBR. To change from one OS to another, I simply hold the Option key down while booting and choose which OS to boot. In MacOS you can set the boot default and mine is set to default to Linux.

I’ve been a Linux user since 1993, starting out with Slackware on an old 386 PC, in character mode only. I’ve used many distributions since then, and I find things to like most of them, but I prefer the Debian-based distributions because of the robust .DEB packaging system. Ubuntu has been rock solid for me so it’s the one I put on the Mac.

There was one oddity. Neither Gnome3 (Ubuntu’s version), nor Cinnamon would recognize any kind of right-click emulation from the Mac’s trackpad. Mate worked just fine, but I’ve grown fond of Cinnamon and by setting its trackpad settings to “mouse emulation” the trackpad had left and right clicks located in the bottom-left and bottom-right corners, just the way I set them up in MacOS. The Mac trackpad worked almost as smoothly as it does under MacOS. I’ve never had much luck with Windows hardware trackpads and Linux so this was a nice surprise.

The greatest moment of acceptance came for me when I synchronized my Linux Dropbox client and it downloaded my photo files. I opened some of them with Gimp, which I already knew how to use, and Gimp looked really good on the Mac’s Retina display. This was a key finding. As a photographer who has used Photoshop for years, I found myself falling behind Adobe because I was sticking with my Photoshop CS6 package. Adobe’s ACR raw editor no longer supports the cameras I use and I’m just not even remotely tempted to buy in to Adobe’s rent-Photoshop-every-month-for-the-rest-of-your-life option. Photoshop is excellent, but so is Gimp, which costs nothing and stays up to date.

The main part of the Adobe package I’ll miss is Adobe Bridge because it could easily review and batch rename files with my custom naming convention. But last year I solved that too, by writing a Bash script to use Exiftool to extract the shot date and turn the result into my file naming convention.

So, hello Linux on Mac has meant goodbye Adobe. And anyway, I can do fine tuning of photos in Snapseed on my iPad.

The final adjustment I needed was a way to easily enter occasional French accented characters from the keyboard. When you live in Canada, it’s common to want to write something like Trois Rivières in accented fashion, to respect the French spelling. MacOS handles this brilliantly but I couldn’t find any Linux keystrokes that worked like a language Compose key.

I found an app called “Characters” that is simply a character map for different languages. It was awkward to use so I did some Googling and discovered that there’s a deeply-buried option in the keyboard settings that allows you to assign a Compose key. I took the default Right-Alt key, better known as Right-Option on the Mac.

It works just as expected. If you hold down Compose and type a backtick(` ) then a vowel, you get à, è, ì, ò, ù. Same for the other accents. Perfect for when the need is occasional. If I were typing a lot of French I’d switch over to a French keyboard layout, but my use is casual.

As mentioned, I use Dropbox to coordinate my files between Linux, MacOS, and iOS machines. It’s also my most immediate backup.

The rest is pretty standard. I use Firefox as my browser, just as I do under MacOS, and I use the browser version of Gmail so I don’t have to fiddle with email client programs. Besides, I’ve never liked Thunderbird.

For writing, the activity I do the most, I use Gedit, a basic text editor that comes with most Linux distros. It has useful plugins, like one for Markdown support. All my writing files are in plain text, marked up with bits of Markdown when I need italics, bold, or some minor formatting like indented passages. I use Pandoc to convert my Markdown files into HTML files when needed.

I tried using Emacs to write with, but as much as I admire it, I don’t care for it as a writing tool. Besides, its line oriented text files don’t mesh well with my Mac editors, which are paragraph oriented. Gedit works perfectly for my needs, including inline spell checking.

Occasionally I do some programming and lately I’ve been studying a little C++. I could do this on MacOS too, but open-source languages feel more at home in Linux, more complete and up to date. Apple keeps its own development tools up to date, but lags behind on open-source releases like the gcc compiler, Perl, Python, and the rest.

I originally thought I’d pop into MacOS more often — don’t get me wrong, MacOS is an elegant and very modern operating system (far superior to Windows in my opinion) — but now that I’ve eliminated Adobe from my life, there’s not much that’s available for the Mac that I don’t already have an equivalent for in Linux. As a result, the only time I find myself booting into MacOS is when I want to update it, to keep it current.

Linux on Mac is one of the nicest surprises I’ve had this year. While nothing is perfect, this is as close to perfection as I’ve yet experienced.

Linux on Mac — an elegant way to run Linux for the technically inclined.

Why Use Linux?

Why Use Linux?

By Gene Wilburn

I’m astonished at how seldom anyone asks me “Why use Linux?” It’s as if, outside the realm of computer techies, Linux is unknown or feared. So let me start with an introduction.

Think of your computing device operating system as a vehicle of transit, say a car that takes you to where you want to go. Now think Smart Car. Now think driverless Smart Car where you simply sit inside and tell Siri, or James, or Hobnob where to take you. This is the model of modern operating systems, especially those for tablets, such as iOS from Apple and Android from everyone else except Microsoft. They are attempts to make your trip devoid of challenges or problems and both Windows 10 and MacOS try to do this, not entirely successfully. The design goal of user friendliness and ease of use is good, but it’s only one way of looking at operating systems. The problem with this model is that some of us like to do our own driving, and we like a standard gear shift so we can control the ride ourselves. If you’re like this, then there some things about Linux that might appeal to you.

The standard way to introduce Linux is to say something like “Linux, or GNU/Linux as it’s sometimes known, is a multiuser, multitasking operating system that runs on a broad variety of Intel and AMD processors.” That’s a mouthful and it doesn’t do much to tell you what Linux is. So, think DOS, or if you back go far enough, CP/M. You got around and did work by typing commands directly into your computer. Before Windows (and Mac and OS/2) that’s how you communicated with your computer and launched programs. Like driving a stick shift.

Now, lest I misrepresent it, Linux too has a graphical, windowed interface — several of them to choose from actually — and they’re very nice and modern and you can set up a Linux computer for a non-techie and they can work it just fine that way. I use it that way myself most of the time. But the real draw of Linux lies under the hood, or behind the command line prompt, which is usually a plain, little dollar sign: $. From here you can do just about anything, including driving yourself into a brick wall at high speed, if you’re not careful. But then, you’re a careful driver, right? And behind that dollar sign lies a computer techie’s dream.

So what’s so special about Linux, then? Two things: it’s based on Unix, and it’s free.

Unix

Linux derives, ultimately, from Unix, an operating system that emerged from the Bell Labs in New Jersey and launched on January 1, 19701. Unix pioneered many of the modern operating system concepts, like hierarchical directories, utilities that did one thing, and one thing well, and a way to string the utilities together using pipes and redirection. You may remember DOS commands such as mkdir for “make a directory” (today most people call them “folders”) and cd for “change directory.” These commands were “borrowed” from Unix but were a pale imitation of the real deal.

Furthermore, Unix was the proving ground for the mouse, the graphical interface (before the Macintosh), and before that, and more importantly, the Internet. Email was invented and standardized in Unix, as was the TCP/IP network protocol that the Internet runs on. The Web was invented on Unix too. To put it mildly, Unix has been a foundational technology in the history of computing. The problem with Unix was that it only ran on mainframes and minicomputers, as shared multiuser systems. The techie’s dream was to have a personal Unix that could run on an inexpensive Intel and AMD PCs. But Unix required expensive licensing and was not built for the Intel architecture.

FSF, GNU, and BSD

There were three or four projects that were begun in the hopes of creating a free Unix workalike, free from licensing fees, and free from corporate rule. An influential programmer, Richard Stallman, set up a project to recreate all the Unix utilities with no reference to the original source code so it could be used and legally distributed for free. He called it the Free Software Foundation (FSF) and later, GNU (GNU’s not Unix — a recursive acronym). GNU was delaying building a kernel (or auto engine) for the last piece of work.

Meanwhile another group was striving to release a BSD (Berkeley Systems Division) Unix derivative using both the GNU and the Berkeley utilities to create a Unix-like OS for the Intel 386 processor. They actually did a smashing job at this, but ran into a licensing dispute with the University of California, Berkeley, about free distribution. FreeBSD, as it came to be called, was, and still is, an excellent Unix-like OS and if they hadn’t been forced to hold back until the dispute was settled, I might now be advocating FreeBSD instead of Linux. Unfortunately, it missed its prime window of opportunity. Nonetheless, there are a lot of web sites today running on FreeBSD which is admired for its dependability and stability.

Linux

But fate intervened, and a young computer science student in Helsinki, Finland — Linus Torvalds — took another project called MINIX (an experimental Unix-like OS for the Intel 286) and started rewriting the kernel to work on the 386, the first genuinely 32-bit CPU from Intel. To say the least, he succeeded, then he and his colleagues around the world added the GNU Unix utilities and his friends dubbed the package “Linux” in his honour. Linus is still the head of Linux kernel development, though he now does it from sunny Silicon Valley.

The early days of Linux were typified mostly by character-based consoles, like logging in to a PDP-11 Unix computer except right on your own PC. There were several “Linux distributions” (flavours) like Slackware (still available), Debian (still available and the progenitor of all the Ubuntu distributions), Red Hat (before it went commercial), Caldera (no longer with us), and SUSE (still popular in Europe). In addition the “little Linuxes” began to appear—distributions like Damned Small Linux that ran on minimal or even embedded systems.

As Intel processors became faster and more powerful, Linux added windowing interfaces based on another free project, the X Window Consortium. From this sprang most of the modern Linux graphical interfaces that have names like Gnome3, Mate, Cinnamon, KDE, IceWM — there are literally a few dozen graphical interfaces to choose from, some of which are designed to run on minimal (e.g., old) hardware.

Because it was developed for the PC, Linux quickly acquired device drivers for most of the peripherals of the day: network cards, printers, faxes, external hard disks, scanners, mice, trackpads, speakers, and, more recently, Bluetooth and WiFi adapters. In other words Linux had all the joy of Unix plus all the practicality of a personal computer. A personal Unix. What is most notable about all of this is that it is the result of programmers who cared enough to devote their free time to working on Linux drivers and other free software projects. This was the birth of what is now called the Open Source model.

ASCII (Text) Files

I think it’s fair to say that no other operating system uses ASCII2, or text, files to the extent that Linux/Unix does. Perhaps you remember the early days of DOS and Windows when you might have an autoexec.bat and a config.sys file in your boot directory to customize your system for your use when you started your PC. And when Windows programs frequently had a corresponding .ini text initialization file to create a profile for how a Windows program should start and run.

This is the Unix style, and Linux is set up with all manner of text files that instruct the system how to boot and what to run when it does. And many programs, such as the vi or emacs editors have startup files that are “hidden” files with names like .vimrc or .emacs. The dot at the beginning of the file name makes them invisible unless you invoke a list command that displays them, e.g. ls -a.

The beauty of ASCII files is that they are easily readable, easily edited, and, perhaps as importantly, easily searched. Linux/Unix has excellent, time-honoured facilities for searching text files either for file name or contents. Linux editors abound, from the traditional vi and emacs editors to simple editors like nano or writing-oriented editors like Focus Writer. There’s an editor for any style or personality. Many are oriented to programming, with syntax colouring and parenthesis, brace, and bracket matching to assist programmers, but there are authors who use these editors for writing articles and books. The SF author Neal Stephenson, for instance, mentioned in an interview that he uses Emacs on Linux for all his writing and I believe I’ve heard that Cory Doctorow uses Emacs as well.

Linux currently sports a sophisticated office suite called Libre Office (also available for Windows and Mac), but the true heart of Linux lies in its text files. For things like advanced formatting of print material, PDFs, or ebooks, the traditional Unix approach has been to put instructions on what to do right inside the text file, totally visible with nothing hidden. Think permanent Reveal Codes if you recall WordPerfect 5 for DOS. This is called a markup scheme, and is used for traditional typesetting programs such as troff or LaTeX. This has also led to the development of a simple writer’s markup scheme called Markdown and is the scheme I use for all my writing, including this essay3.

When your files are text files, some things become much easy to do in Linux. For instance, to keep my essay writing in some semblance of order, I internally title my essays as Essay001.md, Essay002.md, Essay003.md, etc. (.md for Markdown) and to see what they’re about I know that each essay has a title line as its first line. To get a snapshot of my work I can use the Linux utility head that shows only the first x lines of a file, 10 by default. (There is a corresponding tail command.) I only need one line, so my command in my Essay directory is:

$ head -1 Essay*.md

Which produces:

==> Essay001.md <== 
# Paradoxes and Temporal Displacement

==> Essay002.md <== 
# Flowers from Algernon

==> Essay003.md <== 
# Where's Walden?

==> Essay004.md <== 
# A Musical Interlude

==> Essay005.md <== 
# Whatever Happened to Ecology?

==> Essay006.md <== 
# Of Melancholy I Sing

[etc.]

Slick, no? It’s a trivial example of what you can do from the command line, but it illustrates the principle of Linux tool use. It starts out with, hey, I’ve got a problem to solve. How do I see the first line of all my essay files? Then I think about what tools are available. Well, head should be able to do that and a quick check on the manual (man) page tells me how to limit the display to one line. This is a form of computing, using the tools for something you want to solve.

There’s much more I could do with my essay files from the command line. Using sed (stream editor) I could make global changes to all the files with one command, say substituting the word real for actual, for example, or removing the spaces around em-dashes. If I were a novelist, I could change a character’s name globally if I decided to rename a character after several chapters into the work. There is nearly always a solution, often more than one, to solve a problem. Of course you need to know what the tools can do before you will think of using them, but that comes with the territory of learning the environment, and if you’re technically inclined, it’ a fun study.

Development Tools

Linux is also the home of server applications, such as Postfix for an email server, Apache or Nginx for a web server, not to mention database servers, repository servers, FTP servers, firewalls, and the like. You can create a test website on a Linux box then test it from other PCs and tablets on your home network before committing your work to a live, external web server. Want to work with a content server like WordPress? You can set this up to work in your Apache web server and get to know it and its plugins and do your testing locally rather than risk fiddling with a live website. Linux is a web developer’s friend.

But the jewels in the crown are the programming environments Linux provides, from the amazingly able Bash shell and interpreted scripting languages such as Perl and Python all of which are normally a part of every distribution. To that you can easily add C, C++, Java, LISP, Haskell, and any of a few dozen specialty languages. Naturally this might not appeal to a casual user, but think kids. The more exposure to Linux and its programming environments they get, the more prepared they will be to pursue technical training and study.

Scalable Knowledge

One of the side benefits to learning Linux is that you can log into just about any Unix or Unix-like computer on the planet and feel at home with the environment. This includes machines as tiny as a Raspberry Pi that might be used in a robotic installation, or a supercomputer cluster at a research centre. A survey in 2017 indicated that the top 15 supercomputers in the world were all Linux clusters. Most of the Cloud is based on Linux as well. You can switch easily between your personal Linux PC and a remote console for a Linux system located in Amazon Web Services (AWS) or another cloud provider.

And if you should end up working in the financial sector, as I did for a few years, you’re already right at home in IBM AIX, HP/UX, and Solaris systems that might be operating as Oracle servers. In other words, Linux knowledge is extensible and scalable — you only need to learn the basics once and you’re set for life. Command-line knowledge is stable and enduring.

Rescuing Old PCs

Most of us enjoy using the latest and fastest computers we can acquire and, in an age of graphical programs and the increased demand they make on resources, fast and powerful is good. However, in a text oriented environment, say writing, you don’t really need all that speed and power. The world is full of abandoned PCs and laptops that have quite a bit of life in them if turned into Linux machines.

For instance, I rescued a Dell Mini system with an Atom processor this year. It only has 1GB of memory and a slow HD, but it’s a nice little portable unit for a writer, and a great system for a kid to learn Python on. While most of the major distributions of Linux run best on fast gear, there are distributions created specifically for machines with fewer resources. On the Dell Mini I installed Xubuntu, a stripped-down, lightweight version of the popular Ubuntu Linux distribution. The Mini runs surprisingly well on it. Another friend had a low-resource laptop that was totally swamped by Windows 10, so I installed Lubuntu on it, an even lighter version of Ubuntu and it fuctions well as a browser for the Internet and it runs Libre Office well enough for occasional use.

Even if you’re not a writer, you can use a rescue PC to serve as a music and multimedia server for the house. Or, of course, a development web server. Or just as a machine for learning about computing, from the command line up.

Modern Applications

What I’ve sketched out here in very brief detail is the use of Linux as a traditional Unix box, with command-line richness and tools galore. For a tech-savvy person, this aspect of Linux is like owning a filled treasure chest. But there are also many modern, graphical open-source programs, or applications, available, from sound recording to animation to photo editing. They’re often not quite as slick as the commercial programs available for Mac or Windows, but they’re free of cost and you’re free (that is, it’s legal) to share them with others. These applications tend to be very good, with constant updates and improvements. Above all, Linux gives you choices. If you don’t want to pay Adobe $10US a month to use the current versions of Photoshop and Lightroom, you can use the free Gimp or Darktable apps that provide at least 80% of the same functionality, if not more.

Here’s maybe a surprise. If you’re not an Apple or Windows camp follower, you may already be using Linux without even realizing it. The Android operating system for smartphones and tablets is a Linux variant. If you have a Roku or similar device, it’s probably running Linux under the hood. The same goes for your router. Embedded Linux is widely used in commercial products. Linux may be used in your fridge, your car, or your TV set.

So let me conclude by saying that there are many reasons for wanting to use Linux, though I’ll be the first to admit it’s a best fit for people with a technical bent. If you’re so inclined, you’ll find it puts the computing back into computing. And I’m just geeky enough to think that it’s way more fun than Windows or even MacOS4. And did I mention? It’s free.


  1. uppercase UNIX is a trademark name. The computer industry usually uses the spelling Unix to include both UNIX and all UNIX-workalike operating systems such as HP/UX, Solaris, AIX, FreeBSD, Linux, etc.
  2. ASCII is short for American Standard Code for Information Interchange. Today it’s more accurate to say UTF8 as part of Unicode encoding but it doesn’t come as trippingly on the tongue.
  3. If you’d like to know more about using Markdown, I have written a free small e-monograph on the subject called Markdown for Writers.
  4. Technically, MacOS is a BSD Unix derivative OS but has been modified in untraditional ways by Apple. It’s still a Unix system at the command prompt, but is never as up to date on utilities as Linux or FreeBSD.

 

Linux on a Mac (I’m Back)

Ubuntu Linux on a Mac//embedr.flickr.com/assets/client-code.js

Here it is, almost fall, and I find myself missing the chance to jot some notes and observances into Silver Bullets. So, I’m back, and to start off with I’ll tell you what I did this summer.

My main tech project was to set up a new Linux server for testing some web pages Marion and I have been working on. We wanted to test out various options of setting up a WordPress site, including experimenting with different WordPress themes, without doing so in a live environment.

My friend, Mark Dornfeld, mentioned that he’d had good luck with Oracle’s VirtualBox on his Mac in terms of hosting Windows, so I thought I’d look into VB as a Linux host on my Mac Mini, primarily because the Mac Mini has 16GB of RAM and plenty of disk space.

So, installing VirtualBox was easy. I planned to install the desktop version of Ubuntu Linux and work up the server elements: Apache, MySQL, PHP, and WordPress. Unfortunately I hit a glitch with screen resolution. The instance of Linux sensed a 1024 screen but only gave me a 640×480 window to view it in. I couldn’t even scroll to the buttons of the graphical interface.

So, I came in the back door. I blew away the desktop installation and installed Ubuntu Linux Server in its place, turning into a LAMP (Linux-Apache-MySQL-PHP) server with only a character console. I then added back the graphical interface with

$ sudo apt-get ubuntu-desktop

Voila! A nice 1024 screen with everything working. It fits nicely on the Mac Mini’s new 27″ Dell monitor.

Next, getting WordPress installed and tested. That proved straightforward. We’re now testing out a new website for Marion’s art and genealogy.

Other than that, it’s been a quiet summer packed with a lot of reading and a touch of writing, but very little photography. Oh, and I turned 70. That was a bit sobering.