10.5: Install ImageMagick without Fink or MacPorts
I needed ImageMagick -- especially as a Ruby GEM -- so I had to somehow get gem install rmagick working, as it didn't work out of the box: Leopard doesn't ship with ImageMagick.If you've ever tried to install ImageMagick without Fink or MacPorts, you'll have a quite good chance to go completely nuts. Especially the interdependencies of libjpeg and ghostscript are insane. I also wanted to keep the install as small as possible, and therefore I decided against installing the whole ghostscript package (but you may do so if you like).I created a set of commands that you can copy-and-paste into a shell script, which should install ImageMagick flawlessly on your Mac. Please notice that Mac OS X 10.5.4 (or higher), XCode 3.1 (or higher), and X11 is required. You'll find the shell command...
published on Monday, the 25. August 2008, macosxhints
Install the fish shell
The fish shell is a modern command-line shell that aims to be more discoverable and less beholden to tradition than other shells like bash and csh. Among its many unique features are on-the-fly syntax highlighting of the command line, as well as tab completion for everything under the sun with descriptions for each possible completion. Unfortunately, this shell does not ship with Mac OS X, so you'll need to do some work to install it. First, download and install MacPorts. This will provide a Terminal command, port, that you can run to download packages. If you prefer a nice GUI for this, though, I recommend downloading and installing Porticus as well. If you're using plain old port, type port install fish at the command line. If you're using Porticus (or another MacPorts GUI), search for "fish" in "All Packages" and click the Install toolb...
published on Wednesday, the 20. August 2008, macosxhints
PortAuthority updates GUI for MacPorts UNIX tool
Code by Kevin has announced PortAuthority 2.6, an update to its graphical user-interface software for the MacPorts command-line tool for UNIX. MacPorts is an open-source community project that uses the Mac OS X command line, X-11 and Aqua software to bring UNIX to everyday users -- by providing a GUI for users seeking a simple interface over the co...
published on Tuesday, the 5. August 2008, macintosh-news-network
Date calculations with stock and Gnu versions of 'date'
The stock OS X date command ships with a useful -v command that allows date calculation. For example, to determine the last day of February, you could use the following: date -v3m -v1d That's the third month in the first -v, and then less one day in the second -v. man date gives many examples. On the other hand, the Gnu version of date that's available from MacPorts does not support this option. Playing a bit with the --date option for Gnu's date, I came up with: date --date="march 1 1 day ago" This results in the same date calculation as in the stock date function. Gnu's date also includes the option of printing rfc-2822 and rfc-3339 dates. The latter can be used for applications like Google that require xls dates: date --rfc-3339='ns' 2008-07-23 18:28:00.110568000+05:30 The ...
published on Friday, the 25. July 2008, macosxhints
Incremental Backup 1.1
TimeMachine on Leopard is great. Unless you're running on Tiger. Or unless you have two drives that you want to swap out for rotating backups sets. This script will allow you to set up incremental backups from any source, to virtually any destination. Be sure to read the Read Me for how to configure the script. Released free under the GPL. **REQUIRES RSYNC 3.0 OR LATER** You must install this manually using MacPorts or similar. Why Because the version of rsync that Apple ships with Leopard (and Tiger) has a bug where it copies all resource fork data, regardless if it's changed or not. This has the nasty habit of eating up disk space rapidly. As an added bonus, rsync 3 is faster as well.
published on Monday, the 7. July 2008, scriptbuilders
Import Mail's Recent Contacts into Address Book
I needed to find a quick and dirty way to put all of Mail.app's stored email addresses into my Address Book. It turns out that these are stored in a SQLitev3 database named MailRecents-v4.abcdmr in ~/Library » Application Support » AddressBook/. To import these into Address Book's contact list, all I needed to do was this: Install SQLitev3 (sudo port install sqlite3 if using MacPorts) Dump the contents of the recents table to a text file with this series of commands in Terminal: $ sqlite3 ~/Library/Application Support/AddressBook/MailRecents-v4.abcdmr sqlite> .separator , sqlite> .output /path/to/outputput/file/Recents.csv sqlite> select * from ZABCDMAILRECENT; sqlite> .exit Now use Address Book's File » Import function to import the newly-created Recents.csv as a text file. You will be prompted to choose which fields to import as what, with the first/last names and email addresses from your recents avail...
published on Friday, the 2. May 2008, macosxhints
10.5: Get TinyCA2 to build under Leopard
With the advent of 10.5, MacPorts has had to undergo a lot of updates, some of which have been painfully slow in coming. As a freelance security consultant, I *have* to have TinyCA2 working. Unfortunately, the MacPort project to update it for 10.5 took five months before the trouble ticket was finally even assigned to a maintainer. (I suppose these guys have a lot to do.) So here are some workarounds to make it compile under Leopard: Edit the files (as root) that are listed in the error output (I had six instances total in four different files) following the command sudo port install tinyca2. In those files, delete the ' character (apostrophe) mentioned on the line number indicated, which follows the colon in the error output. (If you use nano to edit the files, p...
published on Monday, the 24. March 2008, macosxhints
Batch or one-time convert APE to MP3 via script
I've written a Ruby script that batch converts ape format files straight to individual ID3-tagged mp3 files for adding to your iTunes library. It uses all free software to do so. The muscle work is done by: Mac ape conversion tool (ape => wav) named SuperMMX. There's no MacPorts version of this utility, so you have to hand install. SuperMMX - Google translation. lame mp3 encoder using --preset extreme to convert to monolithic mp3 (available from MacPorts) mp3splt to read the ape cue files and split the monolithic mp3 into tracks with ID3 tags. (also ...
published on Monday, the 17. March 2008, macosxhints
Use a theme with X11 graphical (GTK) programs
This hint applies if you have GTK applications installed through MacPorts. It may also work with GTK applications installed through other means, but your mileage may vary. These applications, by default, look really ugly because there's no decent gtk2 theme engine installed. But it's actually very simple to install one. In Terminal, just type:port search gtk2Some gtk2 packages will be displayed, but we're interested specifically in the gtk2 theme engines, such as gtk2-aurora and gtk2-clearlooks. To install one (I highly recommend one of those two), simply type:sudo port install gtk2-auroraYou will need to enter your administrative password for sudo.As soon as you're finished, you should also install gtk-chtheme by typing sudo port install gtk-chtheme. You may also have to enter your administrative password here. You can now proceed to select the ...
published on Friday, the 14. March 2008, macosxhints
Convert Panasonic SDR-S10 MOD movies
Problem: Connecting the Panasonic SDR-S10 camcorder via USB works fine on the Mac, but you can't use the MOD files in QuickTime Player or in iMovie HD by default.Solution: Using ffmpeg (part of the MacPorts project) enables you to convert those MOD files into DV files without quality loss. Use this Terminal command:ffmpeg -i MOV001.MOD -target ntsc-dv video.dvThe resulting file (in this example, video.dv) can then be used in iMovie HD. You can also create result files with a special aspect ratio setting or in PAL format:mpeg -i video.avi -target pal-dv -aspect 16:9 video.dv[robg adds: While I haven't tested this hint, note that you can install ffmpeg without using MacPorts; this hint explains the process.]
published on Thursday, the 20. September 2007, macosxhints