Linux on the Desktop

I have been a fan of Linux for a very long time. I started running it in the late 90s while working at several ISPs in The Netherlands. Back then I would get some floppy's with Slackware on it from a local store and spend nights installing and tinkering with it.

Times have changed and I have run Arch Linux on my macbook pro and last year I bought a big fricken desktop to do my heavy lifting. I have run Linux on it from the very beginning.

I recently switched to Pop!OS, the Linux distribution created by System76. I am considering buying one of their laptops and it (obviously) comes preinstalled with Pop!_OS. Up to now I had been running Linux Mint, but I have had some issues with tearing on the screen since the start. This is most likely due to the NVidia driver, but as Linux Mint aims for stability the updates to it are far and between. Pop!_OS, on the other hand, is very up to date. Their own hardware uses these drivers, so they are invested in making it work the best they can.

When I switched from Linux Mint to Pop!_OS I started taking detailed notes on my experience and all the packages I needed since installing it.

Info

This list is a work in progress. I made the switch on March 14th 2019, so lots of tweaks will probably still need to happen.

Emacs

I require Emacs 26.1 or higher. This version is not in the default repositories. Luckily Kevin Kelley has some great packages up on the Ubuntu launchpad. We will add the repository and install the package.

apt-add-repository ppa:kelleyk/emacs
apt install emacs26

If you follow the things I do with Emacs, you will know I use mu4e for my email. This requires some additional packages as well.

apt install -y maildir-utils mu4e isync w3m

As all the passwords are secured using GPG on the file system we need to instapp gnupg2. This package is in sync with what is installed on my mac, so the same configuration works on both.

apt install -y gnupg2

I use the Hack font. It is available in the repositories, so a quick apt install and it is ready to be used.

apt install -y fonts-hack

Only thing left to do is to load up my configuration and let it install all the elpa packages.

Right here I have all the things setup to be productive on a machine. The rest is specific work that I do on projects (Programming, Writing, etc).

The Z Shell

I use the ZSH shell as my default shell. It does not install by default, so you need to get it from the repositories.

apt install -y zsh

An excellent base configuration can be found in oh-my-zsh. To install it grab the installer and execute it. Remember to always read the script before doing this!.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

A plugin that I love is the auto suggestions. It basically completes commands based on your history and that is ideal for someone who does a lot of work in the terminal.

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

In the end my basic ZSH config looks like this.

# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"

# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git zsh-autosuggestions)

source $ZSH/oh-my-zsh.sh

Password manager

A password manager is an essential piece of gear. If you are not using one we should really have a talk. I use Enpass to keep my passwords save.

The website has some copy/paste instructions and it is installed.

echo "deb https://apt.enpass.io/ stable main" > \
  /etc/apt/sources.list.d/enpass.list
wget -O - https://apt.enpass.io/keys/enpass-linux.key | \
  apt-key add -
apt update
apt install -y enpass

I sync between devices using a WebDav shared folder. So all that is left to do is to create an App password for this instance and I have full access to all my passwords again.

Gaming

Of course Steam needs to be installed for the games. The catalog of Linux games is becoming huge, and my kid (and I) like to play games.

apt install -y steam

GNOME extras

Pop!_OS has a GNOME 3 desktop. I think it is already awesome in itself, but it misses some things. One thing I need is the tray icons. I can not interact with my webdav sync tool otherwise, and Enpass also lives there.

GNOME has the concept of Extensions to make the GNOME Shell "better". In order to use extensions a tool called Tweaks is required.

apt install -y gnome-tweaks

Now you can head off to the Extension Gallery and install TopIcons Redux to get the tray icons back.

Cloud

My main cloud is Stack. This is a product by a Dutch service provider. They had to renew a whole lot of hardware one day and thought "What shall we do with all the old stuff?". They tried to make cloud hosting of NextCloud/OwnCloud instances and it paid off big time. I am a huge fan.

apt install -y owncloud-client

And then there is Dropbox. It is the only cloud sync for the Orgzly android app that I use for my org-mode notes (so basically my entire digital brain).

apt install -y python-gpg
dpkg -i dropbox_2019.01.31_amd64.deb
apt --fix-broken install -y

Yubikey

No installation is complete without my Yubikey. I use it for all my One Time Passwords and other authentication methods. The desktop app provides access to the OTPs on the device from the comfort of a desktop application..

apt install -y yubioath-desktop

Miscellaneous tools

The rclone tool enables easy syncing of files over various protocols. I use it to sync my NAS with my cloud storage.

apt install -y rclone

I have an IODD external disk that I use during classes. It uses exFat (for the Windows kids), which is not available by default.

apt install -y exfat-fuse

Development tools

I will have to go ahead install the various development tools I use. Currently I am working on Java projects, so here comes JDK 11 (OpenJDK edition).

apt install openjdk-11-jdk

Fixing permissions

Sadly, copying data from exFat to Linux messes up the permissions. A quick find one-liner solves that.

find . -type d -print0 | xargs -0 chmod 0775
find . -type f -print0 | xargs -0 chmod 0664