How to remap keys under Linux and Wayland

As a German living in Germany with umlauts in my last name and a US ANSI keyboard layout on all my devices1 I need to remap some stuff to be able to easily type ä, ö, ü and ß. On Windows I solved this with Autohotkey, mapping AltGr+a to ä, AltGr+o to ö, AltGr+u to ü and AltGr+s to ß (well, technically RAlt - the right Alt key). That has burned itself into my muscle memory now, and so while currently setting up my new Framework laptop under Linux, with Gnome running on Wayland, I was looking for a way to remap the keys to this layout as well....

March 3, 2023 · 6 min

How to make dnf default to yes

I’m currently in the process of setting up my new Frame.work laptop, and since I’ve been using Debian-derivatives for the past two decades now, I decided to use the opportunity, try something new for once and installed Fedora1. Something that got annoying quickly is that the package manager command dnf defaults to “no” when asking if you really want to install a package plus its dependencies. I’m very used to apt’s behaviour here that allows me to type sudo apt install <package> and then just hit Enter on the sanity check....

March 2, 2023 · 1 min

How to add itch.io games to the Steamdeck

I’m currently setting up some alternative game stores on my Steamdeck, specifically Emudeck for my retro collection, Heroic Launcher1 for GOG and Epic, and also itch.io. I stumbled across this Reddit post that recommended to use the itch.io Windows launcher instead of the native Linux one: Itch.io has an app, that even has linux version. But it has issues - it can only use one wine version, if you have it installed globally, it can’t even handle linux games well....

February 24, 2023 · 3 min

How to automatically sync screenshots from the Steamdeck to Google Photos

As a follow-up to my earlier post about how to sync screenshots to Google Drive here’s how to achieve the same but with a dedicated “Steamdeck” album on Google Photos instead. Once again we are using rclone for syncing. First I created a new target gphoto by running ~/bin/rclone config again and then following these steps. Quick summary: New remote gphoto Empty application ID and secret Full access No advanced config Use web browser to authenticate I then created a new album:...

February 19, 2023 · 1 min

How to automatically sync screenshots from the Steamdeck to Google Drive

I wanted to automatically sync the screenshots I take on my Steamdeck to some cloud, without having to manually do it for every single one in the Steamdeck’s own uploader. I came across this gist by pegasd that accomplishes this via rclone, a path monitoring systemd service and some reconfiguration in Steam. However, I had to adjust things slightly for everything to really work - I could imagine that some past Steam update changed things slightly vs when the gist was created:...

February 11, 2023 · Updated February 19, 2023 · 3 min

How to grep a log for multiline errors

I just found myself in the position to have to grep an OctoPrint log file for error log entries with attached Python stack traces. I wanted to not only get the starting line where the exception log output starts, but the full stack trace up until the next regular log line. The format of the lines in octoprint.log is a simple %(asctime)s - %(name)s - %(levelname)s - %(message)s, so a log with an error and attached exception looks like this:...

February 1, 2023 · 5 min

How to determine an RPi kernel version and build without booting it

To figure out the kernel version and build without booting it, e.g. to install matching device drivers during an automated image build in something like CustoPiZer, use something like this: function version_and_build_for_kernelimg() { kernelimg=$1 # uncompressed kernel? output=$(strings $kernelimg | grep 'Linux version' || echo) if [ -z "$output" ]; then # compressed kernel, needs more work, see https://raspberrypi.stackexchange.com/a/108107 pos=$(LC_ALL=C grep -P -a -b -m 1 --only-matching '\x1f\x8b\x08' $kernelimg | cut -f 1 -d :) dd if=$kernelimg of=kernel....

June 16, 2022 · 1 min
Mastodon