Skip to main content

os x

Managing Code Snippets

Posted in

Utilities for managing snippets of code

Spotlight Indexing

Shell commands to control Spotlight indexing on volumes.

  • To only turn off indexing on a volume:
    sudo mdutil -i off /Volume/drivename/
  • To Turn off indexing and remove indices on a volume:
    sudo mdutil -E -i off /Volumes/drivename/
  • To only turn on indexing on a volume:
    sudo mdutil -i on /Volumes/drivename/
  • To turn on indexing and rebuild indices on a volume:
    sudo mdutil -E -i on /Volumes/drivename/
  • To only force rebuilding of indices on a volume:
    sudo mdutil -E /Volumes/drivename

Login Hooks

Posted in

How to execute scripts when a user logs into, or out of, an OS X workstation.

Apple tech note
Bombich.com article
Scripting Login Tasks in OS X

Create a hook:

sudo defaults write com.apple.loginwindow LoginHook /path/to/script

See what the login hook is set to:
sudo defaults read com.apple.loginwindow LoginHook

Snow Leopard Deployment Issues

Posted in

Collection of assorted issues that came up deploying some OS 10.6 "Snow Leopard" iMacs.

  • Adobe Acrobat Crashes on OS X With Network Account - an alternative way of achieving this solution, since we have OS X Server, was to use MCX to automatically redirect the folders for network users:
    Action - deleteAndCreateSymblink
    Destination Folder Path - /Users/Shared/9.0_x86/
    Folder Path: ~/Library/Application Support/Adobe/Acrobat/9.0_x86

chflag

Posted in

OS X flags for further controlling what can be done with folders and files.

http://www.macosxhints.com/article.php?story=20031017061722471

  • arch - "archived flag"
  • opaque - "opaque flag"
  • nodump - "nodump flag"
  • sappnd - "system append-only flag"
  • schg - "system immutable flag"
  • uappnd - "user append-only flag"
  • uchg - "user immutable flag"

Lock a file from being moved, renamed or deleted:

chflags uchg filename

Undo it with:
chflags nouchg filename

OS X Font Management

Posted in

Notes on handling fonts in OS X, particularly 10.6 Snow Leopard.

Font Management in OS X - lots of tips on managing fonts in various versions of OS X, and what to do about Apple's versions of Helvetica, etc.

How to Clear the Font Cache

Undoing Font Book - how to reset Font Book's cache.

ImageMagick for OS X

Installing ImageMagick on OS X 10.3 (Panther) and OS X 10.6 (Snow Leopard).

Recommended Libraries

ImageMagick installation
To get the latest version of ImageMagick:

Capturing Web Pages

Posted in

Options for automating the capture of a screen shot of a web page.

Paparazzi!
Paparazzi! is an OS X application for capturing screenshots of web pages. It is AppleScriptable to automate the capture of a page:

tell application "Paparazzi!"
  capture "http://www.google.com/"
  repeat while busy
    delay 1
  end repeat
  save in POSIX file "/Users/foo/Desktop/google.png" as PNG with icon
end tell

webkit2png

PHP5 on Panther

Posted in

Special instructions for installing PHP5 on OS X 10.3

Syndicate content