I upgraded my monitor for a U3818DW, which has a built in KVM. Changing between the inputs is a little annoying using the buttons on the monitor, so I configured a keyboard shortcut on Linux and MacOS to switch back and forth.

On Linux, I went to Keyboard shortcuts and assigned a custom shortcut to:

ddcutil setvcp 60 0x12

This will swap my input to the Mac, to go back I used the Shortcuts app to run m1ddc, which I installed from brew.

When I have my laptop connected to the dock, I like to close the lid, which means I can't use the internal fingerprint reader.  I have an external fingerprint sensor but gdm won't use that one when the lid is closed.  I found that I could disable the internal one based on the state of the lid switch.
 

I'm using Fedora, I installed acpid and creating a lidconf file in /etc/acpi/lidconf:

I have a list of objects and I want to rewrite them with a prefix and suffix. I couldn't find a good example so I had to work it out myself.


awk '{ for (i = 1; i <= NF; i++) { printf "prefix-" $i "-suffix " } print}'

Audio stopped working after I upgraded from 34 to 35.

I had pipewire, but also had pulseaudio.

This link gave the secret sauce:

 $ sudo dnf swap --allowerasing pipewire-pulseaudio pulseaudio 

Had to logout and log back in, but after that, audio was back to normal.

Recent update changed the event name for Axis events, so I had to update my mousemapper script

https://github.com/uphillian/wayland-mouse-mapper

The Axis changed from -15 +15 to -15/120.* +15/120.* so I had to update the expansion in bash to %%\.* to remove all the extra stuff.

New version seems to work alright so far.  I hardcoded my mouse device this time.

 

Backstory

I bought a Pandora Box and was playing with it for a while, but didn't like that I couldn't add games myself.  So I replaced the Pandora board with a Raspberry Pi 4.

I wired up the joysticks using the GPIO pinout from https://github.com/recalbox/mk_arcade_joystick_rpi

The Pandora uses a 40 pin connector, so I purchased a 40 pin breakout cable to rewrite the 40 pin to the GPIO on the Pi.

https://smile.amazon.com/gp/product/B01EV70C78/

While setting up some cluster machines to run masterless I ran into this bug.  I had a directory structure like this:

code
  module1
    manifests
  module2
    modules
      module3
        manifests

 When running puppet apply with the modulepath code:code/module1/modules I ran into this error, specifically using the logrotate module.

Error: Evaluation Error: Resource type not found Logrotate::Size (file: code/modules/logrotate/manifests/conf.pp, line: 32, column:12)

I updated my private key and added the public key to the authorized_keys on my target hosts and it didn't work.  I ran a few verbose connections to see that the key was being sent, but not accepted.

Turns out the old version of ssh on this server doesn't generate the public key from the private key, it reads the id_rsa.pub file to send the public key.  Since this public key doesn't match what's in authorized_keys, I was denied.

The solution was to delete the public key.  Alternatively, you can generate the public key with ssh-keygen.

I gave a talk on processes and made some simple shortcuts to show processes matching patterns.

psg

ps - grep, grep the process listing for something and show the parent pid, sort by pid.

function psg() {
  thing=$1
  sort=$2
  if [ -z $2 ]; then
    sort='pid'
  fi
  ps -eo 'pid ppid stat cmd' --sort $sort| awk 'NR==1 {print}; /$thing/ && !/awk "NR==1/ {print}'
}

psgi

ps - grep case insensitive.