run Adobe Photoshop Elements 6 with MacOSX case sensitive filesystem

1. Install to case insensitive OS first and activate it to run
2. create dmg formatted and mounted as case insensitive. Copy files installed to /Applications of the mounted dmg
3. copy files under /Library/Application Support, /Library/Preferences and /Applications/Utilities to target case sensitive OS
4. transfer the dmg created in step 2 above to target OS and mounted there. Run the application from the mounted dmg which will fail
5. download Adobe license fixing dmg from Adobe and run to fix the application in step 4

Reset /Users/X in MacOSX


if [ ! -n “$1” ]; then
echo $0: user
exit 1

sudo chown -R $1:staff /Users/${1}
sudo chmod -R 700 /Users/${1}
sudo chmod 755 /Users/${1}
sudo chmod -R 755 /Users/${1}/Public /Users/${1}/Sites
sudo chmod -R 733 /Users/${1}/Public/Drop Box
sudo chmod +a “everyone deny delete” /Users/${1} /Users/${1}/Sites /Users/${1}/Public /Users/${1}/Desktop
/Users/${1}/Documents /Users/${1}/Downloads /Users/${1}/Pictures /Users/${1}/Music /Users/${1}/Movies
sudo chmod -R +a “${1} allow readattr,readextattr,readsecurity,list,search,read,execute,file_inherit,directory_inherit,delete,writeextattr,writeattr,write,append,delete_child,add_file,add_subdirectory”
/Users/${1}/Public/Drop Box

Change uid in MacOSX


echo dscl . -change /Users/xxx UniqueID 501 new_uid
echo dscl . -change /Users/xxx PrimaryGroupID 20 new_gid
echo chown -R : /Users/xxx
echo ls -n

how to create sparsebundle image file in Mac OSX


if [ ! -n “$2” ]; then
echo $0: machine_name MACid
exit 1

hdiutil create -size 80G -type SPARSEBUNDLE
-imagekey sparse-band-size=65536
-fs HFS+J
-volname “Backup $1”

Above is to create a sparsebundle file required for Time Machine backup to remote afp

autofs mount of nfs and afp with stardom NAS and Synology NAS

Stardom come with nfs
Synology come with afp

Use below to automount afp

1) add below to /etc/auto_master
/afp auto_afp
2) add below to auto_afp
mountpoint -fstype=afp afp://username:password@synology_ip_address/afp_share
3) use below to refresh autofs
automount -vc

Use below to automount nfs
1) add below to /etc/fstab
stardom_ip_address:/mnt/ide1/nfs_share /opt/nfs_share nfs resvport rw 0 0
2) use below to refresh autofs
automount -vc


diff -up ./audio_carbon.c.lama ./audio_carbon.c
— ./audio_carbon.c.lama 2004-01-23 17:41:31.000000000 +0800
+++ ./audio_carbon.c 2008-10-01 20:22:00.000000000 +0800
@@ -94,7 +94,7 @@ void callback(SndChannelPtr channel, Snd

-int wait(struct buffer *buffer)
+int delay(struct buffer *buffer)
if (MPWaitOnSemaphore(buffer->semaphore, kDurationForever) != noErr) {
audio_error = _(“MPWaitOnSemaphore() failed”);
@@ -263,7 +263,7 @@ int play(struct audio_play *play)
/* wait for block to finish playing */

if (buffer->pcm_nsamples == 0) {
– if (wait(buffer) == -1)
+ if (delay(buffer) == -1)
return -1;

buffer->pcm_length = 0;


export CFLAGS=”

export CPPFLAGS=”

export LDFLAGS=”