Unmet dependencies continue to prevent available Espanso packages from installing on my machine running Debian 12. Given that I depend on Espanso to expand all kinds of text and wanted to upgrade to the latest version for Wayland, I updated the following instructions and installed from source.
Following these instructions, Espanso 2.2.1 for Wayland will be installed on your system and enabled for the current user.
“Why do people take the path less traveled and choose an operating system based on Linux over the proprietary based ones from Microsoft Windows and also the Apple Mac OS? So welcome to the intriguing world of Linux, an operating system that’s been quietly revolutionising the tech landscape.”
A virtual disk image is a block device in a file. There are a number of different disk image formats to choose from when setting up a virtual machine. QEMU Copy On Write version 2 (QCOW2) is the default virtual disk image format for the Quick Emulator (QEMU). Features such as thin provisioning, snapshots and compression make QCOW2 one of the most versatile virtual disk formats available.
These instructions specifically use Debian 12 with a GNOME desktop as the host, but they should also be applicable to other Linux distributions such as Ubuntu or Linux Mint. The virtual machine in this case is a Windows 10 guest using the NTFS file system.
Check the disk size of the sparsified image file. The disk size should be smaller than the virtual size. In this particular case, the disk size is 26.7 GiB and the virtual size 64 GiB.
# qemu-img info /var/lib/libvirt/images/windows-sparsified.qcow2
Determine which partition to resize by obtaining more detailed information about the contents of the sparsified disk image.
# virt-filesystems --long -h --all -a /var/lib/libvirt/images/windows-sparsified.qcow2
On the virtual device /dev/sda, the size of the partition /dev/sda2 is 63G. It appears to offer the greatest scope for resizing, as the overall disk size in Step 7 is only 26.7 GiB in total.
The partition /dev/sda2 listed in Step 8 is equivalent to /dev/nbd9p2 connected as a network block device. Use GNOME Disks to shrink /dev/nbd9p2 to its Minimal Size.
Use a graphical utility to minimise the risk of introducing errors.
Step 12
Disconnect the resized image.
# qemu-nbd -d /dev/nbd9
Step 13
Unload the NBD kernel module.
# modprobe -r nbd
Step 14
Create a target image larger than the resized source image. In this example, the size of the target image is 32G and its format QCOW2 with full preallocation and a cluster size of 2M.
You can also modify format specific options for an existing image without having to create a target disk image. Or alternatively expand into a target image that uses a format compatible with other hypervisors, such as RAW, VMDK, VDI, VHD, VHDX or QED.
Continue by obtaining relevant information about available storage devices.
$ sudo smartctl --scan
Depending on the type of disk, you should see a block of information similar to the following.
/dev/sda -d scsi # /dev/sda, SCSI device
Step 4
Enable SMART support for and display detailed information about the device.
$ sudo smartctl -iHs on /dev/sda
Ideally, information about the device to be monitored would be found in the drive database.
=== START OF INFORMATION SECTION ===
Device is: In smartctl database [for details use: -P show]
The device should report a successful self-assessment test.
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Please note: the drive database does not extend to NVMe devices. SMART support for NVMe devices is curently limited to a subset of features.
Step 5
Verify the SMART capabilities of the device.
$ sudo smartctl -c /dev/sda
The following output confirms that the device /dev/sda has both short and extended self-test capabilites.
=== START OF READ SMART DATA SECTION ===
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 85) minutes.
The output provides estimates for the duration of short and extended (long) self-test routines.
If the device is capable of self-tests
Use the following command to run a short self-test.
$ sudo smartctl -t short /dev/sda
Use the following command to run a long self-test.
$ sudo smartctl -t long /dev/sda
Display a list with the results of recent self-tests in reverse chronological order.
$ sudo smartctl -l selftest /dev/sda
All tests should have completed without error.
Step 6
Edit the default configuration /etc/smartd.conf and comment out any DEVICESCAN options, thus preventing smartd from attempting to search for attached devices indiscriminately.
On Debian 12, you can use the following command to comment out the DEVICESCAN option in the default configuration file.
For the device /dev/sda, the following configuration for monitoring the device with smartd would have to be added to /etc/smartd.conf.
/dev/sda -H -l error -l selftest -S on -s (L/../.././06|S/../.././18) -m root -M test
-H display the health status as reported by the device
-l error show the increase in the number of SMART errors since last check
-l selftest show the increase in the number of failed tests in the SMART Self-Test Log
-S on enable Attribute Autosave on startup
-s (L/../.././06|S/../.././18) schedule a long self-test between 06:00 and 07:00 daily and a short self-test between 18:00 and 19:00 daily
-m root local user root receives warning by email
-M test send a test email on startup
Example configuration for smartd and NVMe devices
Current versions of smartmontools offer experimental support for NVMe devices. In practice this means that only a limited, but still useful, feature set is available.
For the device /dev/nvme0, the following configuration for monitoring the device with smartd would have to be added to the end of /etc/smartd.conf.
/dev/nvme0 -H -l error -m root -M test
-H display the health status as reported by the device
-l error show the increase in the number of SMART errors since last check
SSH is a protocol that enables secure connections over unsecured networks. It supports the use of asymmetric encryption for user authentication. Private keys are kept locally, while public keys are stored on the remote machine.
The following configuration disables root logins on the remote machine. Only users belonging to the group ssh-users may establish a connection. Access to the remote machine is tied to the local user’s private key.
In this example, the name of the remote machine is debian-server, which has the address 192.168.1.10 on the network. sid is a user on debian-server, whereas bookworm is a user on the local machine. Choose an encryption passphrase to secure the private key that you will generate in Step 5.
On the remote machine
Step 1
Install the secure shell server with the following command:
$ sudo apt install --yes openssh-server
Step 2
If you are using ufw as a host-based firewall
Configure ufw to allow connections to the secure shell server.
$ sudo ufw limit ssh
If you are using firewalld as a host-based firewall
Configure firewalld to allow connections to the secure shell server.
When prompted to confirm the authenticity of the host debian-server, type yes and press [Enter].
The authenticity of host 'debian-server (192.168.1.10)' can't be established.
ED25519 key fingerprint is SHA256:C9RxLLVbvFwVJc0L4JHzcuHQSaPHJZe/GrRDvqy6rAG.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
In the next step, enter the passphrase for your private key.
Enter passphrase for key '/home/bookworm/.ssh/id_ed25519-debian-server':
Display the active configuration for the remote ssh server and verify its settings, paying particular attention to options for maxauthtries, permitrootlogin and passwordauthentication.
The OneDrive Client for Linux connects your Debian or Ubuntu system to Microsoft’s OneDrive Personal, OneDrive for Business, OneDrive for Office365, Sharepoint and other such deployments.
Step 1
Install the OneDrive Client from the Debian or Ubuntu repository.
Begin to connect the client to your OneDrive account.
$ onedrive --synchronize
You will be presented with a message similar to the following:
Configuring Global Azure AD endpoints
Authorize this app visiting:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%Sites.ReadWrite.All%20offline_accessresponse_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
Enter the response uri:
In the above dialog, copy or [Ctrl + Click] the URI beginning with https://login.microsoftonline.com/.
In a web browser
Use the URI from the previous step to sign into your Microsoft account. You will be redirected to a response URI displaying a blank page. Copy the response URI from the address field of your browser.
In the terminal
Paste the response URI into the terminal. On successful authentication, the OneDrive Client will connect to your Microsoft account and begin to download your data.
Initializing the Synchronization Engine …
Syncing changes from OneDrive …
Creating local directory:
Downloading file … done.
Uploading differences of ~/OneDrive
Uploading new items of ~/OneDrive
Step 3
After downloading your data to ~/OneDrive, validate the configuration of the client.
If you want to receive status updates from your Debian or Ubuntu system, you need to employ the help of a mail tansfer agent (MTA). nullmailer is a relay-only forwarding MTA that can be used as an alternative to more complex MTAs such as Exim, Sendmail or Postfix.
nullmailer can be configured to use Fastmail as a smarthost and hence ensure the deliverability of your messages. In principle, these instructions should also be applicable to service providers other than Fastmail.
In the following example configuration, debian is the hostname, bookworm the local username and linus.torvalds@fastmail.com the Fastmail username.
The usefulness of this project cannot be overstated.
Running the Syncthing stable channel
Syncthing is included in the Debian and Ubuntu repositories, respectively. These instructions are targeting the latest release of the Syncthing stable channel. It is therefore necessary to add the Syncthing repository to your list of APT sources.
In the following example, bookworm is the local username.
Step 1
Add the Syncthing release key for validation of packages downloaded from the Syncthing repository.