• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reply to Answer to Mounted Network Drives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reply to Answer to Mounted Network Drives


  • Subject: Re: Reply to Answer to Mounted Network Drives
  • From: Ron Hunsinger <email@hidden>
  • Date: Thu, 11 Feb 2010 21:27:31 -0800

At 4:40 PM -0500 2/11/10, Chris Devers wrote:
The problem now becomes mapping out all the ways that icon previews
can be referenced in Finder's plist file, as it turns out that it can
show up in about a dozen places, and -- bafflingly -- it seems like
big chunks of the file wink in & out of existence when you use the
Finder normally, switching view modes etc.

The problem is that you're trying to edit an application's plist behind its back while it's running. That isn't reliable, and in fact usually doesn't work at all.


Typically an application reads all its settings from its plist when it launches, and holds them in memory until it quits, at which time the file gets rewritten if ANY in-memory settings are 'dirty'. Settings that the program changes may or may not get written back to the file at unpredictable times while the program is running, but you can only count on changes being written when the program quits normally.

Changes you make to the plist while the program is running WILL get overwritten when the program quits if it has ANY pending changes in its in-memory version of the settings.

The only reliable way to make changes to the preference file take hold is to either make sure the program is not running when you make the change (preferred), or immediately force-quit it after modifying the file (brutal, because it prevents the program from cleaning up nicely, as well as discarding any in-memory changes). Some applications (Dock, for example) cannot be quit cleanly, so you have to force-quit them (as with: killall Dock), but if possible shut a program down in an orderly fashion before editing its plist.

In the case of Finder, surround your edits with:

    osascript -e 'tell application "Finder" to quit'

and

    osascript -e 'tell application "Finder" to activate'

Finder will write back all of its settings to com.apple.Finder before it quits, and then re-read them from that file when it re-launches.

There will be a visual effect. All of Finder's windows will disappear when it quits, and then come back when it re-launches. Fortunately, they'll come back exactly as they were, since the list of open windows, complete with the size, position, and view of each, is among the information that gets saved in the plist.

-Ron Hunsinger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Reply to Answer to Mounted Network Drives (From: "Richard @ Beaver Promotions" <email@hidden>)
 >Re: Reply to Answer to Mounted Network Drives (From: Chris Devers <email@hidden>)
 >Re: Reply to Answer to Mounted Network Drives (From: Richard Lake <email@hidden>)
 >Re: Reply to Answer to Mounted Network Drives (From: Chris Devers <email@hidden>)
 >Re: Reply to Answer to Mounted Network Drives (From: Chris Devers <email@hidden>)

  • Prev by Date: Re: Automator-users digest: Folder Contents
  • Next by Date: Do shell script error
  • Previous by thread: Re: Reply to Answer to Mounted Network Drives
  • Next by thread: Change icon on file properties
  • Index(es):
    • Date
    • Thread