I can no longer sync iOS’ Contacts with my macOS Catalina’s Finder (the iOS sync portion of iTunes is now built into the Finder in macOS Catalina); the OS insists I’ve iCloud configured for Contacts which I do not. I’ve gone through all the steps Apple recommends, done the upgrades and the reboots, but there’s nothing doing. All the swearing and threatening of moving to a different operating system aren’t really helping. This started sometime after I wrote about setting up macOS to “dial” a number using a shell script, but it cannot be related.

I was spilling my sorrows on Christoph who simply said he avoids all those issues by using CardDAV. I slapped my forehead: I’ve been using CalDAV for years, for synchronizing two calendars across devices: my own calendar across two Macs, an iPad, and an iPhone, and the family calendar across the family’s devices. How could I have forgotten about CardDAV?

Baïkal has served us well for many years (the modification timestamp on the configuration reads August 2013). Before looking at using it for CardDAV I thought I’d put it on my little FreeBSD system in a BastilleBSD jail. The calendar migration was easy enough but produced a litre or two of adrenalin when I watched one calendar after the other disappear from iCal. Anyway, I got the data imported and our small family was back in sync.

I then created a Baïkal address book for myself, set up macOS and an iPhone to use that, and created a pseudo person’s entry on the Mac and another on iOS, and experimented a bit with how long it takes either side to sync, etc. As soon as I was satisfied I copy/pasted all contacts from macOS’ internal address book to its CardDAV store. When my contacts showed up on the iPhone, I knew I was half in business. After an additional backup I cleared out all the local contacts on the Mac.


I recently had to purchase a new old phone for testing OwnTracks on Android and settled for a used Samsung Galaxy S8, a device which vastly exceeded my expectations. A really nice piece of kit, if only it weren’t for Android … #halfkidding

I went the whole hog and decided to see how well I could work with the S8 and purchased a copy of DAVx5 which is a really good and well thought-out bit of software. There’s an Open Source but I decided to pay for the software – developers must live off something other than applause and fresh air.

screenshot of contact on Galaxy S8

I can create, edit, and delete contacts on the S8 and DAVx5 will synchronize them back via CardDAV to my server. Just the way it ought to be.

CLI FreeBSD / Linux

I mostly use Mutt as an email client which means I want to be able to integrate whichever solution I come up with with these tools. A quick search led me to install vdirsyncer which enables me to synchronize my CardDAV server with a local directory of vCard files on the file system. If I change any of these files the utility can then synchronize the changes back to the server and, using a post_hook script I write, can version control the vCard files it receives on the file system. (Source code: vdirsyncer.) The program’s configuration file reminds me of OfflineIMAP’s and its operating principles are similar: I configure a local and a remote store which are kept in sync.

$ export REQUESTS_CA_BUNDLE=mensCA.crt
$ vdirsyncer discover
$ vdirsyncer sync

Now that I have a set of vCard files in a directory, I can use khard, an address book for the Unix command line, which reads, creates, and modifies these files, and which can also be integrated with other programs, suitable for my use with Mutt.

$ khard new ..
$ khard edit ..

$ vdirsyncer -v WARNING sync
$ khard list jolie
Address book: jpm-ab
Index    Name           Phone                          Email
1        Jolie, Jane    work, pref: +49 555 6302547    work, pref: jane.jolie@example.org

$ khard show jolie
Name: Jane Jolie
Full name: Jane Jolie
Address book: jpm-ab
    Birthday: 1969-07-10
    Nickname: jj
    work, pref: +49 555 6302547
    work, pref: jane.jolie@example.org
    OwnTracks: owntracks/jjolie/s8
    UID: 9245cfe6-256f-40d3-aabf-b3bab4601273
        - _$!<HomePage>!$_: jj.example.org
    Note: Actress

Khard is just an example; any program able to read or manipulate vCard files would be suitable.


mcds, written by Timothy Brown, is a Mutt CardDAV search program – a C program which uses a combination of curl and libxml2 to query a CardDAV server to obtain mail addresses from the vCards. The program uses a simple configuration file in which I can specify the URL to my server, a username and whether I want to use a ~/.netrc containing the clear-text password for the CardDAV endpoint. Alternatively I can configure it to use a GPG-encryped password file. And oh, the glory: mcds has a man page!

$ cat ~/.mcdsrc
url = https://example.org/dav.php/addressbooks/jpm/default/
verify = yes
username = jpm
password_file = /Users/jpm/.mcds-pw.gpg

$ mcds jane

jane.jolie@example.org  Jane Jolie

mcds and khard are quite different: the former queries an online CardDAV server for email addresses to present to Mutt, whereas the latter is more of an all-purpose address book (of sorts) for the command line, but it needs an additional utility (vdirsync) to get the data from and to my CardDAV server.

As I’m away from home and thus from my CardDAV server a lot I’ve settled for khard et.al., but who knows: I may have to rewrite the “away from home” portion of this sentence, and I’d then prefer mcds.


Thunderbird isn’t a client I use, but if I moved to FreeBSD or one of its desktop siblings, I likely would (in addition to Mutt), so I thought I’d do you the favor and see how well it supports CardDAV. It doesn’t really, because it lacks built-in support for CardDAV, but I found TBsync which, with Dav-4-TbSync, allow me to synchronize my CardDAV and CalDAV stores to it. I tested this on FreeBSD, and it seems to work well enough at a first glance.

Thunderbird addressbook entry for Jane

I can edit address book entries on Thunderbird and thanks to a builtin scheduler can automatically (or on-demand) synchronize changes back to the server. TbSync is open source and there’s a short getting started page.

Two people suggested I try CardBookAddon, a new Thunderbird address book based on the CardDAV and vCard standards, which I did, also on FreeBSD. The addon has very many options, and I had trouble finding where to configure my CardDAV server; I resorted to reading manual which often helps ;)

screenshot of Thunderbird's CardBook

Nice about CardBookAddon (source code) is that it integrates remote addressbooks and local ones. I’m thankful for the recommendation: this is likely the addon I would choose to use if I used Thunderbird.


CardDAVMATE is an Open Source CardDAV web client which is nice to use for editing some of the more esoteric (read: not available in the GUIs) vCard attributes, in particular those for spouse and the social profiles.

screenshot of Jane's card in carddavmate

The client runs in the browser as a JavaScript and jQuery application. Other than the CardDAV server proper, no server is required. It made a good impression during my initial testing, but it mucks with the base64-encoding of contact images in such a way as that other clients (Android, khard) no longer recognize the pictures.

Further reading


The Coronavirus isolation and my speaking more with friends inspired this blog post. Thank you, Christoph, for the heads up.

carddav, addressbook, and cli :: 12 Apr 2020 :: e-mail

There are plenty of clock apps in the macOS app store, but most of the ones I’ve looked at are too feature rich and can display loads of information I’m not really interested in. What I’ve been looking for is a narrow (i.e. short) display of UTC time to complement the local time in my status bar.

Christoph Krey has just completed a small app which does exactly that:

screenshot of ISO8601 in the status bar

As you see from the screenshot, I’ve got the time displayed only, but the app can display an ISO 8601 date and time string.

He’s making it available free of charge. Give it a whirl, and give it a few stars if you like it as much as I do.

macos and utilities :: 03 Apr 2020 :: e-mail

In this month of March many more people are working from home and are in need of video conferencing software, and while I have been working from home quite a bit for twenty years, video conferencing is something I’ve seldom required.

I’ve tested a number of programs, but the software I like best and which works best for me so far is Zoom. It’s fast, has a decent UI, works where I need it, does screen/app sharing the way I think it should be done, and it comes in a free tier as well as several paid tiers.

But I keep hearing stories of how horrendous its privacy policy is, and in the course of a week there have been multiple people swearing off Zoom.

It started with this tweet thread subtweeted by someone who’s opinion I have valued. At the time of this writing this tweet has 40k likes and 15k retweets:

tweet from ouren

— “Whether you have Zoom account or not,” the company’s privacy page states, “we may collect Personal Data from or about you when you use or otherwise interact with our Products.” https://www.inputmag.com/tech/zooms-attention-tracking-is-ripe-for-misuse-abuse

All’s you gotta do is search for “Zoom attention monitoring” and read their privacy policy. (Their policy is that there is no privacy) Tech startups can neve be trusted. Ever.

Additional information from the EFF

and the last tweet in the series seems to be the money shot:

I don’t have a real soundcloud, but here are various links where you can buy our games, request keys, hire our services and more: listography…./poppyworks (we only work on games, not infosec, sorry!)

Then I get a Unix person telling me

it’s about uploading the process list of the system for the focus detection. it seems it’s not simply done client side, but instead they pull the list, meaning, all your ssh sessions with destinations

aw, come on, do we really believe that? Zoom would be slaughtered if that were true, right? Why should they do that? The app can simply check whether it has the active window.

Then there’s this piece which oozes FUD in my opinion:

Whenever you host a call, you have the option to activate Zoom’s attendee attention tracking feature

Yes, it’s hidden in the settings. So what? That means to me that the host can see whether the Zoom window is active. My Zoom window won’t be active because I’ll be taking notes in a separate (active) window. To me that’s not a privacy issue.

that piece goes on to say

This feature only works if someone on the call is sharing their screen.

Which takes care of a multitude of calls, dunnit. Next.

Of course, just because you are not viewing the Zoom screen does not mean you are not paying attention or doing work. Furthermore, this feature cannot always reliably gauge if you have clicked away from the call. It only works on version 4.0 or later of Zoom apps and is not as reliable if you attend a Zoom call through your web browser rather than an app.


You should also be aware that if a host decides to record the call so it can be played later, Zoom saves a TXT file of the chat messages from the meeting and shares it with your boss

So what? Those are public messages. Anybody who’s used IRC knows about that. Then:

According to its support page on the subject, “the saved chat will only include messages from the host and panelists to all participants.” However, it does not clarify what will happen to direct messages between attendees.

It does clarify that; the piece has just said so one sentence earlier: “the saved chat will only include messages from the host and panelists to all participants”.

According to the company’s privacy policy, Zoom collects reams of data on you, including your name, physical address, …

Oh really? The privacy policy clearly says may gather the following categories of Personal Data about you. The key word is “may”. And how they want to gather my physical address is beyond me; I didn’t specify one when signing up, and if you don’t sign up you can still participate in invited calls. How are they going to get your physical address then?

The piece closes with

Last year, ..

Yes, last year. Today is this year.

Convince me that this is not all FUD. I’ve yet to see any proof of the “spying” people are clamoring about.

Further reading:

The end.

conferencing :: 23 Mar 2020 :: e-mail

I’m really appreciating my new desk phone particularly now that I’m having to use a telephone much much more than I’ve done the past years. I got myself a Voyager Focus UC headset and have paired that to the phone and to the computer, and have been able to remove some of the cable clutter which occupied my desk. Dialing a number from the command line is one of the features I’m appreciating most on the phone.

I noticed a couple of days ago while searching for somebody in the address book that there are little blue “phone” icons, and my interest was piqued: could I have it so that if I clicked one of those, the Grandstream would dial a number?

screenshot of an address book entry on macOS

As is often the case, something which could be simple is complicated by the fact that Apple have changed things over the course of time. Be that as it may, this blog has the nitty-gritty, and I pasted the following small AppleScript together:

on open location this_URL

    set arg to text of this_URL
    set cmd to "/Users/jpm/take/bin/run-tel-uri.sh " & quoted form of this_URL
    do shell script cmd

end open location

I saved that as run-tel-uri.app and patched its Info.plist in a text editor:

--- run-tel-uri.app/Contents/Info.plist.orig	2020-03-23 11:42:20.000000000 +0100
+++ run-tel-uri.app/Contents/Info.plist	2020-03-23 11:46:22.000000000 +0100
@@ -2,6 +2,17 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleURLName</key>
+			<string>Telephone helper</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>web</string>
+			</array>
+		</dict>
+	</array>

Finally, I set the preferred dialing app to my new run-tel-uri.app using SwiftDefaultApps, a preference pane which replaces RCDefaultApp which no longer works on newer macOS releases.

changing preferred app for a URI using SwiftDefaultApps

In case you are wondering, I tried using something like Platypus to “appify” my script directly but that didn’t work. Possibly becasue I didn’t know about the Plist trick above…

macos and phone :: 23 Mar 2020 :: e-mail

In a week from today, I was scheduled to give a short talk about the story of OwnTracks at Geomob. Geomob is a series of regular events for location based service creators and enthusiasts, which take place every few months in different European cities,

I believe Ed Freyfogl is the person who conceived these events originally, and I was very much looking forward to meeting Ed in person. He’s one of the people behind OpenCage, a company which provide reverse geocoding data and APIs, and we at OwnTracks like how OpenCage uses open data and have good privacy around their service. We use their data quite extensively with our vehicle tracking devices, and our Android app can use them as well.

What is reverse geocoding? Wikipedia explains it this way:

reverse geocoding is the process of back (reverse) coding of a point location (latitude, longitude) to a readable address or place name. This permits the identification of nearby street addresses, places, and/or areal subdivisions such as neighbourhoods, county, state, or country.

The Geomob event in Munich was cancelled due to the Coronavirus situation, and Ed suggested we chat and record for one of the @geomob podcasts, so we did. I had good fun and hope you’ll enjoy listening to our chat when it appears on an internet near you in a few weeks.

After the official recording was over, I was telling Ed how I love their OpenCageData service and how impressed I was recently when an update I submitted to OpenStreetMap was returned by an OpenCage reverse geo lookup just a couple days later.

Case in point I properly labelled a bakery at which one of my family members frequently stops. I realised the location had no name because I noticed our car stop there with an ignition off. I logged into OSM, located the position of the bakery, looked up its official name on the chain’s Web site, and added that to OSM.

the bakery

Just a few days later, I noticed on a Mattermost window in the background of my screen, that our car again stopped, and I was delighted to see the reverse geocoded data contained the description I’d edited. OpenCageData uses OpenStreetMap data, hence the connection.

car status

(Our cars produce OwnTracks JSON, and the reverse geocoding takes place server-side with a utility we created, called revgeod – a reverse Geo lookup service written in C, accessible via HTTP and backed by OpenCage and LMDB.)

How about you also sign up for the Geomob mailing list, and hopefully we’ll meet at one of their events as soon as the current situation has cleared itself up.

As I told Ed earlier: the slides for the OwnTracks presentation I was to give are ready. :-)

geo and owntracks :: 19 Mar 2020 :: e-mail

Other recent entries