First commit

This commit is contained in:
Branwell 2021-12-25 18:27:44 +01:00
commit 2d0e34cccf
3 changed files with 191 additions and 0 deletions

.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
# Temporary files created by text editor Nano while editing files
# Other possible temporary files
# Any filename containing 'NO_GIT'

182 Normal file
View file

@ -0,0 +1,182 @@
# Getting Debian
This is a short guide explaining how I normally install and configure Debian, but someone else may do it differently. It will not teach you things like how to use the command line: it is focused on more specific topics. I recommend that you read each section before starting to do what it says.
## Index
- [Installing Debian](#installing-debian)
- [Upgrading to Debian unstable](#upgrading-to-debian-unstable)
- [Getting WiFi and Ethernet to work](#getting-wifi-and-ethernet-to-work)
- [Getting audio to work](#getting-audio-to-work)
- [Disabling recent files](#disabling-recent-files)
- [Quick adjustments](#quick-adjustments)
- [Additional software](#additional-software)
- [Footnotes](#footnotes)
## Installing Debian
1. Before starting, backup all the files you want to keep on your next Debian installation. These normally include most of your Home folder, potential configuration files located outside of it, browser bookmarks and emails saved locally. You can use an external drive, like a USB stick, or a cloud service. You can directly copy or upload your files, but it may be more convenient to create a ZIP or TAR archive.
2. Download the correct ISO from the [Debian site]( I usually choose a netinst ISO for Debian Stable.[^1] A netinst ISO is small in size but requires an Internet connection during installation, so you will need an Ethernet cable or a similar method of going online without WiFi. To check your processor architecture you can run `dpkg --print-architecture`: in my case, it is amd64. **Important note:** if you do not have an Ethernet cable and plan to use WiFi on your system, consider choosing an ISO with non-free firmware included, as it will be impossible for you to download WiFi drivers later on.
3. Create an installation medium. For this process you will need an external drive. **Please note that all of its content will be overwritten and lost.** If you decide to use a USB stick, you can follow [this guide on the Arch Wiki](
4. Power off your computer and make sure its charger is plugged in: it is important that the device does not run out of power during the process. If you have chosen a netinst ISO, connect your Ethernet cable.
5. Switch on your computer and quickly open the boot options before the operating system starts loading. Usually you can do this by pressing `F12`, but the actual key may be different on your device. To make sure the key stroke gets recognised, press it three or four times quickly. Select the installation medium instead of the internal hard disk. You should be able to navigate through a list of devices using the arrow keys and confirm with `Enter`.
6. A screen with the Debian logo and a list of options should appear. You can choose to proceed with a graphical interface or a command-line one. I recommend the latter. At this point you only have to follow the intructions that appear on the screen. I recommend that you also read [this page on the Installation Guide]( while you go on with the installation. It describes the whole process and explains some important concepts.
### Links you might find useful
- [RFC1178 Choosing a name for your computer](
- [EFF Dice-generated passphrases](
### About the desktop environment
I like having a minimal operating system, so during the installation I select not to install any desktop environment. However, since I still want a GUI, I later install and configure a window manager, along with all the programs I need. If you prefer an OS that already comes with a full desktop experience and all the programs you need, or if you do not have time to configure Debian, you can select a desktop environment. I like XFCE as it is lightweight, but functional. It provides all the tools I need while remaining simple and usable.
## Upgrading to Debian unstable
At this point, you have installed either Debian Stable or Testing. However, you might want to upgrade to Debian Unstable, which is the version I personally prefer. I will try to explain how to do that, but if for any reason you do not trust me, you can directly read these pages, which I took my information from:
- [Debian unstable - Debian Wiki](
- [Sources list - Debian Wiki](
- [Debian archive basics](
To upgrade to Debian Unstable, you have to change the respositories that will be used to install and upgrade packages. In order to do that, you must change the content of the file located at `/etc/apt/sources.list`, so run `sudoedit /etc/apt/sources.list` and enter your password. Alternatively, become root and use your favourite text editor. The file should contain some lines looking more or less like this and other commented lines, namely lines starting with "#" that are totally ignored:
deb bullseye main
deb-src bullseye main
deb bullseye-security main
deb-src bullseye-security main
deb bullseye-updates main
deb-src bullseye-updates main
In the first two lines, replace the code name of the Debian version ("bullseye" for Debian 11) with "unstable". The following two lines must be deleted or commented (I recommend the latter), because they are for security updates, which Debian Unstable never gets. The last lines must be deleted or commented as well. Save the changes (`Ctrl+S` if `sudoedit` opened Nano) and close the text editor (`Ctrl+X` in Nano).
Now run the following commands, either preceding them with the command `sudo` or logging in as root:
apt update
apt full-upgrade
Finally, reboot the system with `systemctl reboot` or in the graphical way.
### Best practices
- Only upgrade packages when you have some time to fix pontential problems. Do **not** upgrade before important events like a presentation or a business trip: your system will break at the worst times!
- Do **not** blindly accept the actions proposed by the package manager during an upgrade: make sure they are in line with your wishes and expectations.
- Avoid `apt full-upgrade` as it may remove packages you depend on.
- Install the packages `apt-listbugs` and `apt-listchanges`: they will tell you when a package you are about to install or upgrade has bugs or important changes.
- Backup your system frequently.[^2]
## Getting WiFi and Ethernet to work
It is a very common problem that WiFi does not work out of the box after installing Debian. This happens because WiFi often needs non-free, proprietary software, which is not included in the Debian repositories by default. To install the correct drivers and get WiFi to work, follow [this guide on the Debian Wiki]( and the other guides linked in it. First, you must identify your WiFi device, then install the correct drivers, possibly the free ones, and maybe other important packages. After that, I recommend that you disable the non-free repositories, if you had to enable them to install the drivers. This will prevent you from installing other non-free software later. To make sure everything works correctly, reboot your computer either with the command `systemctl reboot` or graphically. If you are using a desktop environment, you should now be able to manage WiFi through the preinstalled graphical tools. To do it on the command line, use `nmcli` or `nmtui`, both included in the package `network-manager`. NetworkManager may have some problems handling wired networks, though: this is because it does not manage this kind of interfaces by default. To enable them, edit the file `/etc/NetworkManager/NetworkManager.conf` and change the line `managed=false` to `managed=true`. Then, restart NetworkManager with `sudo service NetworkManager restart`.
## Getting audio to work
Waiting to be written...
## Disabling recent files
I do not really like that my system remembers the recently used files. I think it is a useless feature: just because I have recently opened a file, it does not mean that I want to open it again, does it? If you agree with me, here is how I managed to disable this misfeature. You will have to add the following lines in the file located at `~/.config/gtk-3.0/settings.ini`:
If these options are already specified inside `settings.ini`, just change their values to `0`. At this point, the problem is not fully solved yet. It is possible that your file chooser still defaults to the `Recent` folder. To change this behaviour and set your `Home` folder as the default, add the following lines inside `~/.config/gtk-2.0/gtkfilechooser.ini`:
Again, if the options are already specified, just change their values. The last step is to delete the file `~/.local/share/recently-used.xbel`.
## Quick adjustments
This section contains short notes about things you might want to do on Debian. Some of them could be further developed in the future.
- Add this line: `export QT_QPA_PLATFORMTHEME="gtk3"` to `~/.bashrc` to tell Qt to follow, more or less, GTK theme (better than nothing).
- In order to manage audio without any sound server but only with ALSA, install `alsa-utils` and `apulse`.
- You can deactivate Bluetooth in the following ways:
- `sudo systemctl stop bluetooth.service` stops the Bluetooth unit *now*, but it may start again on the next boot or when manually started;
- `sudo systemctl disable bluetooth.service` disables the Bluetooth unit: it will not start on boot anymore;
- setting the option `AutoEnable=false` (this is the default value) in the `[Policy]` section of `/etc/bluetooth/main.conf` will prevent the Bluetooth adapter to power on after a reboot.
- If you want to transfer files between a smartphone and your Debian computer through a USB cable, you may want to install the package `mtp-tools`.
- To use a scanner, install `sane-utils` and then use the command `scanimage`.
## Additional software
This is a list of the software I use for different purposes. This is only a personal recommendation and if you have installed a desktop environment you will probably have most of the programs you need.
- Window manager: openbox
- Terminal emulator: xfce4-terminal
- Web browser: firefox
- File manager: thunar
- Image viewer: ristretto
- Image editor: gimp[^3]
- Vector image editor: inkscape
- Media player: parole
- Song metadata editor: exfalso
- Document reader: atril
- Document editor: libreoffice-writer[^4][^5]
- Instant messaging: telegram-desktop
- Version control system: git
- Panels: polybar
- Wallpaper changer: hsetroot
- Screen locking tool: xtrlock
- Night light tool: sct
## Footnotes
[^1]: Learn more about the releases of Debian:
- [Debian releases](
- [Debian releases - Debian Wiki](
- [Choosing a Debian distribution](
I would like to point out that despite its name Debian Unstable is not as unstable as the documentation suggests. It hardly ever happens that an upgrade breaks your system, it is not like new packages are thrown in the unstable repositories completely at random, and although the repositories receive daily updates, you do not have to upgrade everything all the time. Moreover, bugs are fixed in a couple of days.
[^2]: In the following pages you can find information about backups and many example tools. Personally, I like using TAR.
- [Backup your system - Ubuntu Community Help Wiki](
- [Backup and recovery - Debian Wiki](
[^3]: You may notice that GIMP has an ugly interface, with buttons in relief looking as if they came from the 1990s. To solve this, launch `gimp` from a terminal. You should get this error:
GTK theme error: Unable to locate theme engine in module_path: "pixmap"
If that is the case, simply install the package `gtk2-engines-pixbuf`.
[^4]: If you use LibreOffice, you should also install the package `libreoffice-gtk3`: it will allow LibreOffice to integrate with the system theme.
[^5]: If you want to use a spell checker on LibreOffice, you need the corresponding package. Most of them are `hunspell-...` packages: for example `hunspell-it` is for the Italian spell checker.

1 Symbolic link
View file

@ -0,0 +1 @@