< | >

Hacker's Diary

A rough account of what I did with Emacs recently.

May 24
If I'm understanding this correctly: I can't uninstall these Python packages because I installed them on a previous version of MacOS, and they landed in a directory that's now protected by System Integrity Protection. In fact, not only can I not uninstall them, I can't upgrade them or do anything else that involves removing the files from the protected directory. Well, I can reboot to recovery, turn off SIP, boot up, remove them, reboot to recovery, reenable SIP, and so on, but that's tedious.


May 21
I've been trying to remove Dropbox from things as much as possible (why? reasons!) and for the most part it's been fine but I have one application which uses Dropbox, and only Dropbox, for desktop/mobile sync, and worse, said application moved online a few years back so there are no expected updates for it to use e.g. iCloud Drive. Add to this the failing disk mentioned before, requiring me to move some stuff to a new machine, and you arrive at the point where I discover that Dropbox now only allows three devices to sync under the free plan. So that's actually helping me close things off - the three devices will most likely be phone, tablet, and the machine I just set up. Now if I can figure out a way to get all my data out of that one application and into one which does the same thing without Dropbox...

May 18
"Why's this server running so slowly, anyway?"

disk0s2: I/O error.

Rats. Something else to fix.


May 14
VPN works. Connection much better: still a few occasional latency spikes but the persistent packet drops seem to be gone. My hand-rolled monitoring tools are all broken for the moment as they relied on screenscraping and (1) the UI is obviously different plus (2) the modem is actually unroutable when it's in bridge mode.

So much for the digibox plans. Turned on the news to discover the picture was blocked out by the old UPC "setting up your box" screen. Checked my Virgin account to discover the old digibox has been deregistered. GAH. Aside from the saved episodes of Star Trek: TNG (go on, laugh it up), there's a bunch of season-recording setups. It would, it seems, be really nice and customer-friendly if at least these could be transferred to the new box, but hell no. Oh well, let's get this new box up and running.

It takes... an awfully long time to boot up. Started at 18:45 with the intention of hopefully getting signal back to catch a show at 19:00. 19:00 was when it decided it needed to download a firmware update, I think. Not sure. Then it came up with a poor-quality picture and no available channels other than the demo channel. Then eventually whatever back-end processes need to happen happened, and things started working. 19:00 show long gone, though.

It's a funny box. I'm sure it's got multiples of the horsepower of the old box, but it's still sluggish to navigate. It does a weird upsampling thing from SD to HD which makes SD programmes look slightly blurry. The remote has a keyboard on the back, but when you try to connect the box to your wifi, you have to use the arrow keys to navigate a spinner of letters to enter the password. I'm also slightly perplexed by the fact that it's got (apparently) wifi and ethernet access points, sort of making the other box obsolete, but maybe like the old setup those bits just aren't used? Anyway. Welcome to the house, new, slightly weird box.

Also, Happy Birthday to The Dad!

May 13
13:30: no delivery.
14:30: no delivery.
15:30: no delivery.
16:30: no delivery.
17:30: no delivery.
17:40: driver shows up - no explanation for lateness given - and says he can't give me the new box unless I give him the old one. To give him due credit, he proceeds to phone base who tell him to give me the box, and relay to me that I should get back on to Virgin once I've got things set up to arrange collection of the old box.

New box install: not exactly smooth. A bit of pilot error here, in as much as I'd connected my Apple Airport Express back to front so the WAN was getting LAN DHCP and vice versa. Took me longer than you'd expect to figure that out. Switched the new box into bridged mode, something I'd always planned on doing with the old one but never got around to, but since the new box's LAN IP range is hardcoded to 192.168.0.x, and the entire house network expects 192.168.1.x, I sort of didn't have too many options. Only weirdness is that my office VPN connection establishes correctly and then drops off about ten seconds later.

"Your Wireless Gateway is currently updating it's software". Someone approved that sentence for release, complete with errant apostrophe.

New modem came with a friend: a new digibox. Of course we've got a bunch of stuff recorded on the old digibox which can't be transferred, so I'll hold off setting up the digibox until we've watched a few things. Maybe a weekend binge.

Google suggests that the VPN issue may be Airport Express IPv6 something something. Made the appropriate tweaks and went to bed. I'll test it in the morning.

May 12
Bit the bullet and called Virgin Media tech support. Usual deal: reboot the modem. Oh it's an old modem, the only fix is to upgrade. No acknowledgement of the coincidence of the alledged modem degradation with Virgin's very public large-scale outage. Sigh. Fine, go ahead and send me a new modem. Transferred to sales. Took longer than necessary to establish that, yes, despite the fact that it's not obvious on the link I've been directed to, existing add-ons would be maintained.

Look, I understand you're overwhelmed and under-resourced, but that's why you tighten up your processes to remove ambiguity.

Kit will arrive "some time" in the next 48 hours, according to an email addressed, "Hooray RONAN WAIDE!". The all-caps full-name approach doesn't really personalise this, y'know?

Later: Another email, addressed "It's almost time RONAN WAIDE". Seriously, give up on the personalisation if you're not going to do it right, it just comes off as weird. My delivery will, it says, occur between the hours of 13:30 and 15:30. The "Nightline delivers" logo on the email goes to a defunct Zendesk install, which bodes well. Oh, and I can't "pack up my old equipment" ready for the driver to take it away because it's in use (plus, doesn't that sort of encroach on the whole cooling-off period thing?)

May 10
We continue to have Network Weather. I will brave the gauntlet of tech support tomorrow, I guess, to see if we can get anything done about it. I've taken to using a 4G hotspot for conducting interviews because some combination of packet loss and, I dunno, an aggressive media protocol? conspire to periodically brown out, leaving me with no audio and the person on the other end wondering if I'm still there.

In the interests of quantifying the badness I resurrected my old MRTG setup and attempted to drag some additional pieces of information both into and out of it. I'm spoiled at work: I can go to a central dashboard and click click click to get high-res graphs for the things I'm interested in. Even getting MRTG to run required an amount of swearing, a refresh of various things with Homebrew (which I don't hate, but do strongly dislike), some research on how to tell Homebrew that yes, I do want the Perl modules installed, thanks, and an attempt to set up a ssh-in-and-ping-someone probe on the Airport Express.

And I've got pages bookmarked on the topic of building a cross-compiler toolchain for the Airport, too. NO REASON AT ALL YOUR HONOUR.


May 6
After the last round of keyboard-related yak-shaving, I had functional modifier keys, but there were a few other things amiss that I hadn't sorted out. But now I know (sort of) how this works, so not only did it only take me about five minutes of tinkering to restore §, ±, ' and ~ to their rightful places, I also had two or three instances during the day where I realised that a couple of keys were operating in "dead" mode (i.e. you need to press them twice to get the character you're looking for, principally so you can use them as compose keys to produce accented characters) and was able to sort them out. Admittedly I've now got a slightly frankensteinish keyboard configuration file, but it works.

I should note that there are GUI tools to manage this, albeit several years out-of-date. That detail notwithstanding, they didn't work (the obvious combinations of selections producing both an on-screen error and a broken keyboard layout) which I'm sure is because I was holding it wrong, or something.

Our network has been a bit iffy ever since Virgin Media's recent outage, but I've also been meaning to rearrange things a little, so last night once all the Internet Things Were Done, I took it all apart and tried a few different arrangements. Net result (hah) is that I'm still getting upstream loss from Virgin (unscientific measurement says 0.40% overnight, and that's just between our router and the router's default gateway somewhere off in Virgin land) but the internal network loss that I was encountering appears to have subsided. My best theory on the internal loss is that the EPC2425 router provided by Virgin which I've steadfastly refused to upgrade has either the world's worst switch built into it, or it's actually a hub, and the LAN was being saturated with collisions as a result. Now everything's using a dinky little gigabit switch, which in turn is hooked to an Apple Airport Express (replacing the EPC2425's wifi, mainly), which is in turn hooked to the EPC2425. Probably over the weekend I'll try switching the EPC2425 to bridging mode to simplify things further, and maybe try setting up something a bit more sophisticated to measure the loss.


May 1
Friday Yak Shaving: I've been tinkering on and off with an annoying problem: a MacBook Pro, with a Dell USB Keyboard plugged into it, using Microsoft Remote Desktop to connect to XRDP to control an AL2012 system running Gnome. The problem is that at the end of that chain of technology, the Dell keyboard mappings for the Option and Command keys (or Alt and Windows, if you prefer) are incorrect. I'd used the macOS System Preferences to swap the keys around - so the keys next to the spacebar on the Dell keyboard match the Mac layout - but for some reason they didn't work as expected in Gnome; the left and right Command keys appeared to be swapped. What's inolved here is a long chain: firstly, the non-native keyboard requires some form of mapping, then the XRDP client does some mapping, and then the Gnome session does some mapping, and at the end of that if anything actually works it's sort of a miracle. And I'd no idea what part was broken.

Eventually I realised that the swapped keys only happened on the Dell keyboard, meaning that the likely sources of error were on the Mac rather than the XRDP or Gnome ends of things. Some more tinkering and a bit of Google searching and I found not one, but two problems: firstly, I'd selected the wrong keyboard type from the ISO/ANSI selector that came up when the keyboard was first detected, and you only get that selector the first time around - attempts to re-detect the keyboard type actually failed. Fixing that was a matter of editing the file which records the keyboard type, but that still left me with swapped keys. Further Google searching lead me to an Apple technote about using hidutil to modify keyboard layouts; my first attempt at doing anything with this affected both the Dell and the built-in keyboards, so that wasn't going to be a flyer. Further Googling turned up a StackExchange discussion on using defaults write to modify the global preferences file, but that didn't take effect (the file was modified, but the keymappings didn't take) and fiddling with the System Preferences resulted in the OS cleverly swapping the left and right Command keys again. Eventually I put both pieces together and figured out how to have hidutil target only the Dell keyboard, at which point everything magically worked. What I haven't yet checked is to see if this persists across unplugging and replugging the keyboard, but at least I know how to fix it. And so, presenting the fruits of my labours:
hidutil property -m '{"ProductID":0x2003,"VendorID":0x413c}' \
                          -s '{"UserKeyMapping":[ \
                              {"HIDKeyboardModifierMappingSrc":0x7000000e2,\
                               "HIDKeyboardModifierMappingDst":0x7000000e3},\
                              {"HIDKeyboardModifierMappingSrc":0x7000000e3,\
                               "HIDKeyboardModifierMappingDst":0x7000000e2},\
                              {"HIDKeyboardModifierMappingSrc":0x7000000e6,\
                               "HIDKeyboardModifierMappingDst":0x7000000e7},\
                              {"HIDKeyboardModifierMappingSrc":0x7000000e7,\
                               "HIDKeyboardModifierMappingDst":0x7000000e6}]}'
Easy, huh? I still have to sort out the mapping on the Gnome end of things, mind you, because it's pretty convinced that I'm using a US keyboard layout, and it denies the existence of some of the alternatives that clearly exist in the keyboard configs.

previous month | current month| next month


Waider
Locked Down