Posts in category 'linux'
Unexpected ipv6 benefit: upgrading Debian testing, NetworkManager package broke (I still don’t know how). Rebooted to a system with no network connectivity. Thanks to a hard wired dock, all I had to do was an “ip set [iface] up” and everything autoconfigured and I could access Google and the Debian package repos (for the curious, I just had to run
apt-get install --fix-broken
).
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.
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. ↩
First real virtual ride on via Zwift (huge shoutout to @netweed for his docker container, which is the only way I’ve managed to get it running on Linux) and man, does it ever tap into my competitive side… maybe a little too much…
Made the jump from Ubuntu back to Debian testing and man, it really has come a long way! I missed you, buddy!
Debian on Framework
I finally put together a post on getting Debian Bullseye running on my Framework laptop! Here I focus on building a newer kernel plus custom Debian packages for libfprint and fprintd.
I recently received the fantastic first laptop from a new company called Framework, which is specializing in building extremely user-serviceable, repairable, upgradeable laptops (in fact, they recently received a rare 10 out of 10 from iFixit). I opted for the DIY unit, which among other things allowed me to bring my own operating system, and for me the OS of choice is unquestionably Debian Linux.
Prior to receiving my Framework I’d been running Debian testing on a fifth generation Lenovo X1 Carbon. As is typically the case with Lenovo, the X1 worked extremely well with Linux. In fact, it worked far better than I’d ever expected of Linux on a laptop, which I’d come to assume was always an unreliable, janky affair.
Framework has similarly embraced the Linux community but, given the cutting edge hardware they’ve included, I was expecting some rough spots while drivers and so forth matured. And while this has turned out to be somewhat true, the good news is it’s been quite easy to get past those issues, and I’m happy to report that Debian testing is now working extremely well on my Framework.
In the rest of this write-up I cover the steps I took to get a fully functional Debian Bullseye installation running on my machine using the Gnome desktop environment (after which I did an in-place upgrade to Bookworm).
Of course, if you’re looking for a slightly more turnkey solution, I strongly recommend trying out Ubuntu 21.04, which ships with a kernel that fully supports the Framework hardware. You’ll still need to take steps to get the fingerprint reader working, but at least you can avoid compiling a kernel.
Continue reading...One week into upgrading my 5th gen X1 Carbon from @ubuntu 18.04 to 20.04 and it’s darn near flawless! Thank you so much to everyone involved. I was delighted when I was able to wipe Windows 10 from this machine and I’ve never looked back.
I’ve just discovered KDE Connect. Combined with GSConnect for Gnome, it enables remote control of my phone from my Linux laptop and vice versa, and replaces Pushbullet for me. Very nice work!
Running Debian Buster on an OLPC
Back in 2008 I got an OLPC XO-1 during the G1G1 program. Question: Can you successfully run Debian Buster on this modest hardware? Answer: Yes!
Way back in the before time, in the long long ago of 2008, I decided to participate in the One Laptop Per Child Give One Get One program. The vision of the program was compelling: play a small part in enabling childhood education by providing children in the poorest parts of the world access to cheap, simple, rugged computers. Load them with electronic books and educational software. Add support for wifi and mesh networking to enable connectivity. Unlock creativity in kids the way computers unlocked creativity in me.
Things didn’t exactly pan out as everyone had hoped, but I still ended up with my very own OLPC XO-1, and it’s sat quietly in a closet ever since, a toy that I take out and play with occasionally.
Well, we recently did a top-to-bottom purge of our house, and in doing so I once again ran across my XO-1. So I decided to take it out and play with it again. In particular, I was curious: what would it take to run the very latest version of Debian on this modest little device?
Turns out not much! But where it got tricky, it got really tricky…
Continue reading...