Kevin Yank

Recent articles (page 1 of 35)

  1. Jan 21, 2023 Privacy & Security settings in macOS reset on reboot

    Since macOS Monterey 12.6.1, including the current macOS Ventura 13.1, whenever I reboot, my Mac forgets some or all of the applications I’ve given permissions to in the Privacy & Security settings. This can include permissions for Accessibility (1Password, Bartender, Logi Options, etc.), Full Disk Access (iTerm, LaunchBar, Transmit, etc.) and Screen Recording (CleanShot, Keyboard Maestro, ScreenFlow). At different times, a series of escalating fixes is necessary to work around this until the next time that it happens.

    screenshot of macOS Settings showing Accessibility access is enabled for Bartender, Rewind, Rocket, and RescueTime, all of which are nevertheless showing prompts requesting this access
    But I already said yes!
    Update Jan 26, 2023:
    Quoted note:
    On its first boot, #macOS Ventura 13.2 displayed a prompt that Bartender wanted screen recording access, but after 10 seconds or so the prompt disappeared without any input. I’m hopeful this means that apps requesting these permissions before macOS is ready to grant them will no longer corrupt the permissions database! #Apple

    Update Jan 27, 2023:
    Quoted note:
    Sadly, #macOS Ventura 13.2 seems no better at remembering the apps I granted Accessibility, Full Disk Access, and Screen Recording permissions to when I reboot. #Apple

    The bug seems to be a race condition of some kind, where applications request the access they’ve already been granted before macOS has finished bringing the necessary services online, so the app thinks it has lost its permissions. I believe this because the easiest way to resolve the issue, often, is to quit and restart the app that is complaining that it lacks permissions. That doesn’t always do the trick, though. There seems to be a way that the database for an entire section of the Privacy & Security settings (most commonly Accessibility) can become corrupt, and all the apps that rely on it will be locked out. When this happens, the apps are still listed as approved in Privacy & Security, and toggling their permissions on and off doesn’t help, nor does removing the apps from the list entirely and re-adding them. This issue is widespread enough that some of these applications have help pages on their support sites with advice on how to resolve the problem when it occurs. Bartender advises users to open Terminal and use the tccutil utility to reset permissions. I’ve had success with doing this for all apps at once:
    tccutil reset Accessibility
    tccutil reset ScreenCapture
    tccutil reset SystemPolicyAllFiles
    After running the necessary command(s) and rebooting, the applications will prompt for the access they need again, but this time you’ll be able to add them back into the list of approved applications successfully again. Every now and then, however, an even worse manifestation of this issue may see you looking at a blank list of approved applications in Privacy & Security settings, with every attempt to add an application back onto the list failing silently:
    screenshot of macOS Privacy & Security settings, with the Accessibility list showing No Items
    The scary blank list
    When this happens, it’s time to get the big hammer. What has worked for me is to delete the ~/Library/Preferences/ file and reboot.
    rm ~/Library/Preferences/
    Surprisingly, when I do this, after rebooting I find that all my previously-approved applications are back in the list! So however this file works, there does seem to be an underlying “source of truth” that doesn’t get clobbered in this process. None of these solutions are permanent. I’ve steadily gotten used to a reboot of my Mac taking 30 minutes out of my day while I sort out broken macOS permissions. I really hope Apple fixes this (assuming it’s their bug) soon! Are you seeing some version of this issue on your Mac? Please reach out and let me know. The biggest mystery about this for me is whether this is a side-effect of some peculiar aspect of my Mac’s setup, or if this is an issue that is affecting everyone using apps that require Accessibility permissions on their Mac.

  2. Jan 21, 2023 Fix System Beep on Move Editor into Next Group in VS Code

    In Visual Studio Code, I frequently want to split the window into two panes to view one file alongside another. The quickest way to do this without my hands leaving the keyboard is to use View: Move Editor into Next Group with the keyboard shortcut ^⌘→ (ctrl-cmd-right arrow).

    Screenshot of the command palette in Visual Studio Code with the command highlighted
    You can find the command in the Command Palette
    Although this works out of the box in VS Code, for several years now on macOS it also triggers an annoying system beep. A few years ago this was annoying me enough that I tried to track down the cause. The issue seems to be that Chromium (the browser engine in Electron, the framework that lets you build desktop applications with web technology, with which VS Code is built) does not notify macOS when it handles keyboard shortcuts like ^⌘←, ^⌘↓, and ^⌘→, so macOS plays the system beep to warn you that your keystrokes didn’t do anything (even though they did). A bug report for this on the Chromium project was closed in January 2020 as WontFix, seeming to blame macOS for the issue. Fortunately, there’s a work-around: set up custom macOS key bindings. You can establish system-global key bindings for the key combinations ^⌘←, ^⌘↓, and ^⌘→ that are mapped to no operation ("noop"). Simply having these declared as valid keystrokes at the OS level eliminates the system beep that occurs even when a Chromium app accepts and handles the keystroke. In order to establish this, you need to create a ~/Library/KeyBindings/DefaultKeyBinding.dict file. Note that you’ll probably need to create the directory as well, and that the directory name is plural (Bindings), but the file name is singular (Binding). This should be in your user Library folder, not the /Library folder or the /System/Library folder. This should be a text file with these contents:
      "^@\UF701" = "noop";
      "^@\UF702" = "noop";
      "^@\UF703" = "noop";
    ^ means Ctrl, @ means Command, and \UF701, \UF702, and \UF703 are the codes for the three arrow keys. There’s a nice reference Gist for this file’s syntax here. You can download a copy of this file if that’s easier (but you’ll need to extract it from the ZIP archive): Once you have created this file, restart VS Code (or any other applications where you want to use these keystrokes), or just reboot your system. After that, you should find that the system beeps are gone. I have successfully applied this tweak since macOS Catalina (10.15.2) all the way up to the current macOS Ventura (13.1) to use the default keyboard shortcuts for the View: Move Editor into Next Group and View: Move Editor into Previous Group commands without hearing system beeps each time.

  3. Jan 21, 2023 Subspace Radio #19: Hero Ship Sacrifices

    In Subspace Radio #19, Rob and I splash down in the clear water of San Francisco Bay for the season one finale of Star Trek: Prodigy, Supernova, Parts 1 & 2, before contemplating other heroic sacrifices of starships in Star Trek III: The Search for Spock, The Doomsday Machine (TOS), Yesterday’s Enterprise (TNG), Deadlock (VOY) and Year of Hell, Part II (VOY).

  4. Jan 11, 2023 Horizontal Scrolling

    My new site design makes heavy use of horizontal scrolling on the home page, with scrollbars hidden. Horizontal scrolling can be accessible, but it takes some work to make it so. This article covers accessibility for keyboard and screen reader users, and users whose pointing devices simply don't support horizontal scrolling! It also breaks down several usability features I added to create a better experience than the native scrollbars they replace.

  5. Jan 6, 2023 Subspace Radio #18: The Holodeck

    In Subspace Radio #18, Kev & Rob can’t wait for the Star Trek: Prodigy season finale after watching “Ghost in the Machine” and “Mindwalk”. To pass the time, they explore the simulated worlds (and people!) created by the holodeck, sometimes a little too magically, in “Elementary, Dear Data” (TNG), “Ship in a Bottle” (TNG), “His Way” (DS9), “It’s Only a Paper Moon” (DS9), “Booby Trap” (TNG), and “Nothing Human” (VOY).