Skip to content

macOS Apps

Articles about OS X applications.

Simplify VPN connections via TunnelBlick

I use a VPN on our home router, which runs pfSense. When I'm on my laptop, I connect to the VPN for two reasons. The first is security when using unknown wifi connections. The second is for ease of access to my home Macs and network—when on the VPN, my laptop appears as part of the local network, so screen and file sharing are simple and 100% reliable.

To access the VPN, I use TunnelBlick, which runs as a menu bar application. Launch the app, activate its menu bar item, choose your VPN connection profile from the list, enter your password, and you're connected. But doing this several times a day gets annoying quite quickly. Thankfully, TunnelBlick includes AppleScript support.

Using that support and Keyboard Maestro, I wrote a few macros to simplify connecting to and disconnecting from our VPN, as well as changing the DNS address depending on whether I'm connected to the VPN or not.

Technically, the DNS address shouldn't have to be switched—I have the VPN and Tunnelblick configured to automatically switch on connect, but for whatever reason, it's just not happening. So I included DNS address switching in my macros.
[continue reading…]



On leaving the Spotlight behind

Of late, my Mojave-running iMac has been having major Spotlight problems: Occasionally I'd find it rebuilding the main index, despite me not having done anything to require such an action. Even worse, though, is that it would stop working entirely in Mail until I rebooted.

My main use of search in Mail is to help our customers find lost license files—I have records that go back to 2010, so I can usually find their license if they did buy from us. With Spotlight broken, I'd have to login to the two different cart providers we've used over the years to find license files. Having a functional Spotlight in Mail was fairly job-critical to me.

Some digging showed that a process named suggestd was repeatedly crashing…

When this happened, it seemed it would often, but not always, kill Spotlight in general and in Mail. After a lot of debugging, I gave up on fixing the suggestd crash—it's stil crashing multiple times a day—and instead, set out to find another way to search my Mail archives without the help of Spotlight.

I wanted to offload all that historical Mail data to some other app whose search feature wouldn't be dependent on a functional Spotlight. And so, the search began.

tl;dr summary: I chose EagleFiler, a long-lived Mac app that works wonderfully for this task (and many others). It creates its own indices, so it's not reliant on Spotlight, and it's quite speedy at ingesting large amounts of Mail. An unexpected side benefit is that the database is small enough—and fully self-contained—that it's easy to sync to my laptop—so I now always have my email archives available.

[continue reading…]



VMware Fusion and the vmmon broken pipe error

As part of my struggles to fix my constantly-crashing suggestd process (and the Spotlight failures that it seems to cause), I reinstalled macOS Mojave a couple of times using the Internet Recovery partition. These were in-place reinstalls, so I didn't start completely clean, but the OS is reinstalled from scratch—so much so that I even had to run the 10.14.6 updater and a couple of security updates again.

In the end, not only did this not fix the suggestd problem, but it also broke my all-important VMware Fusion virtual machines. When I tried to launch any of them, I was greeted with an error message:

Error: Could not open /dev/vmmon: Broken pipe

This is apparently so common that VMware has a knowledge base article on the issue. The error is due to VMware Fusion not loading its required kernel extensions, but nobody seems to be sure of the cause of the problem. However, that article is supposed to fix it…unfortunately for me, it did not. I never saw an entry in the Security & Privacy System Preferences panel to allow VMWare's extensions. As a result, they didn't load.

Here's the tl;dr for the fix that did work: Rebooting in Recovery mode (hold down Command-R at startup) and deleting the KernelExtensionManagement folder located in /private/var/db. There was a lot more to it than that, though, which I cover for my own possible future needs in the rest of this post, in case the linked sources ever vanish.

[continue reading…]



Remove tracking data from copied URLs

A while back, my friend James and I were discussing the amount of tracking cruft in many URLs. In my case, I subscribe to a ton of email newsletters, and I noticed that those URLs are just laden with tracking information—and most go through a URL processor, so you don't really see those tracking details until you've clicked the link, at which point it's too late to avoid any tracking.

I wanted a way to clean up these URLs such that the least-possible tracking information was sent to a server—and in particular, to prevent any browser cookie creation. In addition, if I want to share a link with friends, I don't want to send them a crufty tracker-laden link—I wanted a nice clean shareable URL.

Note: I wrote all of this before I knew about Jeff Johnson's Link Unshortener, which does all of this (and more) in a "real" app. If you'd like the easy solution, Jeff's app is the way to go. Mine is definitely a do-it-yourself concoction that's not for the faint of heart.

tl;dr version: Install this macro group (v8.3) in Keyboard Maestro to remove tracking details from copied URLs in a set of defined apps.

Latest Update: Apr 11 2022 Fixed a bug related to custom domains, added aliexpress as a decrufting URL, and updated the in-app help boxes.

Going forward, all future updates to this macro will be found in this post on the Keyboard Maestro forums.

[continue reading…]



Archiving and version control for Keyboard Maestro

As much as I rely on our own Many Tricks' apps every day, there's one I rely on more: Keyboard Maestro (KM), the macro app for macOS that can do pretty much anything. How much do I rely on it? The shrunken image at right lists all of my macro groups—not macros, just the groups holding the macros. In terms of actual macros, there are over 425 at present. (These are not all user-facing; many are macros that support other macros.)

I use KM for everything from gathering monthly utility bills to inserting HTML code in blog posts to generating replacement license files for users to controlling iTunes to decrufting URLs when copying (future post coming on that one) to automatically naming and filing documents I scan to storing snippets for insertion into our apps' help files to opening oft-used URLs to adding key functionality to many apps such as Excel, Mail, Messages, Photos, Preview, Safari, etc. In short, it's the single most-used app on any of my Macs.

For as much as I love KM, it has one major shortcoming: All of those macros live in one large XML file. Yes, I back it up to many local and cloud locations, so I'm not worried about losing it. It does mean, though, that if I mangle a single macro while trying to fix something, there's no easy way to get back to the working version (assuming I've gone past the point of multiple undo steps).

But now I can recover from such stupidity, thanks to the amazing Macro Repository Suite from Dan Thomas. This suite consists of two macros: One that updates (and initially creates) the repository, and one that restores a given macro from the repository.

[continue reading…]



Avoid a text selection bug in Excel

I like Excel. I cover it often here, and I use it in projects where it probably would make more sense not do to so. Like my current task, which is developing a stats tracking package for a billiards training game (yea, obscure, I know).

While working on this workbook, I ran into a problem where I couldn't effectively select text in the formula bar: Whenever I tried, the selection would continually grow back to the left, regardless of what I did with the mouse. I also couldn't click on a location in the formula to place the cursor there; it would instantly start selecting text. It looks like this:

But this didn't always happen—in fact, it didn't happen very often at all. And I didn't seem to see the problem in new workbooks, only this one, and then sometimes seemingly randomly, in others. After way too much troubleshooting, I figured out the cause and the solution:

If you resize the pop-up menu at the left of the screen, that triggers the selection bug. Resizing after that, even back to where it was, won't help. You can either close and reopen the workbook, or drag the slider to remove the box. This video shows the entire process, from working to broken and back again:

I don't know how old this glitch is—it exists at least as far back as Excel 16.33 (16.46 is current). I'm trying to get someone at Microsoft's attention, but if you can help, please do—it's a very annoying bug.



Copy links in Chrome, Firefox, and Safari in one step

Something I do a lot is copy links—whether for articles here, or for pasting into Messages or Signal or Twitter, or for corresponding with Many Tricks' customers, I copy a lot of links.

Web browsers—at least the "big three" of Chrome, Firefox, and Safari—bury their copy link commands in a contextual menu. If I want to copy a link, it's a right-click and then either using the keyboard (press C then Return in Chrome and Safari) or mouse (Firefox) to select then activate the Copy Link command.

If you use Chrome or Firefox as your browser, you're in luck: You can install a simple extension in each that lets you copy a link by simply hovering over the link and pressing Commmand- or Control-C:

Now, about Safari. I couldn't find a Safari extension to handle this seemingly simple task, so I turned to Keyboard Maestro.

[continue reading…]



See dot files at top of ls output in Linux

In Terminal on macOS, the ls (list directory contents) command sorts the output of its "all files" listing so that hidden files (those that begin with a dot) appear at the top of the list, like this:

$ ls -Alh
total 47640
-rw-r--r--@   1 robg  staff    28K Oct 26 15:00 .DS_Store
drwxrwxrwx@   5 robg  staff   160B Oct 23  2016 .TemporaryItems
... [trimmed for display]
drwxr-xr-x    8 robg  staff   256B Sep 19 08:31 .wine
drwx------   13 robg  staff   416B Apr 13  2019 Applications
drwx------+  20 robg  staff   640B Oct 26 12:36 Desktop
... [trimmed for display]

On the server that hosts my personal sites (as well as Many Tricks), however, ls doesn't sort the invisible files to the top:
[continue reading…]



Simplify updates to oft-updated text documents

Here on my blog, I've been tracking macOS release dates and rates for nearly 15 years—if I'm doing my math right, I've edited and republished the post 115 times since then. Until the most recent update, all 115 of those updates were pretty much done like this:

  1. Update a Keynote document that calculates the release rate data and contains the two charts in the blog post.
  2. Edit the text of the blog post in a text editor, with Keynote visible, replacing all instances of variable data—dates, numbers, size, rates, etc.—wherever they appear.
  3. Upload the graphs and publish the updated post.

While this isn't an overly complex task by any measure, the second step in particular has gotten more time consuming over the years, because of the length of the post: It now contains over 50,000 characters. That's lots of scrolling and looking for the few bits that change—and I'd often miss a date or a number in some portion of the post.

I thought there had to be a better way, and there is…and of course, the better way uses BBEdit. In particular, BBEdit's support for including one file in another—and using variables in the included file—makes my update task much simpler. If you have text files that receive regular updates, you may find this method of interest, as it can be a big timesaver.

[continue reading…]



Resolving ‘A problem repeatedly occurred…’ error in Safari

Update: Apparently this has happened again with Safari 14.1 on non-current MacOS releases. As of today (Apr 29), MacRumors has the package downloaders available for Catalina and Mojave:

https://www.macupdate.com/app/mac/15675/apple-safari

I can't test this for myself yet as I'm away from my Mojave iMac for a while, but hopefully it'll solve the issue as it did before.


Yesterday, after updating to Safari 14 on my Mojave-running iMac, I noticed a big problem: I couldn't load many sites that contained either a login dialog or a shopping cart. For example, I could load Target's main site, but when I tried to open the shopping cart, it wouldn't work.

I'd briefly see the page, then it would clear and reload once or twice more, and then I'd be left with an error message:

A problem repeatedly occurred with "https://www.target.com/co-cart"

This was happening on many, but not all, sites—I could login on Amazon and my bank, but not on most of our credit card sites or typical retail shopping pages. Given this happened just after installing Safari 14, I assumed it was somehow related to the new browser version—the same pages that didn't load in Safari loaded fine in every other browser I tried. But they loaded fine on Safari 14 on my Catalina MacBook Pro, so then I knew I had a Mac-specific issue…the worst kind of issue to troubleshoot.

While troubleshooting, I found that I wasn't alone, nor was this a Safari 14 issue—there are lots of reports of the same problem over many years.

After tweeting about my troubles and what I'd done to try to troubleshoot the problem, Jeff Johnson of Lapcat Software got me on the right track by suggesting that my Safari install was broken. He suggested I check the date on this Safari framework...

/System/Library/StagedFrameworks/Safari/libwebrtc.dylib

When I did, I found that the version on my iMac was much older (Jul 13, 2020) than the version on my MacBook Pro (Sep 15 2020), where Safari 14 worked as expected.

It seemed that the fix might be as simple as reinstalling Safari 14…but Apple doesn't make it easy to do that, as you can't reinstall an installed update, and they don't include recent Safari versions on their download page.

After some searching, I found MacUpdate's Apple Safari page, which contains direct links to many versions of Safari—scroll down to the section titled "What's New in Apple Safari," expand it, and you'll see download links for Safari versions back to 13.0.3.

I downloaded the Safari 14 installer1And kept a copy, just in case!, let it do its thing, and the problem is solved. The date on the framework I checked now reflects a mid-September date, which matches the same file on the MacBook Pro.

I'm annoyed that Apple's installer didn't report any issues, and I wonder what a "typical" user might have done to resolve this issue—I only got it fixed thanks to Jeff's tip and the installer links on the MacUpdate page. I can't imagine how long I would have had to talk to Apple Support before they figured out that it was a bad Safari install, and not some app or utility or other "you caused this" issue on my Mac.

So thanks, Jeff and MacUpdate, for helping me find and fix this very annoying problem with my Safari install!