Debian Configuration

This post covers the configuration of the Debian operating system.

What is Debian?

Debian GNU/Linux is a free operating system, developed by thousands of volunteers from around the world who collaborate via the Internet.

Debian’s dedication to free software, its volunteer base, its non-commercial nature, and its open development model distinguish it from other GNU operating system distributions1.

Add Wi-Fi and NVIDIA Drivers

Running the following commands will log in as root and add the repositories needed to install drivers not included in the fully free repositories:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Log in as root
su -

# Install vim
apt install -y vim

# Add contrib and non-free reopositories
## Edit /etc/apt/sources.list
vim /etc/apt/sources.list

## Add contrib and non-free at the end
deb http://mirror.librelabucm.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://mirror.librelabucm.org/debian/ buster-updates main contrib non-free

# Add non-free drivers for WiFi
apt install -y firmware-iwlwifi firmware-atheros firmware-misc-nonfree firmware-intelwimax firmware-realtek firmware-linux firmware-linux-nonfree

Verify that the packages have been installed:

1
sudo  apt list --installed | grep firmware

Add a User to the Sudo Group

1
2
su -
usermod -aG sudo username

Verify Sudo Group Membership

1
getent group sudo

Log In with the Sudo Group User

1
su - username

Install git and wget

1
sudo apt install git wget -y

Install zsh and Oh My Zsh2

1
2
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install Powerlevel10k

Download and place the 4 .ttf fonts from Meslo Nerd in /usr/local/share/fonts. They must have permissions 644 (-rw-r–r–).3

Create the /usr/local/share/fonts directory:

1
2
sudo mkdir /usr/local/share/fonts
cd  /usr/local/share/fonts

Download the fonts:

1
sudo wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf  https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf

Clone the powerlevel10k project:

1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Replace the following value in ~/.zshrc:

1
ZSH_THEME="powerlevel10k/powerlevel10k"

Configure to your liking and reload the ~/.zshrc file:

1
source ~/.zshrc

Add Launchers to the Menu

Use the following command to emulate the applications in /etc/profile within zsh.

1
emulate sh -c 'source /etc/profile'

Snapd

Installation

Install the snapd and core packages:

1
2
sudo apt install snapd
sudo snap install core

Add Snap Executables Path to bash and Zsh PATH

Add the snap executables path to the PATH:

1
2
3
4
echo "export PATH=$PATH:/snap/bin" >> ~/.bashrc
source ~/.bashrc
echo "export PATH=$PATH:/snap/bin" >> ~/.zshrc
source ~/.zshrc

Verify that the path has been added correctly:

1
echo $PATH

Add Launchers to the Application Menu

Create a symbolic link from the directory that stores snap launchers (/var/lib/snapd/desktop/applications) to the system applications directory (usr/share/applications/)

1
sudo ln -s /var/lib/snapd/desktop/applications /usr/share/applications/snapd

Flatpak

Installation

From the official Flatpak documentation, follow these steps:

  1. Install Flatpak
1
sudo apt install flatpak -y
  1. Add the Flatpak repository
1
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  1. Reboot the system to apply the changes.

Add Launchers to the Menu

Create a symbolic link from the directory that stores flatpak launchers (/var/lib/flatpak/exports/share/applications/) to the system applications directory (usr/share/applications/)

1
sudo ln -s /var/lib/flatpak/exports/share/applications/ /usr/share/applications/flatpak

Aptitude

1
sudo apt install aptitude

Nextcloud Sync Client

Download the AppImage file from Nextcloud, grant execution permissions to the user, and run it with:

1
2
chmod u+x Nextcloud-3.3.5-x86_64.AppImage
./Nextcloud-3.3.5-x86_64.AppImage

Sync the folders.

KeePassXC

Note: installed via Snap because the official repositories have an outdated version.

  1. Install via snap:
1
sudo snap install keepassxc
  1. Download the browser extension.

  2. Configure the browser extension using an official KeePassXC script. Save the script and run:

1
2
wget https://raw.githubusercontent.com/keepassxreboot/keepassxc/master/utils/keepassxc-snap-helper.sh
zsh keepassxc-snap-helper.sh

If you get the error Could not find keepassxc.proxy! Ensure the keepassxc snap is installed properly., this is because the snap executables path needs to be added to the PATH:

1
2
3
4
echo "export PATH=$PATH:/snap/bin" >> ~/.zshrc
source ~/.zshrc
echo "export PATH=$PATH:/snap/bin" >> ~/.bashrc
source ~/.bashrc

Run the script again:

1
bash keepassxc-snap-helper.sh

VSCodium 4

  1. Add the repository GPG key:
1
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium.gpg
  1. Add the repository:
1
2
3
4
echo 'deb
 [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ]
https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main'
    | sudo tee /etc/apt/sources.list.d/vscodium.list
  1. Update repositories and install VSCodium:
1
sudo apt update && sudo apt install codium

Using LaTeX with VSCodium

  1. In settings, search for word wrap and enable it so that lines do not extend infinitely.
  2. Install the LaTeX distribution Texlive (recommended by the VSCodium LaTeX Workshop extension), ChkTex for LaTeX semantic checking, and texlive-extra-utils for extensions like latexindent.
1
apt-get install -y texlive texlive-latex-extra texlive-extra-utils chktex latexmk texlive-fonts-recommended texlive-fonts-extra texlive-science  texlive-latex-base-doc
  1. Add the path
1
2
3
4
echo 'export PATH=$PATH:/usr/share' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/share' >> ~/.zshrc
source ~/.bashrc
source ~/.zshrc

Inkscape

Install via the Flatpak repositories.

1
flatpak install org.inkscape.Inkscape

Mattermost-Desktop

According to the official Mattermost documentation, for Debian-based operating systems, the steps to follow are:

  1. Download the latest version of Mattermost (use the official documentation page): 64-bit systems mattermost-desktop-4.6.2-linux-amd64.deb

Zotero

The reference steps are from the Debian wiki for installing Zotero.

Install Zotero via Flatpak:

1
flatpak install flathub org.zotero.Zotero

Add Zotero to the PATH:

1
echo 'export PATH=$PATH:/var/lib/flatpak/exports/bin' >> ~/.bashrc

Run Zotero:

1
flatpak run org.zotero.Zotero

Sync the library and install the BetterBibTex plugin. To install the BetterBibTex plugin, follow its documentation.

Once installed, add the following script to include the keywords when exporting with

OwnCloud

Follow the installation guide for Debian.

Once installed, sync the folders.

Thunderbird

Copy and paste the .thunderbird folder for a complete migration. Install with:

1
sudo apt install thunderbird

Pip

1
sudo apt install python3-pip

Node and npm

1
2
sudo curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -
sudo apt-get install -y nodejs

Kubernetes

kubectl

Install using native package management

HDMI Audio Configuration

According to this post, add the following to /etc/pulse/default.pa:

1
2
3
load-module module-alsa-sink device=hdmi:0
load-module module-combine-sink sink_name=combined
set-default-sink combined

XFCE Customization on Debian

Theme

Download themes from xfce-look, filtering by rating. Some recommended ones are Qogir-dark, Ultimate-dark, or Nordic. Extract them and copy them to the .themes folder, located at /home/username/.themes.

Go to Appearance -> Themes -> Qogir-dark.

Icons

Add the Qogir-dark icons. Download them from xfce-look, extract them, and copy them to the .icons folder located at /home/username/.icons.

Go to Appearance -> Icons -> Qogir-dark

Dock

Install Plank:

1
sudo apt-get install plank

Window Manager

Install emerald:

1
sudo apt install emerald

Run the emerald-theme-manager program and choose a theme:

1
emerald-theme-manager

Run in the background:

1
emerald --replace &

Plymouth

Steps followed from the official Debian wiki.

i3wm Window Manager

1
sudo apt install i3 i3status