Browse Source

Updated «What's to Like About Linux»

main
Kenneth John Odle 10 months ago
parent
commit
e118528a3d
  1. 79
      003/codex-003.tex

79
003/codex-003.tex

@ -81,6 +81,11 @@
% Use line numbers with code samples
% \begin{Verbatim}...\end{Verbatim} <-- Note the capitalization!
\usepackage{fancyvrb}
% Break lines inside this environment:
\usepackage{fvextra}
% Control spacing in lists
\usepackage{enumitem}
\raggedbottom
@ -355,6 +360,8 @@ We'll look at each of those two things in turn. But first, read the back cover a
\noindent{}Let's start with point \#1.
\subsection{Open Source Software is Available for Free}
\medskip
The two main commercial alternatives to Linux are macOS (Apple) and Windows (Microsoft).
@ -404,7 +411,77 @@ And this is what Windows does. It gathers your data and ``shares'' it with other
\end{multicols}
So, Windows may appear to be low-cost or even free when you buy that new computer, but it does have a cost—your privacy. And because advertisers use some pretty sophisticated techniques to get you to buy their stuff, there is an additional cost—your ability to truly choose for yourself.
Windows may appear to be low-cost or even free when you buy that new computer, but it does have a cost—your privacy. And because advertisers use some pretty sophisticated techniques to get you to buy their stuff, there is an additional cost—your ability to truly choose for yourself.
Which brings us to point \#2.
\subsection{You Can Alter the Source Code}
This is really the greatest thing about open source projects: if you find something you don't like, you can change it. For example, if I want to change something about Linux, I can head over to \href{https://github.com/torvalds/linux}{\texttt{https://github.com/torvalds/linux}} and either become a contributor or \textit{fork} the software and create my own version.
That's a huge advantage, because it is not something that you can do with either Windows or macOS. But it comes with a huge price tag: you have to know how to write code.
That phrase---``write code''---covers a \textit{lot} of territory, because there are a lot of different programming and scripting languages and just because you know one does not know that you know the rest, although people will often think that you do.\footnotemark{} Knowing one does not mean that you know all of them, just the same way that learning Spanish does not mean that you now automatically know Urdu or Mandarin or even Italian. It takes time to learn the basics, it takes more time to become proficient, and it takes even more time to understand the code structure of the project you are looking at.
\footnotetext{A long time ago I was a contributor to a theme for WordPress and worked as a (volunteer) moderator on its forum. Somebody wrote a post to complain that something he had attempted was not working the way he wanted it to and could we please fix it because, as he said ``I'm sure it's just a coding thing'', to which my (internal) reply was ``Dude, if it's just a `coding thing' then \textit{you} figure it out''. His implication was that we basically have a magic button that does things instantly, and we just sit around the rest of the time drinking coffee. The coffee thing (or any caffeinated beverage, really) \textit{is} true, but the sitting around thing and the magic button thing are definitely \textit{not} true.}
So yes, there is a price, but if you decide to pay it, it has the additional benefit of making you more knowledgeable than you were before. Learning to code anything, even something as simple and straightforward as basic \texttt{html}, requires that you think logically and systematically about what you want to achieve and that you develop a systematic way of solving problems. Because, yes, nothing ever just works the first time you use it (if I had a dollar for every error message I've ever received while using LaTeX, I could probably afford to take a year off of work) and a \textit{systematic} method for diagnosing and solving problems is a lot more efficient than just guessing.
\subsubsection{A side note:} An optional benefit if you learn to write some code is that you can---and should---learn a revision control system, which will keep track of your changes and let you go back to an earlier version if you \textit{really} screw something up, which you are bound to do at some point because really screwing something up is part of the learning process. I like and use \texttt{git}, which is included in the Ubuntu default repositories, but others such as \texttt{mercurial} and \texttt{bazaar} are also available. I like \texttt{git} because it's what I've worked with the longest and know fairly well, but that doesn't make it the best one; it's just the best one for me. They all have their advantages and disadvantages, and the point is not to find the perfect one, but to find one that will meet your needs. Once you do, you'll wonder how you ever got along without it.
\section{Containerization}
Thanks to the Unix Principle, a Linux-based operating system is not one big piece of software, but rather, consists of a number of smaller software packages that work together (more or less). That means that if you don't like the way something behaves and you can get it to do what you want it to do through its preferences, you can often replace it.
For example, I became unhappy with Nautilus, the default file manager in Ubuntu. (The file manager is what you see when you open a folder on the desktop.) There wasn't anything particularly wrong with it---it just lacked a lot of features that I wished it had. Sure, I could learn to code my own file manager, or I could attempt to contribute\footnote{Sometimes open source projects become so large that they are difficult to contribute to---the equivalent of banks being ``too big to fail''. Unless you are one of TPTB in the project, chances are you you won't be able to make the kinds of changes you want to. But I have enough experience with this (I'm looking at you, WordPress) for a longish article or a shortish book, and I don't want to spend too much time here discussing it. Just know that it's a thing that happens.} to the Ubuntu source code and get Nautilus to behave close to what I was envisioning, but I didn't need to because there was already a file manager available that did what I wanted---Nemo.
Nemo is actually a fork of Nautilus (version 3.4, I believe) and includes a lot of features that were removed from Nautilus. It was developed as part of the Cinnamon desktop for Linux Mint, which was itself a fork from Ubuntu. Did I mention that Ubuntu is a fork from Debian? Yeah, open source family trees get pretty complicated pretty fast.
It turns out that installing Nemo and making it the default file manager is fairly simple. These are the commands you need:
\begin{Verbatim}[frame=lines,label=Enter each line separately, numbers=left, baselinestretch=1.2, breaklines=true]
sudo apt install nemo -y
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true
\end{Verbatim}
\noindent{}What each line of this code does:
\begin{enumerate}[noitemsep]
\item Installs Nemo (the \texttt{-y} flag automatically answers ``yes'' to any questions you get)
\item Makes Nemo the default file manager in Ubuntu
\item Disables the handling of the desktop by Nautilus
\item Enables the handling of the desktop by Nautilus
\end{enumerate}
\noindent Removal is the opposite of installation:
\begin{Verbatim}[frame=lines,label=Enter each line separately, numbers=left, baselinestretch=1.2, breaklines=true]
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons true
sudo apt purge nemo nemo*
sudo apt autoremove
\end{Verbatim}
\begin{enumerate}[noitemsep]
\item Makes Nautilus the default again
\item Enable Nautilus to draw desktop icons
\item Uninstalls Nemo
\item Removes any dependencies used only by Nemo
\end{enumerate}
\noindent{} As it turns out, this method allows an extremely high degree of customization while knowing very minimal code. It is possible, of course, to type that code in wrong and complete screw something up, so it's good to double-check what you enter into the terminal. The terminal is extremely literal---it doesn't make guesses about what it thinks you meant to do (which is one of the reasons I find working with Microsoft Office such a miserable experience at times), it just does whatever you tell it.
\subsubsection{An old joke that describes how the terminal thinks}
\begin{quote}
\textit{A woman sends her computer programmer husband to the store to buy a gallon of milk. On his way out the door, she adds ``If they have eggs, pick up a dozen''. The store had eggs, so naturally, he came home with a dozen gallons of milk.}
\end{quote}
The joke, of course, arises from the fact that she never changed the object of the verb ``pick up''. What she should have said was ``If they have eggs, pick up a dozen eggs, also''.
Yes, this is how computers ``think''.
\chapter{Coda}

Loading…
Cancel
Save