Ubuntu 19.04

Update system

apt update && apt upgrade && apt dist-upgrade

apt install unattended-upgrades apt-transport-https && dpkg-reconfigure unattended-upgrades

Firefox

Install the 1Password X Firefox addon and login.

Next, signin to Firefox Sync.

Go into the Firefox preferences. Under General and Browsing, select Use autoscrolling (or set general.autoScroll to true in about:config).

Note for the future: If scrolling becomes laggy, try this solution.

Configure the following settings in about:config:

Setup environment

Get rid of the Amazon integration by running: apt purge ubuntu-web-launchers

Shell

apt install zsh

Then run the following both as root and user:

wget -O ~/.zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc && wget -O ~/.zshrc.local https://git.grml.org/f/grml-etc-core/etc/skel/.zshrc && chsh -s /bin/zsh

In the Terminal, go to Edit and Preferences. Under the unnamed profile and the Command tab, check Run a custom command instead of my shell and enter /bin/zsh.

Gnome

  • Switch the Alt-Tab view: Go into the Keyboard preferences and change the Switch windows option to Alt + Tab. Further set Switch applications to Super + Tab.
  • Install the Gnome Tweak Tool: apt install gnome-tweak-tool
  • In the Gnome Tweak Tool, under Top Bar, select Weekday, Seconds, and Week Numbers. Under Windows, deselect Attach Modal Dialogs. Under Workspaces, select Workspaces om primary display only. :(
  • Disable the dock: gsettings set org.gnome.shell.extensions.dash-to-dock autohide false && gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed false && gsettings set org.gnome.shell.extensions.dash-to-dock intellihide false
  • In the settings dialog, under Devices and Mouse & Touchpad, select Natural Scrolling and bump the Mouse Speed to the maximum value. Under Search, disable Passwords and Keys and Ubuntu Software. Under Devices and Displays, enable Night Light. Under Privacy and Usage & History, disable Recently Used.
  • In the gedit preferences, under View, select Display line numbers, Highlight current line and Highlight matching brackets. Under Editor, set the Tab width to 4 and select Insert spaces instead of tabs and Enable automatic indentation. Under Fonts & Colors, select Solarized Dark as the Color Scheme. Under Plugins, enable Quick Highlight.

GPG

Mitigate SKS key server problems:

  1. In ~/.gnupg/gpg.conf, ensure there is no line starting with keyserver. If there is, remove it.
  2. Add the line keyserver hkps://keys.openpgp.org to the end of ~/.gnupg/dirmngr.conf.

TODO: Investigate parcimonie.sh.

SSH

Generate an SSH key using ssh-keygen -o -a 100 -t ed25519 (see here). Upload the corresponding public key to: GitLab, GitHub

Import the SSH key from Seafile.

Install the SSH server: apt install openssh-server and set the following directives in /etc/ssh/sshd_config:

PermitRootLogin no
PasswordAuthentication no
UseDNS no

In /etc/ssh/ssh_config, comment out the following directive to disable forwarding the locale to remote servers:

#   SendEnv LANG LC_*

and disable known_hosts hashing:

HashKnownHosts no

Then, restart the SSH server: service ssh restart

Gnome extensions

Install the Firefox addon and make sure the shell integration is installed: apt install chrome-gnome-shell

Install the following extensions:

Configure Dash to Panel as follows: Under Position and Multi-monitor options, enable Isolate monitors and disable Display favorite applications on all monitors. Under Style, set the Panel Size to 40. Under Behavior, disable Show favorite applications, disable Show Applications button, enable Isolate Workspaces and enable Ungroup applications. Under the Window preview options, set Time (ms) before showing to 1000. Under Fine-Tune, disable Animate switching applications and Animate launching new windows and enable Activate panel menu buttons (e.g. date menu) on click only. These settings can also be imported from the file configs/dash-to-panel.

Gnome theme

In the Gnome Tweak Tool, under Appearance, select Adwaita-dark for Applications and Yaru for all other theme options.

In a terminal, go into Edit and Preferences. Under the unnamed profile and Colors, uncheck Use colors from system theme and select Tango Dark under Built-in schemes.

Maybe consider also styling QT in the future.

Install software

Essential

dpkg --add-architecture i386

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list
add-apt-repository ppa:stebbins/handbrake-releases
curl https://build.opensuse.org/projects/home:manuelschneid3r/public_key | apt-key add -
echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.10/ /' > /etc/apt/sources.list.d/home:manuelschneid3r.list
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | apt-key add -
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
echo "deb https://download.virtualbox.org/virtualbox/debian disco contrib" | tee /etc/apt/sources.list.d/virtualbox.list
curl -s https://syncthing.net/release-key.txt | apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | tee /etc/apt/sources.list.d/syncthing.list
add-apt-repository ppa:bit-team/stable
apt update

apt install curl telegram-desktop vlc sublime-text audacity gimp inkscape flatpak xdg-desktop-portal xdg-desktop-portal-gtk ffmpeg handbrake-gtk gnome-boxes virtualbox-6.0 albert units gparted nodejs yarn imagemagick pandoc wireshark gnome-sushi nfs-common wngerman syncthing build-essential backintime-qt4 whois
apt install --install-recommends winehq-stable winetricks
snap install spotify whatsdesk
snap install hugo --channel=extended
snap install skype --classic
flatpak install flathub org.gnome.FeedReader
yarn global add tldr

curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl

Optional

add-apt-repository ppa:sebastian-stenzel/cryptomator
add-apt-repository ppa:x2go/stable
add-apt-repository ppa:unit193/encryption
add-apt-repository ppa:peek-developers/stable
apt update

apt install keepassxc cryptomator blender x2goclient chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra mediathekview binwalk hashcat steam peek qtcreator qt5-default
apt install texlive texlive-lang-german texlive-latex-extra texlive-generic-extra latexmk texlive-xetex
snap install insomnia veracrypt
flatpak install --from https://tabos.gitlab.io/project/rogerrouter/roger.flatpakref

lpadmin -p Roger-Router-Fax -m drv:///sample.drv/generic.ppd -v socket://localhost:9100/ -E -o PageSize=A4

Backups

Back In Time

TODO: Currently not in use.

Run Back In Time as root. Under General, set Where to save snapshots to /mnt/backintime and set the schedule to Repeatedly (anachron) and every hour. Under Include, add /. Under Auto-remove, enable Smart remove with the default settings.

Vorta

TODO: Backup to backup1 using Vorta.

Syncthing

TODO: Syncthing is currently not in use.

Set Syncthing to start automatically:

mkdir -p ~/.config/systemd/user
wget https://raw.githubusercontent.com/syncthing/syncthing/master/etc/linux-systemd/user/syncthing.service -O ~/.config/systemd/user/syncthing.service
systemctl --user enable syncthing.service
systemctl --user start syncthing.service

Increase the inotify limit: echo "fs.inotify.max_user_watches=204800" | tee -a /etc/sysctl.conf

The web UI is then available at http://127.0.0.1:8384/.