Debian Notes
Table of Contents
Sudo
- Run
su
to become root - Add the user to the
sudo
group using the sudo command as root,sudo usermod -a -G sudo <USER>
- Exit the
su
session and logout and log back in
Wifi
- Debian Wiki: iwlwifi
- Edit your
/etc/apt/sources.list
to enablecontrib
andnon-free
packages - Add then to the end of each line that begins with
deb
ordeb-src
deb http://deb.debian.org/debian bullseye main contrib non-free deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
- Update your packages with
sudo apt update
- Install
iwlwifi
,sudo apt install firmware-iwlwifi
- Become root with
su
- Load the
iwlwifi
module,sudo modprobe -r iwlwifi; modprobe iwlwifi
- This might also be a good time to install any needed non-free firmware for your hardware. For example intel graphics i915
sudo apt install firmware-misc-nonfree
Bluetooth
- Once the
non-free
packages are enabled you might need to installbluez-firmware
to be able to connect to some bluetooth devices
Caps Lock / Control
- To turn the caps lock key into control run this
setxkbmap
command when logging in,/usr/bin/setxkbmap -option "ctrl:nocaps"
Packages
sudo apt install \ mg \ build-essential \ git \ git-gui \ mosh \ tmux \ pass \ pass-extension-otp \ zbar-tools \ libgccjit-10-dev \ gcc-doc \ gcc-doc-base \ doc-base \ libjansson-dev \ libjansson-doc \ autoconf \ autoconf-doc \ texlive \ texlive-extra-utils \ texlive-latex-extra \ texi2html \ texinfo \ libgtk-3-dev \ libgtk-3-doc \ libxpm-dev \ libjpeg-dev \ gnutls-bin \ gnutls-doc \ libtiff-dev \ libtiff-doc \ libgif-dev \ libgnutls28-dev \ libncurses-dev \ imagemagick \ imagemagick-doc \ htop \ ncdu \ fonts-hack-ttf \ syncthing \ vlc \ mpv \ nethack-console \ ledger \ fonts-noto-cjk \ fonts-noto-cjk-extra \ fonts-noto-color-emoji \ fonts-noto-core \ fonts-noto-extra \ evince \ libssl-dev \ libssl-doc \ libsasl2-dev \ libdb-dev \ db-util \ libdb5.3 \ db5.3-doc \ libxapian-dev \ libgmime-3.0-dev \ libtalloc-dev \ zlib1g-dev \ clisp \ clisp-doc \ libsdl2-dev \ libsdl2-doc \ libusb-1.0-0-dev \ pkg-config \ openttd \ openttd-data \ openttd-opengfx \ openttd-openmsx \ openttd-opensfx \ fzf \ crispy-doom \ frotz \ libfreetype6 \ libopenal1 \ liblua5.1-0 \ abcde \ beets \ beets-doc \ inkscape \ curl \ ayatana-indicator-bluetooth \ picocom \ rsync \ default-jre \ graphviz \ info \ sbcl \ sbcl-doc \ gimp \ gimp-help-en \ libxml2-dev \ libgtk2.0-dev \ iperf3 \ python3-pip \ flac \ libmagickwand-dev \ guile-3.0 \ guile-3.0-dev \ simplescreenrecorder \ gnuplot
Installing .deb
files
- You can use
apt
to installdeb
files. - This has the added benefit of getting the dependencies
sudo apt install ./<PACKAGE>.deb
Setting default python version
- Michls Tech Blog: Debian: set python3 default
- Using
update-alternatives
we set the defaultsudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
Suspending when closing the laptop lid
- Debian Wiki: Systemd Suspend Sedation
- Edit
/etc/systemd/logind.conf
- Find the lines with
HandleLidSwitch
and ensure that they are set toSuspend
- Restart the login service with
sudo systemctl restart systemd-logind
- When using XFCE4 this can be handled in the power management settings
Syncthing
- Start syncthing as a user service
systemctl enable --now syncthing.service --user
- The syncthing web ui is normally accessed on port 8384
Isync
- Clone the
isync
repo,git clone https://git.code.sf.net/p/isync/isync isync
- Inside the
isync
code run./autogen.sh
- Run
./configure
to create theMakefile
- Then run
make
andmake install
Notmuch
- Download the latest source release of
notmuch
from their release page, https://notmuchmail.org/releases/ - Run
./configure
to create theMakefile
- Then run
make
andmake install
EDuke32
- EDukeWiki: Building EDuke32 on Linux
- Clone the latest code here,
git clone https://voidpoint.io/terminx/eduke32.git
- Ensure the dependencies are installed,
sudo apt-get install build-essential nasm libgl1-mesa-dev libglu1-mesa-dev libsdl1.2-dev libsdl-mixer1.2-dev libsdl2-dev libsdl2-mixer-dev flac libflac-dev libvorbis-dev libvpx-dev libgtk2.0-dev freepats
- Run
make
to buildEDuke32
- This produces
eduke32
andmapster32
binaries, place them in your path somewhere
Adding User to uucp
group
sudo usermod -a -G uucp <USER>
OpenRA
- Clone the latest code here,
git clone =https://github.com/OpenRA/OpenRA
- Install the dependencies,
sudo apt install libfreetype6 libopenal1 liblua5.1-0 libsdl2-2.0-0
- Download .NET 6.0 from Microsoft, https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-11
- Make sure you set the environment variable,
DOTNET_CLI_TELEMETRY_OPTOUT=1
since it is opt out telemetry
- Make sure you set the environment variable,
- Compile the program with
make
- The game content should go in the
~/.config/openra/Content
folder - To launch the game you need to use the
launch-game.sh
script inside the repo - When starting the game you need to specify the "mod" either
cnc
,ra
ord2k
- For example, from inside the repo dir,
./launch-game.sh Game.Mod=ra
- For example, from inside the repo dir,
Building Emacs
- clone emacs from savannah
git clone -b master git://git.sv.gnu.org/emacs.git
- Releases are usually in a branch with the version number, for example
emacs-28
- Run the
./autogen.sh
to build the configure script - The below command shows the configure flags I like for Emacs
./configure --with-native-compilation \ --with-json \ --with-rsvg \ --with-imagemagick
- This will warn you about any missing dependencies, from there you should obtain them for your OS
- Build emacs with
make -j <NUMBER_OF_CPU_CORES+1>
- Run
make install
with appropriate permissions to install the new version on the system - Use
M-x emacs-version RET
to see the current version info, including the build date