I've finally switched from X11 to Wayland. I use the wlroots-based compositor River . Since GIMP doesn't support the current wlroots screenshot protocol, I've written the plug-in screenshot-grim , which takes screenshots with Simon Ser's Wayland tools grim and slurp. Simon Ser writes that support for new screen capture protocols has been merged into wlroots. But for now, using grim is a simple…
Use systemd-run to mount your filesystems read-only for rsync if you backup files with tools such as rsnapshot but don't want the backup software to be able to write to your client. Execute the shell script below from your SSH authorized_keys file on the backup client. Example: command="/usr/local/sbin/rsnapshot-rsync",restrict ssh-ed25519 ... #!/bin/sh # Run rsync from SSH with read-only…
At home, I've run X11 without root privileges for some time. Because of recent security issues in X.Org and the fact that LightDM still doesn't support non-root X , I decided to replace LightDM with the GNOME Display Manager (GDM) on the Debian workstations at the office. As we use the Xfce desktop, GDM gets installed with minimal dependencies: apt install --no-install-recommends gdm3 We also need…
This week's challenge asked us to extract information such as the age from passenger details and then to identify senior passengers. Let's look at some Kotlin code first. My solution uses a data class . We cannot use secondary constructors to extract data from passenger details, but companion objects with invoke operators can be called like constructors. Finally, the passenger details are mapped…
I started to contribute to the Weekly Challenge in Kotlin and Perl in June. This week, we were asked to write a script to return all integers that are present in at least two out of three arrays. I decided to use the builtin::indexed function, which was added to Perl 5.36 and will hopefully become stable soon. I also learned that unpack can count the number of set bits in a bit set. use 5.036 ;…