defaults (software) Usage Settings References Navigation menuNSUserDefaults documentationexpanding ite

MacOS softwareGNUstepCommand-line softwareMacintosh stubs


command lineplistmacOSGNUstepNeXTSTEP~/reverse domain name notationSafariaddress bar





defaults is a command line utility that manipulates plist files. defaults is present in the macOS and GNUstep operating systems, and first appeared in the NeXTSTEP operating system upon which both aforementioned systems are based. The system stores each user's preferences set in a .plist file for each program stored at ~/Library/Preferences for user-specific preferences, and /Library/Preferences/ for global preferences. defaults writes to or reads from these plist files depending on the domain given.


A great advantage of the defaults system, which differentiates it from other systems, is its ability to store data in almost any format imaginable: integer, character string, floating point, binary data, dates, so-called dictionaries, or arrays of the same.


Previous versions also offered the opportunity of direct disk access.



Usage


Common uses of defaults:


$ defaults read DOMAIN # gets all
$ defaults read DOMAIN PROPERTY_NAME # gets
$ defaults write DOMAIN PROPERTY_NAME $VALUE # sets
$ defaults delete DOMAIN PROPERTY_NAME # resets a property
$ defaults delete DOMAIN # resets preferences

DOMAIN should be replaced by the plist file sans extension ('.plist'). plist files are named with reverse domain name notation. For example:


$ defaults read com.apple.iTunes # prints all iTunes preference values

plist files store keys and values. The PROPERTY_NAME key is the name of the property to modify. For example, to remove the search field from Safari's address bar:


$ defaults write com.apple.Safari AddressBarIncludesGoogle 0

or


$ defaults write com.apple.Safari AddressBarIncludesGoogle -bool NO # case-sensitive!

Replacing 0 with 1 or NO with YES or FALSE with TRUE returns the search bar to normal.


Preferences can at times corrupt applications. To reset Address Book's preferences, you would either remove the file ~/Library/Preferences/com.apple.AddressBook.plist or issue the command:


$ defaults delete com.apple.AddressBook


Settings


Some example settings configurable with defaults.










































DomainValueOSX VersionLegal ValuesDefault Values
NSGlobalDomainAppleAquaColorVariant10.81, 61
NSGlobalDomainAppleHighlightColor10.83 floats range 0-1.0"0.780400 0.815700 0.858800"
NSGlobalDomainAppleShowScrollBars10.8Automatic, WhenScrolling, AlwaysAutomatic
NSGlobalDomainNSQuitAlwaysKeepsWindows10.8boolfalse
NSGlobalDomainNSAutomaticWindowAnimationsEnabled10.8booltrue
NSGlobalDomainNSNavPanelExpandedStateForSaveMode10.8boolfalse
NSGlobalDomainNSWindowResizeTime10.8float:time in seconds.2


References



  • NSUserDefaults documentation Apple Inc



Command-line software, GNUstep, Macintosh stubs, MacOS softwareUncategorized

Popular posts from this blog

Mobil Contents History Mobil brands Former Mobil brands Lukoil transaction Mobil UK Mobil Australia Mobil New Zealand Mobil Greece Mobil in Japan Mobil in Canada Mobil Egypt See also References External links Navigation menuwww.mobil.com"Mobil Corporation"the original"Our Houston campus""Business & Finance: Socony-Vacuum Corp.""Popular Mechanics""Lubrite Technologies""Exxon Mobil campus 'clearly happening'""Toledo Blade - Google News Archive Search""The Lion and the Moose - How 2 Executives Pulled off the Biggest Merger Ever""ExxonMobil Press Release""Lubricants""Archived copy"the original"Mobil 1™ and Mobil Super™ motor oil and synthetic motor oil - Mobil™ Motor Oils""Mobil Delvac""Mobil Industrial website""The State of Competition in Gasoline Marketing: The Effects of Refiner Operations at Retail""Mobil Travel Guide to become Forbes Travel Guide""Hotel Rankings: Forbes Merges with Mobil"the original"Jamieson oil industry history""Mobil news""Caltex pumps for control""Watchdog blocks Caltex bid""Exxon Mobil sells service station network""Mobil Oil New Zealand Limited is New Zealand's oldest oil company, with predecessor companies having first established a presence in the country in 1896""ExxonMobil subsidiaries have a business history in New Zealand stretching back more than 120 years. We are involved in petroleum refining and distribution and the marketing of fuels, lubricants and chemical products""Archived copy"the original"Exxon Mobil to Sell Its Japanese Arm for $3.9 Billion""Gas station merger will end Esso and Mobil's long run in Japan""Esso moves to affiliate itself with PC Optimum, no longer Aeroplan, in loyalty point switch""Mobil brand of gas stations to launch in Canada after deal for 213 Loblaws-owned locations""Mobil Nears Completion of Rebranding 200 Loblaw Gas Stations""Learn about ExxonMobil's operations in Egypt""Petrol and Diesel Service Stations in Egypt - Mobil"Official websiteExxon Mobil corporate websiteMobil Industrial official websiteeeeeeeeDA04275022275790-40000 0001 0860 5061n82045453134887257134887257

Frič See also Navigation menuinternal link

Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant