Airdrop für alle
26/09/2011defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1; killall FinderArchive of articles classified as' "defaults write"
Back homedefaults write com.apple.NetworkBrowser BrowseAllInterfaces 1; killall Finderdefaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false via OS X Lion: Fensterwiederherstellung für einzelne Programme sperren « macnews.de.In der Library, unter Saved Application State werden alle Programme aufgeführt, bei denen ein solcher SavedState bereits gespeichert wurde =) also warum nicht ein kleines Skript:--11.08.2011 little script to edit saved state settings for a single app instead of all apps
global myhome
tell application "Finder"
set myhome to POSIX path of (home as alias)
set theitems to name of every item of folder "Saved Application State" of folder "Library" of home
set theapps to {}
repeat with theitem in theitems
if (theitem as text) ends with ".savedState" then
set theapps to theapps & ((characters 1 through -12 of theitem as text) as text)
end if
end repeat
end tell
set theapp to (choose from list theapps with prompt "Which app with saved state?") as text
set theactions to {"Delete SavedState", "Disable SavedState", "Enable SavedState", "Freeze Saved State", "Defrost Saved State"}
set theaction to (choose from list theactions with prompt "Which action?") as text
if theaction = (item 1 of theactions) as text then
my deleteSavedState(theapp)
else if theaction as text = (item 2 of theactions) as text then
my disableSavedState(theapp)
else if theaction as text = (item 3 of theactions) as text then
my enableSavedState(theapp)
else if theaction as text = (item 4 of theactions) as text then
my freezeSavedState(theapp)
else if theaction as text = (item 5 of theactions) as text then
my defrostSavedState(theapp)
end if
on deleteSavedState(appName)
--moves avedState to user's trash folder and plays drag to trash sound
do shell script "mv " & myhome & "Library/'Saved Application State'/" & quoted form of appName & ".savedState ~/.Trash/;afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/dock/drag\\ to\\ trash.aif"
end deleteSavedState
on disableSavedState(appName)
--uses defaults write to disable saved state for this particular app
do shell script "defaults write " & appName & " NSQuitAlwaysKeepsWindows -bool false"
do shell script "afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/ink/InkSoundBecomeMouse.aif"
end disableSavedState
on enableSavedState(appName)
--uses defaults write to disable saved state for this particular app
do shell script "defaults write " & appName & " NSQuitAlwaysKeepsWindows -bool true"
do shell script "afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/ink/InkSoundBecomeMouse.aif"
end enableSavedState
on freezeSavedState(appName)
--changes user permissions to read only, so that savedStated is frozen
do shell script "chmod u-w " & myhome & "Library/'Saved Application State'/" & quoted form of appName & ".savedState"
do shell script "afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/ink/InkSoundBecomeMouse.aif"
end freezeSavedState
on defrostSavedState(appName)
--changes user permissions to read&write again, so that savedStated is not frozen any more
do shell script "chmod u+w " & myhome & "Library/'Saved Application State'/" & quoted form of appName & ".savedState"
do shell script "afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/ink/InkSoundBecomeMouse.aif"
end defrostSavedState
defaults write com.apple.DiskUtility advanced-image-options 1defaults write com.apple.dock workspaces-edge-delay -float 0.1; killall DockSo groß ist der Safari cache
du -h ~/Library/Caches/com.apple.Safari/Webpage\ Previews
Das einfach löschen:
cd ~/Library/Caches/com.apple.Safari/Webpage\ Previews;rm *
und nun Safari diese Unart austreiben:
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
set h to button returned of (display dialog "Make Finder show all files" buttons {"Yes", "nope, default"} default button {"YES"}) as text
if h = "Yes" then
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder"
end if
defaults write com.apple.frontrow FrontRowUsePreferredDisplayID <<displayID>> Die Display ID bekommt man soweit ich es bisher weiss recht schnell durch Ausprobieren der Display IDs aus (~/Library/Preferences/com.apple.preference.displays....plist) heraus. Bei sah es dann am Ende so aus: defaults write com.apple.frontrow FrontRowUsePreferredDisplayID 69673024 (danach nur noch FronRow neustarten)
Gerade in gemischten Netzwerken nervt es, wenn die Macs auf den Shares immer ihre "unsichtbaren" Dateien wie .DS_Store hinterlassen. Tinker Tool kann da u.a. Abhilfe schaffen, indem man das Anlegen solche Dateien über den Finder unterbindet.