Setting up Debian and GNOME DE
2024-11-24 08:04
Debian 12 bookworm with the GNOME 43.9 Desktop Environment is my current choice of Linux setup. I find the setup quite clean. No major issues. Although the apt package repository doesn't have all the software I use, I can easily install stand-alone binaries to fill the gap.
Each time I do a re-install, I update these notes as I go while using them as a reference. I'm finding this activity teaches me a great deal. I plan on doing this regularly to keep me engaged with my tools.
Update 2025-04-29: In anticipation of the upcoming Debian 13.0 "Trixie" release, thought I'd give my Debian setup instructions a bit of a revamp for a dry-run re-install of 12.10 "Bookworm" over the weekend.
Update 2025-05-03: Now I'm most of the way through, I've done quite a big revamp with all the fiddly bits. Not always a straight up install. Structured a lot of folders differently.
Update 2025-05-04: Done.
Initial setup
Add user to sudo group
su
sudo usermod -aG sudo [username]
groups [username] # check user has been added
exit
Enable firewall
sudo apt install ufw
sudo ufw enable
sudo ufw logging off
sudo ufw status verbose
Set up PARA folders at home directory
mkdir 01-Projects 02-Areas 03-Reference 04-Archive
Software installations
Install available packages through apt
sudo apt install buku feh gimp git imagemagick jhead peek pipx qbittorrent ripgrep rsync syncthing todotxt-cli tmux vlc xsane xsel
Add pipx to PATH
pipx ensurepath
Install Surfshark VPN client
curl -f https://downloads.surfshark.com/linux/debian-install.sh --output surfshark-install.sh #gets the installation script
cat surfshark-install.sh #show script’s content
sh surfshark-install.sh #installs surfshark
Install tailscale
curl -fsSL https://tailscale.com/install.sh | sh
Install steam
Download the .deb file from the Steam download page and run:
sudo dpkg -i steam_latest.deb
On first run, follow the prompts to complete installation.
Install neocities-cli
neocities-cli is installed via ruby, so first install ruby-full:
sudo apt install ruby-full
Now install neocities-cli:
sudo gem install neocities
Install async-neocities
This is to make it quicker to upload my website to Neocities. First, install latest version of Node.js (see https://tecadmin.net/install-latest-nodejs-npm-on-debian/):
sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_23.x | sudo bash -
sudo apt-get install nodejs
Then to install async-neocities:
npm install async-neocities
Install Librewolf
sudo apt update && sudo apt install extrepo -y
sudo extrepo enable librewolf
sudo apt update && sudo apt install librewolf -y
Uninstall Firefox
sudo apt remove --purge firefox-esr
rm -rf ~/.mozilla/
Install software from binaries
- stew binary package manager. Once installed, try and install the following binaries through
stew
: - helix
- lagrange
- lazygit
- marksman
- soulseek - use the Latest Linux 64-bit AppImage link in stew.
- yazi
- zellij
- zola
Install tut
On hold until I'm ready for Mastodon again.
tut is not available through apt. First install Azlux's package repository so it is managed through the repo:
echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
sudo apt update
Then install through apt:
sudo apt install tut
Install other software
? What did I forget ?
Update .bashrc
A lot of stuff here related to what I have installed, and my own scripts.
export EDITOR=hx
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
alias cls='clear'
alias gg='lazygit'
alias f='xdg-open "$(fzf)"'
alias neopush='/home/zkbro/npm/node_modules/async-neocities/bin.js'
alias p='~/.local/pipx/venvs/python-lsp-server/bin/python3'
alias shit='systemctl poweroff'
alias sync-web='librewolf http://127.0.0.1:8384/'
alias t='todo-txt'
alias theme='bash -c "$(wget -qO- https://git.io/vQgMr)"'
alias weather='curl wttr.in/queenstown?format=2'
alias zpi='ssh zkbro@192.168.1.4'
# alias gemcert='go run /home/zkbro/repos/gemcert/main.go'
# alias web='zellij --layout ~/zellij-web-layout-vertical.kdl'
# alias z='zellij'
alias note='notetaker.sh'
alias blog='blog.sh'
alias imgls='img_ls.sh'
alias imgpt='img_pt.sh'
alias imgios='convert_ios_imgs.sh'
alias img='img.sh'
alias tweek='p /home/zkbro/repos/todotxt-weekview/todotxt-weekview.py'
alias prj='p /home/zkbro/.local/bin/create-project.py'
# eval "$(zellij setup --generate-auto-start bash)"
eval "$(register-python-argcomplete pipx)"
# Created by `pipx` on 2024-11-24 01:43:35
export PATH="$PATH:/home/zkbro/.local/bin"
export PATH="$PATH:/home/zkbro/.local/pipx/venvs/python-lsp-server/bin"
export PYTHONWARNINGS="ignore::DeprecationWarning"
export TODOTXT_DEFAULT_ACTION=ls
Software-specific Customisation
Librewolf
Set as default browser:
xdg-settings set default-web-browser librewolf.desktop
To load browser at full width and height on each start, go to about:config
and turn off privacy.resistFingerprinting
.
Install Librewolf plugins:
- Bitwarden Password Manager
- uBlock Origin
- Google Sign-in Pop-up Blocker
- Dark Mode Website Switcher
- Auto Reader View
- Vimium
Configure syncthing
By installing syncthing via apt
, systemd service files were created and are listed in sudo systemctl list-unit-files
. To enable autoloading on computer load, and start straight away, after initiating the config file and initial setup by running syncthing
, run:
systemctl enable syncthing@zkbro.service
systemctl start syncthing@zkbro.service
Starting Syncthing Automatically
Add Android device to syncthing via web GUI.
I currently sync 4 folders to my Android:
- ~/01-Projects/
- ~/02-Areas/notes/
- ~/02-Areas/file-sync/
- ~/.todo-txt/
On my Android I have set it up so Projects and notes sync to my Obsidian vault, while file-sync and todo-txt sync to my root folder. Reason being is I use file-sync solely for transferring files between devices, and I use Markor to read and edit my todo-txt file (it has a out-of-the-box compatibility) rather than Obsidian. I will work on a much larger post to explain my syncing workflow.
Initiate the sync from my laptop, turning on "send only" to ensure nothing gets lost in the next steps. Add Android to the folder.
On the Android move the folders to desired location. Some steps below may already be in place if this isn't the first time. Adjust accordingly:
-
In Material Files, copy the .stfolder folder to desired location:
- ~/vaults/main/01-Projects/
- ~/vaults/main/02-Areas/notes/
- ~/file-sync/
- ~/todo-txt/
-
Back in Syncthing, open the Web GUI, go to Advanced Settings, and change the directories to the locations above.
-
In Obsidian add ~/vaults/main/ as a new notes vault. Add the .obsidian folder first if it is saved previously.
Jellyfin and Finamp
On initial setup, directories won't be accessible through the jellyfin GUI. It's a permissions thing. First, add the jellyfin user to my usergroup:
sudo usermod -aG zkbro jellyfin
Allow group members to travel my home directory:
chmod 750 /home/zkbro
Now I can add directories to my library.
To get access to the library remotely, eg. from my Android using the Finamp jellyfin client, I need to first allow port 8096 through firewall:
sudo ufw allow 8096
When connecting use http://laptop:8096
as address, and my jellyfin credentials.
Install/inject python libraries into pipx environments
Not 100% I am using pipx correctly, but I have been injecting all the packages under pylsp once installed.
pipx install python-lsp-server
pipx inject python-lsp-server [package-name]
- python libraries
package python-lsp-server 1.12.0, installed using Python 3.11.2- pylsp
Injected Packages:- bs4 0.0.2
- datetime 5.5
- feedgen 1.0.0
- feedparser 6.0.11
- folium 0.19.2
- geopy 2.4.1
- gpxplotter 0.2.12
- gpxpy 1.6.2
- html2text 2025.4.15
- matplotlib 3.9.3
- md2gemini 1.9.1
- pandas 2.2.3
- python-lsp-black 2.0.0
- python-lsp-ruff 2.2.2
- reportlab 4.3.1
- requests 2.32.3
- seaborn 0.13.2
- stravalib 2.1
- pylsp
Configure git
See Setting up Git (The Odin Project) for a good how-to.
git config --global user.name "Your Name"
git config --global user.email "yourname@example.com"
git config --global init.defaultBranch main
git config --global pull.rebase false
And confirm:
git config --get user.name
git config --get user.email
Create SSH key to link with a git hosting service:
ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub
Add keys to git forge settings via their web settings.
Configure helix
Once installed I've just copied my backup ~/.config/helix/
folder across. This pulls in themes, sets up word wrapping, adds some custom keys, and enables a couple of language server plugins which were installed as part of the pipx setup explained above.
Setting Helix up as a Python IDE
Configure tmux
Install Tmux Plugin Manager and Tmux Resurrect. The instructions are good in those links. Start with TPM obviously.
Add programs to the list to be resurrected.
After fiddling about with saved layouts, rename some that will be re-used for future use, and save preferred one to the "last" file.
Load zellij in full-screen mode on start-up
Currently not used, as I'm trying out tmux. I'm also trying to move away from autostart and utilise systemd service files.
Create a file ~/.config/autostart/zellij-start.desktop
and input the following text:
[Desktop Entry]
Name=Zellij Fullscreen
Exec=gnome-terminal --full-screen -- "zellij"
Type=Application
Keywords=terminal;
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Comment=Launch Zellij in fullscreen terminal at startup
Zellij Fullscreen will now appear in the Tweaks "Startup Applications" list, toggled on as set by X-GNOME-Autostart-enabled=true
.
Desktop Environment Customisation
Disable auto-load of overview mode
Install No overview at start-up extension.
Turn off Hot Corner
Go to Settings --> Multitasking --> Hot Corner, and turn off. It's that thing that causes all currently open windows to appear when the cursor hits the top left corner of the screen.
Remove tab grouping
In Settings --> Keyboard --> Keyboard Shortcuts --> View and Customize Shortcuts --> Navigation set Switch windows keybind to Alt-TAB. This will overwrite the allocation of ALT-TAB to Switch applications which isn't shown.
Set keyboard shortcuts
In Settings --> Keyboard --> Keyboard Shortcuts --> View and Customize Shortcuts --> Launchers set Home Folder to Super+E and Launch Web Browser to Alt+W.
In Settings --> Keyboard --> Keyboard Shortcuts --> View and Customize Shortcuts --> Custom Shortcuts create one for the command gnome-terminal
mapping to Ctrl-Alt-T.
Other
Gnome calculator has a bug causing it to freeze up while attempting to fetch exchange rates. Just turn it off:
dconf write /org/gnome/calculator/refresh-interval 0