Readit News logoReadit News
bartvk · 2 years ago
It's now a habit to save all my changes in system and app preferences in a script.

First I do a

    defaults read > 1
Then I change the setting in the app or System Settings, then back on the commandline, I do

    defaults read > 2
    diff 1 2
The change gets copied to a preferences.sh file with a whole bunch of statements like:

    defaults write com.apple.ical "Show Week Numbers" -bool true
Afterwards, I don't care where the setting is. I just set it in my preferences.sh file, and if I update any of it, I run that file.

pxc · 2 years ago
Beware that some settings won't show up this way, and some settings that you can witness through `defaults read <some plist file>` cannot be safely edited through `defaults write`.

Power management settings, for example, will break some System Settings panes when manually written, in addition to not effectively modifying the relevant setting. Those, you have to modify with the `pmset` command instead.

snapplebobapple · 2 years ago
I wonder if the program i use to manage my dotfiles could help manage your scripts and extend your setup to all your desktops? Its called yadm (https://yadm.io/) it makes it so easy to have a laptop and a desktop or two.

Edit: seems to support doing a diff and reverting/modifying right in yadm, i just do t really use thst bit myself: https://yadm.io/docs/common_commands#

ParetoOptimal · 2 years ago
> It's now a habit to save all my changes in system and app preferences in a script.

The end game of this type if thing is NixOS where your OS is created from a declarative and reproducible Nix file as are all of it's programs as well as their dependencies.

pxc · 2 years ago
Nix-Darwin and/or Home Manager on macOS can provide a nice, slow way to transition into the Nix world as well, for folks who are hesitant to jump in with NixOS and like to have other options around. There's even a very nice Homebrew module for Nix-Darwin to let you manage Homebrew from Nix if you want to Nixify without giving up Homebrew!

It doesn't feel nearly as 'safe' as NixOS, in that OS upgrades are less predictable and can break a lot of things (not limited to Nix). But all-in-all, it's really not bad, and for some use cases it might be better.

e40 · 2 years ago
This is brilliant and I’m mad that I didn’t think of it.
Cockbrand · 2 years ago
It is indeed brilliant, and I’m glad I learned this today!
aeadio · 2 years ago
I do something similar, but instead of a script with a bunch of `defaults write`, Ansible has an osx_defaults module. https://docs.ansible.com/ansible/latest/collections/communit...
pxc · 2 years ago
nix-darwin also handles this fairly nicely.

The built-in options are listed in the modules docs starting here: https://daiderd.com/nix-darwin/manual/index.html#opt-system....

but you can also define custom ones without writing new modules via CustomPreferences and CustomSystemPreferences: https://daiderd.com/nix-darwin/manual/index.html#opt-system....

I track all of my `defaults` settings (aside from power management) in version control this way on my work machine. :)

elcapitan · 2 years ago
This is great! Is there some non-lethal way to retrieve the initial system settings to diff from?
pxc · 2 years ago
Don't the non-global defaults generally live in per-user directories like ~/Library/Preferences or whatever?

You can likely get a lot of this by just creating a new user.

globular-toast · 2 years ago
Seems more difficult than my Linux setup.
danieldk · 2 years ago
At least virtually all applications use the same configuration mechanism, which is a lot nicer than many custom formats scattered everywhere (though more and more applications seem to use .config on Linux now).
bolangi · 2 years ago
That's what all those engineering dollars buy you!
joshspankit · 2 years ago
I’d appreciate seeing those statements added to the linked article. Thank you for sharing it! I hope the author sees your comment and uses this technique to add them.
crimsontech · 2 years ago
The settings in MacOS have become increasingly more frustrating. Especially security or privacy permissions given to applications.

I installed a capture card recently that needed a kernel extension and after agreeing a confirmation box to install the extension I couldn’t find anywhere in the settings to remove it. In the end I just deleted the file and rebooted.

I had Teams in the browser ask if it could access files in my Downloads directory which I mistakenly agreed to, this took a good ten minutes to find and revoke and I can’t remember off the top of my head where the setting even was.

A lot of this is down to more granular privacy and security settings but it’s difficult to find the settings you are looking for.

highwaylights · 2 years ago
It’s worse than this sadly, at least in Ventura.

I previously gave access to an app to access removable storage (because there was no more granular way to just give the app access for a single folder - which is a serious freaking defect if anyone from Apple is reading this - that’s just plain bad), did some editing, then revoked the access.

The problem is the access wasn’t revoked and it could still access the whole drive. Checked the settings pane - definitely no access to removable drives (and no full disk access), went back to app and it could still access.

Went through tcc on the command line and it showed that the access was revoked but still it persisted reboots.

In the end I had to completely reset the machine and start from scratch just to revoke that drive access.

macOS really needs another Snow Leopard “no new features” release.

lapcat · 2 years ago
> macOS really needs another Snow Leopard “no new features” release.

This has always been a myth. Snow Leopard had some massive changes "under the hood", and OS X 10.6.0 was very buggy, as can be seen by the release notes for 10.6.1, 10.6.2, etc.

What people remember fondly about Snow Leopard was in actuality the 2 full years of bug fixes that occurred after its release.

What Apple needs to do is end the yearly major OS release cycle. It doesn't leave enough time to fix the bugs before Apple engineers start working on new features for the next release.

2Gkashmiri · 2 years ago
Wait....

What hostile application is running on your computer that you fear about giving drive access as opposed to folder access? Uh.. So if you do.... What will that app do? Why are you using such an app then?

Isn't the idea like if you install an application on your own machine, it shouldn't be hostile to you and the app is trusted so why should I "fear" that the app has some access?

TylerE · 2 years ago
One that’s been at least mildly annoying to me personally is that there’s no way to fly elk the OS that a “removable” drive isn’t. My chained to my desk Mac Studio has 4TB of external aSSD (some old stuff, Time Machine, but also where I tore big stuff like AI models since I only have the base Studio with 512G

Constant pop up’s every time a new app wants to look at those files… so get a n admin populists that just be felt with. It’s not a huge deal for a single instance, but when it’s coming up 4 or 5 times a day…

Ill I want is a per-volume checkbox “treat as internal”.

Cockbrand · 2 years ago
Is “to fly elk” a slang phrase I’ve never heard or just some weird autocorrect?

[Edit] Either way, I’m gonna use it from now as a synonym for “tell [someone]”. Thank you for the inspiration!

highwaylights · 2 years ago
This sounds like a bad pattern (I posted about this above).

“Mark as internal” seems like a really crude fudge when the real problem is you can’t give access to single directories rather than a whole drive. Also a “don’t remind me again” option on the external drive pop-up.

baxuz · 2 years ago
Kernel extensions are horribly managed.

At one point my Logitech GHUB drivers bugged out and wouldn't launch anymore. Interestingly, the G502 mouse still had a 1000hz polling rate, even after uninstalling the drivers and every trace (as far as I could find).

After trying for over a year to install new drivers, they released a version which added 2 new kexts that they don't remove on uninstall. The only way to uninstall them is to go into safe mode, disable SIP and remove them.

coldtea · 2 years ago
Privacy and Security -> Files and Folders -> <App Name>

I mean, the redesign of Preference is more difficult to navigate and has some rought edges, but this setting is where one would roughly expect it.

Someone · 2 years ago
That works for “Did I give Foo permission to Bar?” Questions, somewhat for “Who did I give permission to Bar?” questions (the UI would need updating to decrease the needed number of mouse clicks), but is utterly annoying for “What permissions did I give Foo?” questions, where the number necessary clicks is even higher.

I think an ideal system would make answering all three easy.

notbeuller · 2 years ago
I find it really hard to maintain a mental model of all the settings now - I wish there was a “save as text” (that had better structure than the direct output of “defaults read”) that would show all the Boolean switches. Maybe have a comment for “or one of these” for something that had an enumerated value (like scaling). Hmm. (Starting to sound like a “I should just damn well go write that and quit complaining”)
CRConrad · 2 years ago

Deleted Comment

scns · 2 years ago
> Starting to sound like a “I should just damn well go write that and quit complaining”

Sounds good to me.

ckdot2 · 2 years ago
All the default* options belong to the system settings, not to the specific app. The system delegates specific functionality to a corresponding app.

Still, I admit that the whole settings structure is confusing and Apple should implement something similar to VsCode where you can globally search for all existing settings.

fragmede · 2 years ago
and have it in a text readable file that one can edit (like VScode). A boy can dream, can't he?
detourdog · 2 years ago
there is a search right in settings it will return the name of the settings and it also searches context.
macintux · 2 years ago
I just want a setting for “Do not launch Music when I put away my AirPods after a Teams meeting” for my work laptop. Is that so much to ask?
Groxx · 2 years ago
If you don't use iTunes at all: https://github.com/tombonez/noTunes has saved quite a lot of my sanity very simply.
pxc · 2 years ago
Why not just uninstall them?
eviks · 2 years ago
Why can none of the OS provide a simple everything-fuzzy-searchable interface with both directory and tag organization and sets to make the huge mess of poorly accessible configs they've created more palatable?
dizhn · 2 years ago
KDE's settings app is not bad in this regard. Gnome's is OK too but there is not many configurable things there. Everybody installs gnome-tweaks which provides a separate gui.
Expurple · 2 years ago
Yeah, a fuzzy KRunner search gets me the desired settings most of the time
xctr94 · 2 years ago
Before the System Settings redesign, this was quite possible. Even more so if you use Alfred. I’m Catalina I think I’ll get the right setting 1 out of 5 times, if that much. The redesign is absolute garbage.
ParetoOptimal · 2 years ago
pxc · 2 years ago
There's nothing quite so complete or good for macOS, but this is pretty darn good as a start:

https://daiderd.com/nix-darwin/manual/

eviks · 2 years ago
this is only search

(by the way, is it possible to change settings within the OS via this search interface?)

msk-lywenn · 2 years ago
I think you're describing regedit (although not fuzzy)
stinos · 2 years ago
Even if it were fuzzy (which can be tested piping Powershell's 'Get-ChildItem hklm:\' into fzf for instance), you'd need a lot of filtering to make that useful though (I'm guessing you don't want to see recent files whichhappen to contain the name of the thing you're looking for) and/or search specific trees only and/or limit depth. But even that won't immediately solve the usage of cryptic names.

Better starting point would be Group Policy, which is mostly a layer over the registry but containing pretty good descriptions of what a setting does. It has a Powershell module, so combining that with fzf and a preview pane which shows the description might ctually be pretty neat, but probably not very fast.

eviks · 2 years ago
no I'm not, regedit is another usability nighmare which doesn't fulfill any of the conditions I've described, and search is not only not fuzzy, but also slow (Everything can search through the whole filesystem in less than a second, Regedit takes it sweet time)

And it also lacks any visual cues, so if you're used to some icon in the main settings apps, you'll not see it in regedit

pxc · 2 years ago
The whole point of what they were asking for was for the thing to be highly usable. Regedit is... not that.
divbzero · 2 years ago
TIL: You can run scripts you write via the Script menu.

https://support.apple.com/guide/script-editor/access-scripts...

ChrisMarshallNY · 2 years ago
Apple's settings and preferences are a blue-ribbon clusterf**k.

The other day, someone was complaining that they couldn't read their screen, and I (foolishly) indicated that I could fix it easily, because "I'm an expert."

I ended up searching through multiple pages of settings, in order to find the one they needed.

At least they got a good laugh out of it.

Zoom's settings are right up there, with Apple's.

Information architecture often tends to follow political and organizational structure, as opposed to good common sense usability structure.

https://www.penny-arcade.com/comic/2016/03/16/magnets

marcellus23 · 2 years ago
What setting was it?
ChrisMarshallNY · 2 years ago
Display Zoom (I forgot what it was called, and initially started looking in Accessibility).