Issues caused by little-known hidden pref file

Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I recently realized I was having a problem with my Application Switcher that was driving me nuts. Normally, when I have apps open in different spaces, I can CMD-TAB to an app and it will automatically switch to that app and the space it is in. A few days ago, I realized that this was no longer happening. The menubar would change to reflect the newly selected app, but I had to manually switch to the space it was in to actually see the app's window. This was driving me utterly bonkers and I finally sat down to figure this out. Running the usual Onyx tools didn't fix it. Deleting the preference files for finder and dock didn't fix it. I finally focused on a hidden pref file that I had narrowed down as the problem for a couple other varied issues in the past: .GlobalPreferences.plist

CapturFiles.png

Deleting that sucker and logging out/in fixed this problem. I've had issues before that proved to be this file, in particular a widget that was a companion to another application wouldn't work right. Why that was so was rather baffling. This has gotten me to thinking that maybe some of the more baffling issues some members come here about could be traced back to that file. Being hidden and not an "obvious" thing to tie problems to, it's very easily overlooked. In the past, I was only able to narrow it down to this file by some very aggressive trial and error testing.

At any rate, I wanted to share this tip as food for thought and something to consider trying when all else fails. The simplest way to delete it would be via this Terminal command (EDIT: first copy it to a backup location like the Desktop, then delete in the order below):
Code:
cp -f ~/Library/Preferences/.GlobalPreferences.plist ~/Desktop
(this will copy the file as a backup to the Desktop)

rm -f ~/Library/Preferences/.GlobalPreferences.plist
(this will delete the original file)

If you want to restore the backup copy:
Code:
mv -f ~/Desktop/.GlobalPreferences.plist ~/Library/Preferences

Once done, log out and back in. This may reset some preferences that have been set in the past, but I've never found it to be particularly disruptive.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Very interesting. I just opened that file with my plist viewer and editor and took a look at what it holds. It seems to have a myriad of settings from colors to printers and some nuts and bolts. Normally, I would be a bit apprehensive about deleting that file but since you say you removed it without any adverse effect, I'll keep it in mind the next time something weird happens to my system.

Thanks.
 
OP
L
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Yes, it does have a myriad of settings. Here's the keys in my "new one":

Code:
<key>AppleEnableMenuBarTransparency</key> <false/>
<key>com.apple.springing.delay</key> <real>0.5</real>
<key>com.apple.springing.enabled</key> <true/>
<key>com.apple.swipescrolldirection</key> <false/>

The first and last ones apparently got added and set when I changed those options because they reset to the defaults after I logged back in. The middle ones I guess were there already? Anywho, I pulled an old version off my Time Capsule and there are FAR more keys in there. A lot of them are some other customizations, like modified keyboard shortcuts. Of interest in my problem today is this key:

Code:
<key>AppleSpacesSwitchOnActivate</key> <false/>

I'm betting that's the one that's causing the problem I was having, and removing just that key (or setting it to "true") would have fixed me up. But what I don't get is HOW that key got in there in the first place, and more importantly changed to that value? I see nothing in the utilities I have that would have done that.

EDIT: confirmed. That key was the problem.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top