The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,161 other followers

Archive for the ‘Mac’ Category

macos – Bring OS X Error Message window to the front – Super User

Posted by jpluimers on 2020/10/19

Short answer based on WayBack macos – Bring OS X Error Message window to the front – Super User

The GUI way

  1. Press Command+Space to start Spotlight Search
  2. Search for /System/Library/CoreServices/Problem Reporter.app and wait for the result to show up
    (a search for just Problem Reporter.app will not reveal it!)
  3. Press Enter
  4. Now the System Reporter windows is in the front and has focus

The Terminal way

  1. Open a Terminal window or tab
  2. Run open -a /System/Library/CoreServices/Problem\ Reporter.app
  3. Now the “Problem Reporter” windows is in the front and has focus

–jeroen

 

Posted in Apple, Mac, Mac OS X / OS X / MacOS, macOS 10.13 High Sierra, Power User | Leave a Comment »

How to remove all old and outdated brew packages on MacOS – nixCraft

Posted by jpluimers on 2020/10/19

I was not aware that brew install,  brew cask install, brew update and brew upgrade would keep all the older versions on disk, so I was a bit amazed that OmniDiskSweeper and GrandPerspective found over 20 gigabytes of cruft in /usr/local/Cellar and a bit in /Library/Caches/Homebrew.

Based on [WayBack] How to remove all old and outdated brew packages on MacOS – nixCraft and [WayBack] homebrew – brew: how to delete outdated version of package – Ask Different (which have more info) I changed the order a bit:

alias brew-cleanup-update-ugprade='brew cleanup && brew update && brew upgrade'

You can use brew pin to keep specific versions (and brew unpin to release them so you get the most recent one).

The main reason people do not bump into brew cleanup is that it is not advertised as a command:

# brew --help
Example usage:
  brew search [TEXT|/REGEX/]
  brew info [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]

Troubleshooting:
  brew config
  brew doctor
  brew install --verbose --debug FORMULA

Contributing:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]

Further help:
  brew commands
  brew help [COMMAND]
  man brew
  https://docs.brew.sh

But it is there and has help as well:

# brew cleanup --help
brew cleanup [--prune=days] [--dry-run] [-s] [formulae|casks]:
    Remove stale lock files and outdated downloads for formulae and casks,
    and remove old versions of installed formulae. If arguments are specified,
    only do this for the specified formulae and casks.

    If --prune=days is specified, remove all cache files older than days.

    If --dry-run or -n is passed, show what would be removed, but do not
    actually remove anything.

    If -s is passed, scrub the cache, including downloads for even the latest
    versions. Note downloads for any installed formula or cask will still not
    be deleted. If you want to delete those too: rm -rf "$(brew --cache)"

On pin and unpin:

# brew pin --help
Usage: brew pin formulae

Pin the specified formulae, preventing them from being upgraded when
issuing the brew upgrade formulae command. See also unpin.

    -d, --debug                      Display any debugging information.
    -h, --help                       Show this message.
# brew unpin --help
Usage: brew unpin formulae

Unpin formulae, allowing them to be upgraded by brew upgrade formulae.
See also pin.

    -v, --verbose                    Make some output more verbose.
    -d, --debug                      Display any debugging information.
    -h, --help                       Show this message.

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

Need to figure out how to remount 2015 Retina MacBook Pro SD card that got ejected during sleep

Posted by jpluimers on 2020/09/04

Somehow, every now and then, a 2015 Retina MacBook Pro will eject the SD Card during sleep.

I’m not sure about the cause, just about the message that a drive got unmounted in an unexpected way.

This fails to rescan for the drive on Mac OS Sierra:

sudo kextunload -b com.apple.driver.AppleSDXC
sudo kextload -b com.apple.driver.AppleSDXC

As per [WayBack] external disk – Problem with kextunload SD card remount – Ask Different, I tried the kextstat below, however, before the unload/load statements, kextstat | grep -e SDXC returns nothing.

After them, it returns something like

156 0 0xffffff7f841f3000 0x12000 0x12000 com.apple.driver.AppleSDXC (1.7.6) 0F6F5025-A1C4-3E77-9ECD-4D4410E684C5 <16 15 12 5 4 3 1>

When it happens again, I will likely need to read these:

It might be that somewhere along the line, SDSX is not started by default any more or not applicable to MicroSD to SDXC card converters. These screenshots at least show that this disk is connected via a USB path:

The screenshots are from the stock “System Information.app” tool, and I really wish it showed the kext drivers used for each device. That would make debugging these issues a lot easier!

A solution then could be as easy as this:

Unmount all USB connected devices (for instance with a command like diskutil eject disk1);

sudo kextunload -b com.apple.driver.AppleUSBCardReader
sudo kextload -b com.apple.driver.AppleUSBCardReader

However my first try got me an error similar to the one result [WayBack] External USB disk sometimes requires a reboot to be recognized after eject – Ars Technica OpenForum I found after searching for “class com_apple_driver_AppleUSBCardReaderDriverNub has” “instances.”:

7/28/16 10:05:54.000 AM kernel[0]: Can't unload kext com.apple.driver.AppleUSBCardReader; classes have instances:
7/28/16 10:05:54.000 AM kernel[0]: Kext com.apple.driver.AppleUSBCardReader class com_apple_driver_AppleUSBCardReaderDriverNub has 2 instances.

–jeroen

Posted in Apple, Mac, MacBook, MacBook Retina, Power User | Leave a Comment »

Tools I use for audio/video downloading, media conversion and audio editing

Posted by jpluimers on 2020/07/03

A friend asked me what tools I use for downloading media, converting it to various formats (including audio extraction) and audio editing.

It is a surprisingly short list:

Most of it runs out of the box on Mac OS X/MacOS/OS X, as I’ve moved there form Windows for most of my day to day access to systems (there is a great set of Microsoft Remote Desktop in the app store: [Archive.isMicrosoft Remote Desktop 8.0 on the Mac App Store and [Archive.isMicrosoft Remote Desktop 10 on the Mac App Store; I like the first one better).

Audacity shortcuts

Shortcuts make Audacity life a lot easier. For keyboard shortcuts, Mac users use Command (⌘) instead of Ctrl.

Earlier related posts:

–jeroen

mps-youtube via [WayBack] Joseph Mitzen commenting on… – Carlos Moreno Gil – Google+

 

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

Audacity error when starting “The application “Audacity.app” can’t be opened.”

Posted by jpluimers on 2020/06/29

For quite a while, I had the error “The application “Audacity.app” can’t be opened.” and Audacity still opening. Clicking the OK button often enough made me hunt for the solution:

This is what I did:

$ cd ~/Library/Application\ Support/audacity
$ grep Temp audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData

Then I checked if the directory existed:

$ find ~/Library/Application\ Support/audacity -type d
/Users/jeroenp/Library/Application Support/audacity
/Users/jeroenp/Library/Application Support/audacity/AutoSave
/Users/jeroenp/Library/Application Support/audacity/Plug-Ins
/Users/jeroenp/Library/Application Support/audacity/SessionData

The odd thing is the directory already existed, so I decided to delete the line, but first needed sed -n (the -n is important: it list only non-matching lines to stdout, see [WayBack] regex – What actually the meaning of “-n” in sed? – Stack Overflow):

$ sed -n '/^TempDir=/p' ~/Library/Application\ Support/audacity/audacity.cfg
TempDir=/Users/jeroenp/Library/Application Support/audacity/SessionData

Since this is Mac OS/Mac OS X/OS X, the -i parameter requires a string even if it is an empty [WayBack] shell – Delete lines in a text file that contain a specific string – Stack Overflow so we get:

$ sed -i '' -n '/^TempDir=/d' ~/Library/Application\ Support/audacity/audacity.cfg

After that, starting audacity still gave the same error and the TempDir entry was re-added.

So I did this:

  1. renamed the audacity directory to audacity.bad,
  2. recreated an empty audacity directory
  3. created empty subdirectories AutoSave, Plug-Ins, SessionData
  4. looped this loop
    1. Start Audacity
    2. On success copy a missing file in the audacity directory tree from the audacity.bad directory tree

In the end, these files were the cause:

  • pluginregistry.cfg
  • pluginsettings.cfg

Since I wasn’t using any plugins, I removed them. Now audacity starts fine.

Now that I had the files pinpointed, I could refine the search and this seems to be a common problem [WayBack] FAQ:Installation, Startup and Plug-ins – Audacity Development Manual: How can I solve Audacity not appearing or crashing on launch, or crashing after I add a plug-in?.

Too bad that page didn’t show up in the original search results.

–jeroen

Posted in *nix, *nix-tools, Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User, sed | Leave a Comment »

 
%d bloggers like this: