This page is the continuation of several blog posts related to Debian
The Debian GNU Linux operating system is available as a torrent download or a http download at debian.org/CD:
Verify the checksum
shasum debian-10.1.0-amd64-netinst.iso
shasum -a 256 debian-12.5.0-amd64-DVD-1.iso
To copy the image to a usb key follow the instruction on how to copy the iso image to a usb key
Find the device name of my USB key (it had a previous Debian system on it):
sudo fdisk -l
# /dev/sdb1
Unmount the USB key
sudo umount /dev/sdb1
# or
sudo umount "/media/gabriele/Debian Inst"
# or
sudo umount "/media/paul/Debian 10.1.0 amd64 n"
Transfer the iso image to the key
sudo cp debian-live-9.5.0-amd64-gnome.iso /dev/sdb # or sudo cp debian-10.1.0-amd64-netinst.iso /dev/sdb
The iso should be copied to sdb
and not to
sdb1
! Then the USB drive can be used to boot a laptop.
Add my user name to the super user group
su
# Then as a super user
/usr/sbin/adduser paul sudo
I updated the debian mirror to a nearby mirror
sudo apt edit-sources
Note: on a HP laptop make sure that the “legacy boot” is enabled and that the “secure boot” is disabled. On another HP laptop, I had to disable the fast boot so that I could boot from a USB device. The boot devices can be chosen by pressing ESC at start up, then F9.
Debian installation went smoothly.
After the installation, there was one issue with the wifi card having a non-free driver. I had to place the package firmware-iwlwifi on a USB key. The download link is at the bottom of the page (all. Then installed it from the usb key with
sudo apt install ./firmware-iwlwifi_20161130-3_all.deb
Alternatively, the .ucode file can also be found in firmware-nonfree_20161130.orig.tar.xz And given directly during the installation step.
After that extra step, the wifi card was working inside Debian.
See also my 2014 blog post : Debian GNU Linux installation on a LENOVO T400
“BootDevice Not Found” issue in a HP Elitebook: Grub-EFI reinstall The issue happenned on a partitionned disk. The fix was to completely erase the main disk and to reinstall a new debian on a single partition.
Debian / Gnome: disable sensor-based screen rotation
gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true
or use lock orientation in the dash. But this doesn’t solve the issue on the home screen.
Screen rotation in Ubuntu 18.04 Also mentioned in reddit incorrect display orientation after bootup
gsettings set org.gnome.settings-daemon.plugins.orientation active false
Edit this file:
vim /etc/udev/hwdb.d/60-sensor.hwdb
The default matrix is:
sensor:modalias:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
I used this setting to fix the orientation of an HP Elitebook laptop.
sensor:modalias:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
Tests ensures the compatibility between a software and its dependencies. The relationships between software are defined here: https://www.debian.org/doc/debian-policy/ch-relationships.html and new versions of dependencies are tested before their integration into the system. For example, the result of autopkgtest on Debian’s continuous integration, such as the results of the python-pip package https://ci.debian.net/packages/p/python-pip/”
For software in the repository, use
sudo apt install packagename
Hash sum mismatch issue, fix bad proxy
sudo vim /etc/apt/apt.conf.d/99fixbadproxy
Enter:
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;
Now run the update command:
sudo apt update
How to set the proxy for APT I entered the proxy url in this apt configuration file:
vim /etc/apt/apt.conf.d/proxy.conf
In the following form (do not forget the semicolon at the end):
Acquire::http::Proxy "http://user:password@proxy.server:port/";
Search packages with apt
apt search <name>
Search packages with aptitude, the high level interface to the package manager
aptitude search <name>
Search packages on the Debian website.
backports.debian.org contains a list of backports available for each LTS Debian version.
Add the main, contrib and non-free backports to /etc/apt/sources.list :
deb http://ftp.it.debian.org/debian stretch-backports main contrib non-free
Install from backports
sudo apt -t stretch-backports install nodejs
For software in .deb packages, check the md5sum and install with
md5sum packagename.deb
sudo dpkg -i packagename.deb
or
sudo apt install ./packagename.deb
Stack overflow How to install a deb file, by dpkg -i or by apt? “When you use apt to install a package, under the hood it uses dpkg.”
If there are missingdependencies and you fix them you can retry the previsouly failed installed with:
sudo dpkg --configure -a
Remove a package with:
sudo dpkg -r packagename
NIX manual https://nixos.org/manual/nix/stable/
“You can have multiple versions or variants of a package installed at the same time. This is especially important when different applications have dependencies on different versions of the same package — it prevents the “DLL hell”. Because of the hashing scheme, different versions of a package end up in different paths in the Nix store, so they don’t interfere with each other.
“An important consequence is that operations like upgrading or uninstalling an application cannot break other applications, since these operations never “destructively” update or delete files that are used by other packages.”
“Since Nix on the other hand doesn’t install packages in “global” locations like /usr/bin but in package-specific directories, the risk of incomplete dependencies is greatly reduced. This is because tools such as compilers don’t search in per-packages directories such as /nix/store/5lbfaxb722zp…-openssl-0.9.8d/include, so if a package builds correctly on your system, this is because you specified the dependency explicitly. This takes care of the build-time dependencies.”
“Once a package is built, runtime dependencies are found by scanning binaries for the hash parts of Nix store paths (such as r8vvq9kq…). This sounds risky, but it works extremely well.”
The Nix package manager https://github.com/NixOS/nix
Nix packages https://github.com/NixOS/nixpkgs
“a collection of over 80,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.”
Nix with docker files
Debian Package for NIX https://packages.debian.org/sid/nix-setup-systemd
“Purely functional package manager (systemd setup) A powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Nix provides atomic upgrades and rollbacks, side-by-side installation of multiple versions of a package, multi-user package management and easy setup of build environments. This package uses systemd mechanisms to setup the nix package manager.”
Nix Package Manager on Ubuntu or Debian https://ariya.io/2020/05/nix-package-manager-on-ubuntu-or-debian
Android in a box is an android emulator that runs on Linux. To install it on debian I added the contrib and non-free backports to /etc/apt/sources.list :
deb http://ftp.it.debian.org/debian stretch-backports main contrib non-free
Then installed anbox from the backports:
sudo apt -t stretch-backports install anbox
I have encountered issue 211
Ansible documentation
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
“The managed node (the machine that Ansible is managing) does not require Ansible to be installed, but requires Python to run Ansible-generated Python code. The managed node also needs a user account that can connect through SSH to the node with an interactive POSIX shell.”
Playbooks
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html#playbooks-intro
“Ansible Playbooks offer a repeatable, reusable, simple configuration management and multi-machine deployment system, one that is well suited to deploying complex applications. If you need to execute a task with Ansible more than once, write a playbook and put it under source control. Then you can use the playbook to push out new configuration or confirm the configuration of remote systems. The playbooks in the ansible-examples repository illustrate many useful techniques.”
User module to create users on the system https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html
Other resources
How do you handle server automation https://www.reddit.com/r/selfhosted/comments/1069k94/how_do_you_guys_handle_server_automation/
https://www.redhat.com/en/topics/automation/ansible-vs-salt
“Ansible uses the concepts of a control node (where Ansible is executed from) and managed nodes (the devices being automated—often a Linux® or Windows machine). Since Ansible is agentless, it can communicate with devices without requiring an application or service to be installed on the managed node. Ansible Automation Platform can spread automation jobs out across execution nodes using a technology called automation mesh. Ansible users can finely orchestrate different parts of their infrastructure using Ansible Playbooks, which are files written in human-readable YAML. Ansible uses a procedural (or imperative) programming approach, which tries to preserve the configuration of an IT infrastructure by defining the steps to reach a desired state.”
Download one of the setup files from CEWE or partner shops
setup_CEWE_FOTOWELT.tgz
,
setup_CEWE_Photoworld.tgz
,
setup_dm_Fotowelt.tgz
Extract it :
tar --extract -f setup_CEWE_FOTOWELT.tgz --one-top-level
Launch the installer (no need to be sudo):
cd setup_CEWE_FOTOWELT/
./install.pl
wiki.lyx.org LyXOnDebian explains how to install Lyx on Debian:
sudo apt install lyx
Lyx couldn’t access some layout files, I first thought I needed install latex layouts:
sudo apt install texlive-latex-recommended
sudo apt install texlive-latex-extra
But these were already installed.
Default version of Lyx is 2.2 on debian strech. wiki.lyx.org LyXOnDebian explains how to install lyx 2.3 from the backports on Debian stretch.
sudo vim /etc/apt/sources.list
# Add deb http://ftp.debian.org/debian stretch-backports main
# Or a mirror, for example
# deb http://ftp.it.debian.org/debian stretch-backports main
sudo apt update
sudo apt-get -t stretch-backports install lyx
packages.debian.org Neomutt
The Arch Linux setup page explains that :
“The NeoMutt project aims to bring together all the patches for Mutt. It adds a large set of features. Lots of old Mutt patches have been brought up-to-date, tidied and documented.”
It also has a section on setting up the vim editor with Mutt.
How do I set up posteo in an email client?
Mutt configuration example in a dotfile with connection to posteo and vim editor.
Example of Mutt setup for professional email coming from an Exchange server.
In Debian version 12, pip can only be used to install in a virtual environment
Create a virtual environment directory, activate it and instal a python package inside
mkdir ~/rp/penv/
python3 -m venv ~/rp/penv/
source ~/rp/penv/bin/activate
pip install biotrade
If you need tools that can be started at the command line such as jupyter lab,
- Install them in the virtual environment and start them from there
- Or use pipx to install them, so that the command becomes available
pipx install jupyterlab
Trying pip install in the main python environment returns the following
pip install jupyterlab
error: externally-managed-environment
This environment is externally managed To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed.
Install editor
pip3 install spyder
Install quarto https://quarto.org/docs/get-started/
cd ~/downloads sha256sum quarto-1.5.57-linux-amd64.deb sudo apt install ./quarto-1.5.57-linux-amd64.deb
Install R from the CRAN repository, see Cran mirror of Debian packages
Add the following to /etc/apt/sources.list
deb https://cran.stat.unipd.it/bin/linux/debian buster-cran35/
deb http://cloud.r-project.org/bin/linux/debian buster-cran40/
In case you get an error:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FCAE2A0E115C3D8A
Add the PGP key so that this server is trusted :
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 'FCAE2A0E115C3D8A'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 'B8F25A8A73EACF41'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key '51716619E084DAB9'
Based on this stackoverflow answer about key server receive fail error I had to use a server providing a connection on port 80 because the default port is apparently blocked by a firewall on my network.
Then run the following to upgrade R to the lastest version availale on your CRAN mirror:
sudo apt update
sudo apt install r-base r-base-dev
Or if you already had an old R version on your system:
sudo apt upgrade
Download Rstudio for Debian
Run
dpkg -i rstudio-version-number.deb
Dependency error: rstudio depends on libclang-dev Install it
sudo apt install libclang-dev
sudo apt remove rstudio
Installing from the backports (see above section on how to add the backports in sources.list)
sudo apt-get -t stretch-backports install remmina
https://element.io/download#linux
sudo apt install -y wget apt-transport-https sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg echo “deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main” | sudo tee /etc/apt/sources.list.d/element-io.list sudo apt update sudo apt install element-desktop
Riot (former version) Desktop Riot installation
sudo apt install -y lsb-release wget apt-transport-https sudo wget -O /usr/share/keyrings/riot-im-archive-keyring.gpg https://packages.riot.im/debian/riot-im-archive-keyring.gpg echo “deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ $(lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/riot-im.list sudo apt update sudo apt install riot-web
In an earlier version riot the source.list was mentioned directly in /etc/apt/sources.list. I needed to remove it as explained here:
“You have riot.im/packages in your apt sources list somewhere, which is the old repository location. You need to remove that”
The Flatbed scanner Canoscan lide 400 is supported on Linux according to the sane backends page.
When the scanner is plugged in, I can see it’s USB id
0x04a9/0x1912
(mentioned in the sane backends web page) in
the output of
lsusb | grep -i canon #Bus 002 Device 115: ID 04a9:1912 Canon, Inc.
Install sane from source following these instructions http://forums.debian.net/viewtopic.php?f=16&t=141668
Install build dependencies
sudo apt install sane
sudo apt install build-essential make autoconf-archive
sudo apt build-dep sane
sudo apt install libjpeg-dev
Clone and build the latest version of sane
git clone https://gitlab.com/sane-project/backends
cd backends/
./autogen.sh
./configure
make -j9
I tried the other instructions related to the pixma linking
ll /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.*
sudo rm /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1 /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1.0.27
ll /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.*
sudo rm /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so
cd /usr/lib/x86_64-linux-gnu/sane/
ll /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.*
cd ~/rp/zz_forks/backends/
ls backend/libsane-pixma.la
The problem is that the ‘.so.28’ file doesn’t exist, I tried with another file
sudo cp backend/libsane-pixma.la /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.la
sudo ln -s libsane-pixma.la /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1
ll /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.*
I also tried these instructions:
make
make install
I created this file
sudo vim /usr/lib/udev/rules.d/49-sane.rules
Containing only one line
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1912", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
This doesn’t seem to help, the scanner is not detected
Sane shows a recent version
sane-config --version
# 1.0.31
But the scanner is not detected, even when called as super user
sudo sane-find-scanner
# No USB scanners found. If you expected something different, make sure that
# you have loaded a kernel driver for your USB host controller and have setup
# the USB system correctly. See man sane-usb for details.
# SANE has been built without libusb support. This may be a reason
# for not detecting USB scanners. Read README for more details.
Yes I know, these software shouldn’t be here, but I have to use these things for work and study.
Debian wiki skype: Download .deb file from https://www.skype.com/en/get-skype/
wget https://go.skype.com/skypeforlinux-64.deb
Install
sudo apt install ./skypeforlinux-64.deb
visit teams.microsoft.com
See also the Teams section in the communication page.
This download is not available. Only the website (they call it web app) is available for Linux at teams.microsoft.com.
It used to be possible to Donwload teams from microsoft
The install instruction was as follows, but it is not possible any longer, use the teams website instead.
sudo apt install ./teams_1.3.00.25560_amd64.deb
Microphone stopped working in teams I had a sound issue. I managed to reactivate the sound under Debian settings / sound / applications there by reactivating the sound for cmus this somehow also affected teams and I could hear the audio again in teams after that. Or maybe I also change the settings for Skype? In any case I have sound again in teams now. Yes, after looking at another laptop with teams only (no Skype) I’m sure that teams appears as “Skype” in that Debian settings / sound / applications menu.
Questions related to the lack of screen sharing capability on Linux:
How to share your screen or at least a pdf presentation with microsoft teams on linux? Paul asked this question.
Screensharing not working in the official MS Teams for Linux
These screen sharing issues have been solved in the teams website. It’s possible to share your screen on Linux, from the Firefox web browser or from Chromium.
Edit the keyboard configuration as explained in [mapping caps lock to escape in Debian] (https://martin.hoppenheit.info/blog/2014/mapping-caps-lock-to-escape-in-debian/)
sudo vim /etc/default/keyboard
Add the following line to that file:
XKBOPTIONS="caps:escape"
Copy the links, then download the software and signature file
cd ~/downloads
curl -O
# For example
curl -O https://www.expressvpn.works/clients/linux/expressvpn_3.13.0.8-1_amd64.deb
curl -O https://www.expressvpn.works/clients/linux/expressvpn_3.13.0.8-1_amd64.deb.asc
cat expressvpn_*_amd64.deb.asc
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0xAFF2A1415F6A3A38
gpg --fingerprint release@expressvpn.com
gpg --verify expressvpn_3.13.0.8-1_amd64.deb.asc
gpg --verify expressvpn_3.14.0.4-1_amd64.deb.asc
You might want to define the trust level of the express vpn key (to make sure subsequent installs are verified with the same key over time)
gpg --edit-key release@expressvpn.com
gpg> trust # 3 = I trust marginally
Your decision? 3
Install
sudo apt install ./expressvpn_3.14.0.4-1_amd64.deb
Debian and ubuntu system administration wajig docs
Usage
Tab Show index and switch to Index mode
The configuration file is located at ~/.config/zathura/zathurarc.
More information in man zathurarc
.
Invert color is map to Ctrl+r by default, to map it to Ctrl+i, edit the configuration file
map <C-i> recolor
Copy to clipboard (instead of middle mouse button clipboard)
set selection-clipboard clipboard
Scroll
set scroll-full-overlap 0.08
cd ~/downloads/
rm zoom_amd64.deb
wget https://zoom.us/client/latest/zoom_amd64.deb
# Check public key fingerprint
rm ~/downloads/pubkey
wget https://zoom.us/linux/download/pubkey
cat pubkey | gpg --import-options show-only --import
# Add the public key to the keyring
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 59C86188E22ABB19BD5540477B04A1B8DD79B481
gpg --verify zoom_amd64.deb
# Install
sudo apt install ./zoom_amd64.deb
I use the web based version of Webex
To remove background noise edit the pulseaudio configuration file:
vim /etc/pulse.default.pa
Add these lines
load-module module-echo-cancel source_name=logitechheadset
set-default-source logitechheadset
Restart pulseaudio
“dummy output” issue. Seen on a Debian Forum one of the answer to Pulse Audio shows “dummy output” linked to that KDE PulseAudio page: KDE PulseAudio Integration “One thing that can happen is that some other process”hogs” the audio device during PulseAudio startup. When this happens PA is unable to use the device until it is restarted. If PA is unable to open your hardware, you will automatically be given a “Dummy Output”. As the name suggests, anything that is “Played” via this device is inaudible). This “Dummy Output” should be easily visible in both KMix and Phonon. If this happens, then you can debug which process is hogging the hardware via the command: sudo lsof /dev/snd/* /dev/dsp* (Note that apps which have the /dev/snd/control* devices open are unlikely to interfere).”
Debian wiki Missing playback devices or audio capture deleting the configuration files and restarting pulseaudio. The following commands restored audio:
$ rm -r ~/.config/pulse /tmp/pulse-*
$ pulseaudio --kill
$ pulseaudio --start
Some keyboards have media keys stop, previous, play/pause, next. I’d like to remap them to play pause in cmus. In the mean time I have set ‘Ctrl+Shift+P’ as a shortcut in settings/keyboard, ‘+’ at the bottom:
cmus-remote --pause
Some programs require fonts that are not installed by default. For example:
sudo apt install fonts-crosextra-carlito fonts-crosextra-caladea
sudo apt install fonts-deva-extra
List of missing fonts SubstitutingCalibriAndCambriaFonts
In a remote desktop session of Apache Guacamole inside a tab in Firefox. Copy-paste works only in one direction. I can copy from inside the remote desktop session and paste into the host system, but it doesn’t work in the other direction, I can not copy from the host system to the remote desktop session.
Blog post on “Firefox copy and paste with Apache Guacamole” https://sudoedit.com/firefox-async-clipboard/
dom.events.testing.asyncClipboard
to true in an attempt to
enable pasting into a remote desktop session in Firefox. –> This
didn’t work on its own.Based on the Stackoverflow pages I also changed
dom.events.asyncClipboard.readText
to true. –>
This didn’t work, reverted to false.
dom.events.asyncClipboard.clipboardItem
set to
true
Restarted the browser. After that it worked. It appears both
dom.events.testing.asyncClipboard
and
dom.events.asyncClipboard.clipboardItem
are needed for the
copy paste to work from Firefox.
Related pages:
Related bug on Mozilla.org https://bugzilla.mozilla.org/show_bug.cgi?id=1619947 that introduces the
https://bugzilla.mozilla.org/show_bug.cgi?id=1809106 I commented:
“asyncClipboard is also required to paste content into remote desktops with Apache Guacamole.”
“Besides settting dom.events.testing.asyncClipboard to true as explained here https://sudoedit.com/firefox-async-clipboard/ on my laptop (tested also with a colleague) it appears that dom.events.asyncClipboard.clipboardItem is also needed”
“I’m wondering if/when these settings can be enable by default?”
W3C 2022 specification of a clipboard API that accesses data on the system clipboard https://w3c.github.io/clipboard-apis/
“Firefox now supports ClipboardItem behind the pref dom.events.asyncClipboard.clipboardItem”
SO Question https://stackoverflow.com/questions/71710391/firefox-paste-text-from-clipboard-into-input
SO Question https://stackoverflow.com/questions/67440036/navigator-clipboard-readtext-is-not-working-in-firefox
Gnome shell pressing the super key does not work
“You might have locked your super button. Try unlock it on your keyboard. It usually has two icons - a window key and a lock.”
There is indeed a lock on my mechanical keyboard if I unlock it, the super key works again.
In 2024, I had an issue in a HP Elitebook after many years of use the Function and Ctrl key got swapped.
This can be fixed by removing the AC chord and battery according to https://h30434.www3.hp.com/t5/Notebook-Hardware-and-Upgrade-Questions/CTRL-and-FN-keys-suddenly-swapped-Elitebook-8460p/td-p/5075647
This could also have been changed in a bios setting according to https://askubuntu.com/questions/193529/how-to-swap-between-fn-and-ctrl-keys But I didn’t find that bios setting. I changed another bios setting for the Fn key alone. Activating it ended up messing the row of F1 to F12 keys. As a result, I didn’t have to press Fn anymore to change the keyboard backlight, sound volume and screen brightness settings, but that meant I had to press Fn to get to the actual F1 to F12 function keys. Annoying, I switched this bios setting back to deactivated mode.
Sometimes helps with WiFi connection. Restart network interface:
sudo service network-manager restart
Or
sudo systemctl restart NetworkManager
Differences between systemctl and service commands. What is the difference between service and systemctl > “[…], service is designed as a high-level wrapper to”abstract” out various service managers like init.d, initctl, and (of course) systemctl.”
Install
sudo apt install nginx
Attempt at an nginx configuration for server_name.net, based on the default nginx config (comments removed) at /etc/nginx/sites-enabled/default. Directory listing is enabled through autoindex on.
Create a configuration file in sites-available:
vim /etc/nginx/sites-available/server_name.net
Insert the following
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/server_name.net;
index index.html index.htm index.nginx-debian.html;
autoindex on;
server_name server_name.net;
location / {
try_files $uri $uri/ =404;
}
}
Create a symbolik link to sites-enabled
ln -s /etc/nginx/sites-available/server_name.net /etc/nginx/sites-enabled/server_name.net
Restart NGINX as a super user:
systemctl restart nginx
Install certbot and the related nginx plugin
su
apt install python3-certbot-nginx
Make a certificate for nginx as explained on the debian wiki page for letsencrypt.
export PATH=/usr/sbin:$PATH
certbot --nginx -d edartra.de --post-hook "/usr/sbin/service nginx restart"
Enable auto renewal of certificate:
su
crontab -e
Add the following line
16 3 * * * certbot renew --post-hook "systemctl reload nginx"
Note: In my case the certbot command failed with the following message:
The error was: NoInstallationError("Could not find a usable 'nginx' binary. Ensure
nginX EXIsts, the binary is executable, and your PATH is set correctly.")
Because /usr/sbin
was missing from the PATH. To add it
temporarily before running the certbot
command:
export PATH=/usr/sbin:$PATH
Edit the file in sites-enabled
vim /etc/nginx/sites-enabled/server_name.net
Add the following content
server {
root /var/www/server_name.net;
index index.html index.htm index.nginx-debian.html;
autoindex on;
server_name server_name.net www.server_name.net;
location / {
try_files $uri $uri/ =404;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/server_name.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/server_name.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# Redirect http to https
server {
listen 0.0.0.0:80;
server_name server_name.net www.server_name.net;
rewrite ^ https://$host$request_uri? permanent;
}
Under Gnome Settings / Mouse and Touchpad, I set Natural scrolling off under the mouse and the touchpad sections.
The issue is that sometimes the display menu doesn’t provide all resolutions available for a given additional screen. Typically resolution suggested are lower than the one recommended by the screen.
Ask Ubuntu Adding a custom resolution with Wayland I tried this answer and added this to the kernel boot parameter. Note from ubuntu wiki kernel boot parameter “Be sure to add a SPACE after”splash” before adding your new parameter.) Click the Save button, then close the editor window. ”
sudo vim /etc/default/grub
Then edit this line
GRUB_CMDLINE_LINUX_DEFAULT="quiet video=DP-2:1920x1200@60"
Then update grub
sudo update-grub
This did make the new resolution available in the Gnome display settings.
Debian 10 Buster uses wayland as a window manager. To force the use of x11 for zathura, in debian a zathura wrapper script containing:
#!/usr/bin/bash
GDK_BACKEND=x11 /usr/bin/zathura "$@"
Can be placed under the default user bin located at ~/.local/bin.
This is one of the first element of the $PATH
environment
variable.
xrandr doesn’t work with Wayland Askubuntu wrandr will not work with wayland The information on setting a resolution with cvt is still relevant. CVT calculates VESA CVT mode lines.
How to force screen resolution in Ubuntu and make it permanent The lack of auto detection of the available resolution probably mostly arises with VGA ports. See all active screens with the RandR extension:
xrandr
Create a new resolution using cvt :
cvt 1920 1200 60
# 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz
# Modeline "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
Use the output of the cvt command to create a new mode
sudo xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
An askubuntu answer suggests the same command without sudo.
Find the display
xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/"
Add new display mode where is the output from the previous command
xrandr --addmode XWAYLAND1 1920x1200_60.00
This will add the new resolution to your existing list of supported resolutions. You can then choose the right option from the “display settings” or following command
xrandr --output XWAYLAND1 --mode "1920x1200_60.00"
Find out which Debian version is running
cat /etc/issue
Display the OS release
cat /etc/os-release
To suspend the system from the command line:
systemctl suspend
or
systemctl hibernate
To stop the system
sudo halt
These tools are not specific to Debian. I place them here because I use Debian as my main system. If a section gets too large it may get moved to another page in the future.
The most important Gimp shortcuts are:
I followed the documentation on upgrades from Debian 8, Jessie
In bash store the output of apt-get install with many dependency issues in a text file
$ sudo apt-get -f install > aptgetfinstall.txt
Using R to extract all packages and try to remove them
R> bli <- readLines("aptgetfinstall;txt")
R> blil <- strsplit(grep("^ [[:alpha:]]", bli, value=TRUE),":")
R> pkgissues <- unlist(lapply(blil, "[[", 1))
The bash command to remove a package was
$ sudo dpkg --force-all -P <packagename>
Send this command for all packages
R> lapply(paste("sudo dpkg --force-all -P ", pkgissues),system)
debian.org buster upgrading
tecadmin.net upgrade debian 9 to debian 10 buster
sudo apt update sudo apt upgrade
Edit the sources.list files to replace “stretch” by “buster”
sudo vim /etc/apt/sources.list
# in vim :%s/stretch/buster/g
Attention, I had another sources.list file under a subdirectory I had to comment the sources mention there as well, otherwise the system wouldn’t uprgade most packages.
sudo vim /etc/apt/sources.list.d/base.list
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
The update steps mentioned above worked well in October 2019, but one year later, in October 2020 I tried to update another laptop from Debian 9 to 10 and many Debian packages were kept back. The GNOME desktop became unstable and I couldn’t log in any longer. I could still log into the command line to make a proper backup of all the data to a USB drive. I ended up reinstalling a fresh version of Debian buster 10 to that laptop. The lesson I learned from this, is that it’s better to update to a new stable release pretty soon after it’s released.
Debian releases: > “Debian is version 10, codenamed buster was initially released as version > 10 on July 6th, 2019 and its latest update, version 10.6, was released on > September 26th, 2020.”
Following the updates at https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#backup
First update the current version of your system
sudo apt update
sudo apt upgrade
Added the following lines to /etc/apt/sources.list and commented all the other lines
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb https://deb.debian.org/debian-security bullseye-security main contrib non-free
# R installation
deb http://cloud.r-project.org/bin/linux/debian bullseye-cran40/
Recorded the process with
script -t 2>~/upgrade-bullseyestep.time -a ~/upgrade-bullseyestep.script
That file ended up having 24000 lines at the end of the update.
Then ran
sudo apt update
sudo apt full-upgrade
Update instructions at https://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.html
Remove forgotten packages
apt autoremove
Remove obsolete packages
apt list '~o'
sudo apt purge '~o'
List transitional dummy packages
deborphan --guess-dummy
Edit APT sources with the following lines that should replace bullseye sources
sudo vim /etc/apt/sources.list
# Note that non-free-firmware is needed now for firmware
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb https://deb.debian.org/debian bookworm-security main contrib non-free non-free-firmware
Also change the R package source in that file as explained in https://cran.r-project.org/bin/linux/debian/
deb http://cloud.r-project.org/bin/linux/debian bookworm-cran40/
Recording the session with
script -t 2>~/upgrade-bookwormstep.time -a ~/upgrade-bookwormstep.script
Update
sudo apt update
Minimal system upgrade
sudo apt upgrade --without-new-pkgs
# W: Possible missing firmware /lib/firmware/i915/cnl_dmc_ver1_07.bin for module i915
Upgrading the system
sudo apt full-upgrade
“This script detected the following installed services which must be stopped before the upgrade: postgresql”
Stop PostgreSQL
sudo service postgresql stop
Configuring PostGreSQL
“Obsolete major version 13 The PostgreSQL version 13 is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-15 and postgresql-client-15) and upgrade the existing clusters with pg_upgradecluster (see manpage). Please be aware that the installation of postgresql-15 will automatically create a default cluster 15/main. If you want to upgrade the 13/main cluster, you need to remove the already existing 15 cluster (pg_dropcluster –stop 15 main, see manpage for details). The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-13 and postgresql-client-13 packages should be removed. Please see /usr/share/doc/postgresql-common/README.Debian.gz for details.”
Lots of messages about possible missing firmware
W: Possible missing firmware /lib/firmware/i915/dg2_dmc_ver2_07.bin for module i915
Install firmware-linux (is it good?) saw it here https://unix.stackexchange.com/questions/556946/possible-missing-firmware-lib-firmware-i915-for-module-i915
sudo apt-get install firmware-linux
Purging removed packages
apt list ‘~c’ sudo apt purge ‘~c’
Uses this “A collection of nerdy interviews asking people from all walks of life what they use to get the job done”.