• Apple,  Mac OS X,  Mac OS X Server,  SQL

    Install and Setup mongodb on a Mac

    I don’t write as much about what I do at my day job as I used to. I probably should, because it’s all still relavant to my older readers. One example of that is that I have published a lot of articles on MySQL and sqlite. However, more and more of my development efforts use native json. I’ve slowly fallen in love with mongodb for this reason – I can have a local database that is fast, that stores data in native json. That makes my transactions cheaper when it’s time to read and write for databases. If I have to regex to put information in sql and then take…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Can’t Schedule Reboots in Ventura: Mac Observer’s Gotcha

    I was talking to Jeff Butts at Mac Observer yesterday and he mentioned something I hadn’t noticed: macOS Ventura removes the option to schedule an automatic reboot from the graphical interface. I actually went back a version and couldn’t find it there. I guess since I don’t have servers I hadn’t noticed this oversight. Or I guess it’s more emblematic that it’s not an oversight, it’s how the use of the Mac has shifted over the years. The old power management system preference features are still there – Jeff wrote an article how to use pmset to set the automatic reboot feature at https://www.macobserver.com/tips/how-to/how-to-schedule-your-mac-to-shutdown-or-reboot-in-macos-ventura/. Around 13 years ago, I wrote…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Disable Disk Image Verification On Mac

    Sometimes you have to mount a whole lot of disk images (like a script that fires up 9,999 and proceeds to sing the bottles of beer on the wall song but instead transposes those lyrics with “disks images to verify” and we can all understand how excruciating it would be to get down to 0) and just don’t want the Mac to verify each one. To disable that, send skip-verify key with a value of true(so a Boole) into com.apple.frameworks.diskimages as follows: defaults write com.apple.frameworks.diskimages skip-verify -bool true Or course, interacting with corrupt objects is bad if any corruption occurs so run it again with a false to disable that…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Secure Keyboard Entry on macOS

    The Secure Keyboard Entry option has been in Terminal going back almost a decade. Secure Keyboard Entry was added as EnableSecureEventInput way back in Mac OS X 10.3 and was developed to protect the more sensitive inputs people provided, so also made into a public API. It was meant to protect the more sensitive types of data so if we had a login screen with a password field or something else, we’d protect those with it. The purpose was to lock what other processes could use the GetKeys function (once used to write keystroke loggers), tap the IOHIDDeviceInterace and IOHIDOptionsTypeSeizeDevice processes or tap any events that involved any HID system…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Disable Safari Extension Updates During Development

    I’ve been experimenting with Safari Extensions for awhile ( https://github.com/krypted/Word-Replacer-Safari-Extension ) and once we publish them we might need to continue to use an old version for testing. Extension updates can then be deleted by writing a boolean InstallExtensionUpdatesAutomatically key into the com.apple.Safari defaults domain and setting the option to false: defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool false To remove the key and simply return to the default state: defaults delete com.apple.Safari InstallExtensionUpdatesAutomatically

  • Mac OS X,  Mac OS X Server

    Clear that QuickLook Cache

    Seems like just yesterday that I first wrote about using Apple’s QuickLook from the command line. And yet it’s been eight years: https://krypted.com/mac-security/qlmanage/. Guess time flies when you’re having fun. One thing that isn’t fun is when all of a sudden QuickLook stops generating previews for objects when you hit that space bar, or just provides a generic preview. I’ve been working with a lot of more resource intensive file types recently, like .stl files and these can clog the system up. Luckily, filling up the cache, or getting corrupted objects in the cache is something Apple planned for and this is cleaned during a reboot as part of standard…

  • Mac OS X,  Mac OS X Server

    Change Default Finder Views Using defaults

    We can manage the way the Finder displays objects using the FXPreferredViewStyle key in the com.apple.finder defaults domain. There are four options in the Finder drop-down for view style and these are Icons (icnv), List (nlsv), Columns (clmv), and Gallery (glyv). Given that only communists use anything other than the list view, we’re going to set the default to that with a simple defaults command: defaults write com.apple.finder FXPreferredViewStyle -string "nlsv" To undo our change and allow it to default to the last view, we can simply delete the key: defaults delete com.apple.finder FXPreferredViewSTyle