Posts from October 2023
Another sock done (first of a pair)! Like my last pair, these socks have a slip stitch bottom and then I added a 3x1 rib on the top and leg for a little stretch and texture. Meanwhile I finished the second toe, and I actually tried to make the stripes match this time….
I’ve been wanting to try a reinforced slip stitch bottom for a pair of socks for a while now, and after some experimentation I think I’ve got it! The result is thick and squishy and I hope quite durable.
Framework owners running Debian testing: if disable-while-typing is not working, I think this is because the libinput quirks file contains a bug and is using an old key.
In /usr/share/libinput/50-framework.quirks change:
AttrEventCodeDisable=BTN_RIGHT
to
AttrEventCode=-BTN_RIGHT
I can’t say this is definitely the culprit, but DWT is now working for me.
So if Ozempic reduces overall impulse consumption (food, smoking, gambling, etc), which therefore reduces a person’s individual carbon emissions due to their buying less, wasting less food, etc, does that increase the ESG rating of Novo Nordisk? Should they earn carbon offsets? Hmm…
Fun fact: while this may look like a single sock, it is in fact 2.5 socks. See, I finished the toe and foot up to the gusset, changed my mind on the design, ripped it out, started again, finished it, didn’t like the fit, then unravelled it and did it again. But it turned out great! Stay persistent, y’all, and never be afraid to rip a piece apart and start over.
After viewing the eclipse we made our way down to Cedar City and then struck out to hike Spring Creek Canyon, which was rumoured to be a stunning hike of a slot canyon in the area. And boy do I concur! Easily one of the most beautiful hikes I’ve done over the years.
Yup, we went on a road trip to Utah and watched the annular eclipse. And it was incredible! Though the photos are just okay. At the last minute I decided to take some pics with my phone through my telescope eyepiece and the results were… just okay. I can’t help but wonder if the eyepiece needed a little polishing…
Three months into my career break and a couple of observations: 1) I thought I might eventually get bored. I absolutely have not. 2) Time flies. Fast. 3) I was concerned about becoming disconnected from people but in some ways the opposite is true as I’m so much more flexible that I can meet people where/when they are. 4) I am absolutely not ready to go back to work yet…
KeepassXC + SSH
I use KeepassXC to store my SSH keys, and with a bit of configuration I can hit one hotkey to add a key to my agent, and then another hotkey to open my preferred shell ssh’ing to the target. Here’s how I do it!
I have maybe a dozen machines I need to connect to on a regular basis and rather than configuring a bunch of sessions in something like Remmina I’ve found KeepassXC can do everything I need to both manage keys and make it easy to launch sessions attaching to those hosts.
Basic key management with KeepassXC is pretty straight forward:
- Create an entry in KeepassXC for the host.
- Fire up ssh-keygen and generate a new private key for the target host using a randomly generated, secure password1.
- Add the new key as a file attachment to the Keepass entry.
- Set the ssh key for the Keepass entry to the attached file.
- Set the password for the entry to the password for the key.
- Set the URL for the entry to
ssh://[user]@[host][:optional port]
.
KeepassXC comes with built in ssh agent integration, so you can select an entry and press C-h to add the key to the agent. At this point you could just fire up a terminal and ssh to the host manually.
However, KeepassXC also lets you press C-S-u to open the configured URL for the entry using
xdg-open
. The trouble is, by default, “ssh://” URLs don’t do anything. However, this is solvable with just a little bit of work.Now, in my case, this is where jaro comes in.
Jaro is a highly flexible resource opener. You call it with a resource (e.g. a file name, URL, etc), and it’ll look into its list of configured associations and take some action.
In my case I set up a couple of associations as follows:
(assoc #:pattern "^ssh://((.*@)?(.*?)):([0-9]+)$" #:program "/path/to/kitty -o term=\"xterm-256color\" -o shell=\"/usr/bin/ssh -p %4 %1\"") (assoc #:pattern "^ssh://((.*@)?(.*?))$" #:program "/path/to/kitty -o term=\"xterm-256color\" -o shell=\"/usr/bin/ssh %1\"")
The first pattern matches ssh URLs that include a port, and the second matches URLs without one. The rules then fire up kitty with ssh as the shell connecting to the desired host and port.
Next, we create a
jaro.desktop
file:[Desktop Entry] Name=jaro GenericName=URL opener Terminal=false Exec=jaro %U Type=Application Categories=Utility;
And drop it into
.local/share/applications
.Finally, we add the following line to
.config/mimeapps.list
:x-scheme-handler/ssh=jaro.desktop
Now, upon pressing C-S-u, KeepassXC will use
xdg-open
to open the configuredssh://
URL, which, based onmimeapps.list
launches jaro, which then consults the configured associations and fires up ssh in my preferred terminal.I know this all sounds like a bit much, but I cannot tell you how incredibly convenient this is! Connecting to one of the many machines I admin is now a simple matter of opening KeepassXC, searching for the host name, selecting it and pressing C-h, C-S-u. Super handy!
-
And don’t forget to use a good, strong cipher. I’ve personally moved all my hosts to ed25519 ECC keys. ↩