Wednesday, June 04, 2008

Error creating thumbnail: /path/to/wiki/bin/ulimit.sh: xrealloc: ../bash/subst.c:514: cannot reallocate 512 bytes

(permalink)
MediaWiki's software was giving me this error, and I couldn't find a solution on google. I thought I'd post one.

I was able to fix the problem by moving the bin folder to bin.bak, downloading a new copy of mediawiki, and copying the bin folder from the new installation.

I suspect that the error occurs when you set the permissions on ulimit.sh to global read-write (777). The ulimit.sh in the new bin directory was set with limited permissions:

total 20K
-rwxr-xr-x 1 root root 88 Jun 5 04:18 svnstat
-rwxr-xr-x 1 root root 52 Jun 5 04:18 ulimit-tvf.sh
-rw-r--r-- 1 root root 53 Jun 5 04:18 ulimit.sh
-rwxrwxrwx 1 root root 53 Jun 2 01:54 ulimit.sh.bak
-rwxr-xr-x 1 root root 48 Jun 5 04:18 ulimit4.sh


Correcting the error may be as easy as changing the permissions, but if that doesn't work, you can follow the steps I outlined above.

Labels: , ,

Tuesday, May 27, 2008

a quick tip: the disk "name-here" is in use and could not be ejected

(permalink)
Under Leopard I seem to get this error relatively often when I'm trying to eject my external disks. Even after quitting all my applications, the error doesn't go away. I never want to disconnect my drive without unmounting it (maybe it's an OCD thing). Here's my solution:

First, get the device name of the drive: Disk utility > Select volume > Click Info > Then note the disk identifier.

Open up terminal to check which applications are using this drive (substitute your drive name):
lsof /dev/disk2s10


Quit (or kill) all the processes that are using the resource. If nothing is returned (as is frequently the case with me), then force umount the drive (substitute your drive mount point):
sudo umount -f /Volumes/Backup


I'm adding this because the man page on umount doesn't document the force (-f) option.

Labels: , ,

Thursday, February 21, 2008

Save 6-7 GB on Leopard

(permalink)
If you have a MacBook Air, this tip is especially helpful, given the tiny size of your hard drive.

Here are some quick steps you can follow to save 6-7 GB:

1. Open up terminal and type "rm -r /Library/Printers/*" to delete 3GB worth of printer drivers. Then use the Leopard install CD to reinstall drivers for the 1-2 printers you actually own.

2. Disable safe sleep and remove the sleeimage. To do this, open your terminal and type "sudo pmset -a hibernatemode 0; sudo rm /var/vm/sleepimage"

Note: After you do this your mac will take about 3 seconds to go to sleep, as opposed to ~15. However, if your battery is exhausted while the mac is sleeping, you will loose your session data.

To re-enable safe sleep, open your terminal and type "sudo pmset -a hibernatemode 0"

3. Delete your iWork '08 trial (if you're not using it):

Drag the iWork folder (in Applications) to the trash can.

You'll also want to delete:
library > receipts > iwork08trial.pkg
library > preferences > com.apple.iwork08.plist
youraccount > library > preferences > com.apple.iWork.Keynote.plist
youraccount > library > preferences > com.apple.iWork.Numbers.plist
youraccount > library > preferences > com.apple.iWork.Pages.plist

Labels: , , , ,

Friday, January 25, 2008

Getting music off your iPod without third-party apps

(permalink)
I recently needed to get music off my iPod - something that should be easy to do, but isn't. Most How-to's suggest that you download a third-party, like iLinkPod. There's an easier way to do this on your Mac, no third-party app required.

First, plug in your iPod and make sure "Enable disk use" is checked under your iPod preferences in iTunes. If your iPod shows up on your desktop, then you're fine. Next, open up Terminal, and cd into your iPod (cd /Volumes/Ipod_name_here). You should see a directory called "iPod_Control." All your music is stored within that directory. cp to your heart's content.



If you're not comfortable with the terminal, you can easily view all your music in finder. Simply open the terminal and execute these two commands:
# defaults write com.apple.finder AppleShowAllFiles TRUE
# killall Finder


Labels: , , ,