I got a new desktop computer a couplafew years ago and partitioned the hard drives and installed Debian 10 alongside the proprietary OS that came with it. Now Debian 11 has been released, but rather than upgrade I did a reinstall. I hadn't used the other OS much (at all?), so I decided to reclaim that disk space. Here are the things I did to install and configure Debian bullseye.
Create bootable thumb drive from the downloaded .iso file
Plug in thumb drive, run
sudo fdisk -l and note which disk it is. In my case, it was
Copy the ISO to the device (the entire device, not
/dev/sdc1 or something)
sudo cp debian-live-11.0.0-amd64-xfce+nonfree.iso /dev/sdc
This is full "live" image with Xfce and non-free drivers. In hindsight, I probably could have used the much smaller net install image. Laptops often need non-free drivers for wifi, but I'm just using ethernet for this desktop.
Boot from the thumb drive and start the install
I wanted to divide the installation between the solid-state drive (SSD) and the spinning hard disk (HDD), so I chose to partition the disks manually. I created partitions for swap (16G) and root (the rest) on the SSD and I put
/var (100G), and
/home (the rest) on the HDD.
That was the only fiddling I did. Everything else was defaults.
After rebooting, make sure we're up to date (there may have been changes since the ISO was created).
sudo apt update sudo apt upgrade
I may have done the next two steps first, because I really can't do anything with a mouse or a keyboard (like open a terminal window and type in it) without fixing those.
Fix the mouse
I use the mouse with my left hand, so I need to reverse the buttons. In Xfce, this is done with
Applications -> Settings -> Mouse and Touchpad Devices tab Buttons Left-handed
I also prefer to have the focus follow the mouse.
Applications -> Settings -> Window Manager Focus Tab Focus follows mouse
Fix the keyboard
Configure the shell with my dotfiles
cp dotfiles/.bashrc $HOME cp -r dotfiles/.bashrc.d/ $HOME cp dotfiles/.profile . cp -r dotfiles/.profile.d/ $HOME cat >> .xsessionrc . $HOME/.profile
sudo apt install git cp dotfiles/.gitconfig $HOME
Install some other things I use
sudo apt install curl tree wget ripgrep jq
Debian comes with
firefox-esr, which is too old. Grab
firefox from sid instead.
Add the unstable repo to
deb http://deb.debian.org/debian/ unstable main contrib non-free
Now pin it, so we only get it when we ask for it.
$ cat /etc/apt/preferences.d/99pin-unstable Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin release a=unstable Pin-Priority: 10
firefox from unstable
sudo apt update sudo apt install -t unstable firefox
sudo apt purge firefox-esr
Now Debian sensible-browser and menus and things will still work.
Thunderbird is a pain to configure, so I just copied my entire
.thunderbird directory over.
sudo apt install thunderbird cp -r backup/.thunderbird $HOME
cp -r backup/.fonts/ $HOME
Desktop and icon themes
sudo apt install arc-theme moka-icon-theme Settings -> Appearance -> Style Settings -> Appearance -> Icons Settings -> Window Manager
~/.local/share/xfce4/terminal/colorschemes/ directory and copy
.theme files there.
mkdir -p ~/.local/share/xfce4/terminal/colorschemes/ cd ~/.local/share/xfce4/terminal/colorschemes/ wget https://raw.githubusercontent.com/guttume/isooth/master/isooth.theme
Then xfce-terminal will find them in
Edit > Preferences... Colors tab Load Presets...
I use starship for a terminal prompt
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
I wrote about Command-not-found a while back, but it's much less fiddly now
sudo apt install command-not-found sudo apt-file update sudo update-command-not-found
mkdir perl cd perl curl https://api-v1.metacpan.org/download_url/local::lib | jq .download_url wget https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz tar xf local-lib-2.000024.tar.gz cd local-lib-2.000024 perl Makefile.PL --bootstrap make make test make install
Install cpanm for
~/perl5 by default)
wget -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus
Debian doesn't include
perldoc for some reason.
$ perldoc cpanm You need to install the perl-doc package to use this program. $ sudo apt install perl-doc
cpanm to install a module! We're definitely going to need Path::Tiny soon enough.
cpanm Data::Printer cp dotfiles/.dataprinter $HOME
I configure Emacs for Perl with ~/.emacs.d/config/programming/perl.el in the Emacs step above.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install rust-analyzer (a Rust language server)
mkdir -p ~/.local/bin curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer chmod +x ~/.local/bin/rust-analyzer
M-x package-install RET rustic RET M-x package-install RET lsp-ui RET
This is configured by the ~/.emacs.d/config/programming/rust.el file installed in the Emacs step above.
Add cargo-edit (where
cargo add lives now)
sudo apt install libssl-dev pkg-config cargo install cargo-edit
sudo rm -rf /usr/local/go sudo tar -C /usr/local -xf ~/Downloads/go1.17.linux-amd64.tar.gz
Install gopls (the Go language server)
cd ~/go GO111MODULE=on go get golang.org/x/tools/gopls@latest
This is configured by the ~/.emacs.d/config/programming/go.el file installed in the Emacs step above.
Same with PDF files
sudo apt install evince
Evince does some other types of files as well.
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | gpg --dearmor \ | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg 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 sudo apt update sudo apt install codium
Awesome Emacs and
rust-analyzer extensions from within VSCode.
simple-scan interface to XSane really is simple.
sudo apt install simple-scan
It finds the wireless scanner on the network with no further configuration.
Apparently, it ends up on the menu as "Document Scanner" now.
Applications -> Graphics -> Document Scanner
Not sure what the point of that was (it is further up the list than "Simple Scan" was?), but whatevs.
sudo apt install gimp
Gimp now defaults to single pane mode (yay!) and dark mode (boo!). It's easy enough to switch to dark or light, but I think system will follow the system theme (why isn't that the default?).
Edit -> Preferences Interface Theme System
Connect my phone through USB
I guess TeX Live is the currently preferred way to install TeX.
sudo apt install texlive-full
Debian 11 has both OpenJDK 11 (latest stable) and 17 (latest). They can coexist, but I think I only need one.
sudo apt install openjdk-17-jre openjdk-17-jdk export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64/"
Add that to a Java profile.
$ cat >> ~/.profile.d/java.sh JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64/" export JAVA_HOME
LibreOffice needs Java too.
sudo apt install libreoffice-java-common
If we simply install CUPS, then we should be able to find the wireless printer with no other configuration needed.
sudo apt install cups
I want to ssh to this machine from laptops and whatnot.
sudo apt install openssh-server sudo systemctl start ssh # start now sudo systemctl enable ssh # start on boot