Category Archives: OS X

Disable build-in iSight Camera in OS X up to 10.6

Paranoid people might dislike the glaring iSight camera in recent Apple computers. Apart from the option to put a sticker on the camera hole, the following script disables the according driver suppressing the OS to interact with the camera (credits go to cense@techslaves.org):

-- Intel Mac iSight Disabler
-- Tested on OS X 10.6.2
-- Tested on 1st generation MacBook
-- Version 3.5
-- Credit to fdoc from techslaves.org forum for Snow Leopard fix
-- All this does is change permission on the iSight driver files. From normal 'a+r' and 'u+rx' when enabled to 'a-rwx' when disabled.
-- cense@techslaves.org

tell application "Finder"
    set os_version to version
end tell

display dialog "Intel Mac iSight Disabler
brought to you by techslaves.org.

Version 3.5
Support for Snow Leopard

You need to restart applications which use the iSight driver(s) after applying these settings." buttons {"Enable iSight", "Disable iSight"} with icon stop

set userChoice to button returned of result

set iSightDrivers to "/System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer /System/Library/PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC "

if os_version ≥ 10.6 then
    set iSightDrivers to iSightDrivers & "/System/Library/PrivateFrameworks/CoreMediaIOServices.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC"
end if

if userChoice = "Enable iSight" then
    do shell script "/bin/chmod a+r " & iSightDrivers & "; /bin/chmod u+rx " & iSightDrivers     with administrator privileges
else if userChoice = "Disable iSight" then
    do shell script "/bin/chmod a-rwx " & iSightDrivers with administrator privileges
end if

Adjust texmf-Path in OS X

This tip describes how to adjust the storage location of the texmf-path in a Macports LaTeX installation. The following file needs adjustments accordingly:

vi /opt/local/share/texmf/web2c/texmf.cnf

Install Privoxy 3.0.12 on OS X

This is merely an install log which pretty much describes the basic setup and maintenance work in itself:

$ sudo port install privoxy
Password:
--->  Computing dependencies for privoxy
--->  Fetching pcre
--->  Attempting to fetch pcre-7.9.tar.bz2 from ftp://ftp.tin.org/pub/libs/pcre/
--->  Verifying checksum(s) for pcre
--->  Extracting pcre
--->  Configuring pcre
--->  Building pcre
--->  Staging pcre into destroot
--->  Installing pcre @7.9_0
--->  Activating pcre @7.9_0
--->  Cleaning pcre
--->  Fetching privoxy
--->  Attempting to fetch privoxy-3.0.12-stable-src.tar.gz from http://voxel.dl.sourceforge.net/ijbswa
--->  Verifying checksum(s) for privoxy
--->  Extracting privoxy
--->  Configuring privoxy
--->  Building privoxy
--->  Staging privoxy into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting privoxy with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.Privoxy.plist
###########################################################
--->  Installing privoxy @3.0.12_0+darwin
--->  Activating privoxy @3.0.12_0+darwin
--->  Cleaning privoxy

Hide Application from OS X’s Dock

To hide an application from OS X's dock edit its plist-file and change the according lines to match the following:

<key>LSUIElement</key>
<string>1</string>

Quick Traffic Shaping in OS X

In order to enable bandwidth limitations in OS X the following can be useful. This example limits port 139/tcp and port 445/tcp to 5 MBit/s:

ipfw -f pipe flush
ipfw -f flush
ipfw add pipe 1 dst-port 139
ipfw add pipe 1 dst-port 445
ipfw pipe 1 config bw 5Mbit/s
ipfw pipe show
ipfw show

To release the limitation again the following lines do the trick:

ipfw -f pipe flush
ipfw -f flush

ipfw pipe show
ipfw show

Disable creation of DS_Store files on network volumes

In order to keep OS X from creating DS_Store files on network shares enter the following command in Terminal's CLI:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true