Geek Projects – Linux, Apache, MySQL, PHP, DNS A Linux Sysadmin

July 9, 2008

sha1sum in Mac OS X

Filed under: Mac OS X — Matt @ 5:44 pm

Mac OS X doesn’t come with a sha1sum utility. Neither does fink. So what’s the quickest way to check a sha1sum on a Mac? Use openssl:

openssl sha1 filename

If you’d like to roll this sha1sum check into a simple bash script, create the following sha1sum script:

#!/bin/bash
/usr/bin/openssl sha1 $1

Then make the sha1sum script executable, and run it:

chmod 755 sha1sum
./sha1sum filename

February 23, 2008

Using dd to write disk images to CompactFlash disks and floppies under Mac OS X

Filed under: Mac OS X — Matt @ 10:56 am

Here’s how to use the dd utility to write a disk image to media under Mac OS X. I tested this with 10.5.2 with both a USB to CompactFlash adaptor, and a USB Imation USB SuperDisk.

  1. Plug the media into your Mac.
  2. If you get a message saying that the media cannot be read, click Ignore.
  3. Open Disk Utility (Applications -> Utilities -> Disk Utility).
  4. On the left-hand column, find that disk that you plan to write to. Select any partitions on that disk that are mounted, and click the Unmount button (not the Eject button). Once unmounted, the partitions should grey out.
  5. On the left-hand column, find that disk that you plan to write to, click it, then click on the Info button.
  6. In the window that pops up, note the Disk Identifier. It should be something like disk2 or disk3.
  7. Open up Terminal (Applications -> Utilities -> Terminal).
  8. Type in the following command, replacing diskx with the Disk Identifier found earlier, and image.img with the name of the image file that you wish to read from.

sudo dd if=image.img of=/dev/diskx

January 11, 2008

VNC in Mac OS X 10.3.9

Filed under: Mac OS X — Matt @ 10:07 pm

The latest version of Vine Server (3.0) only officially works with Mac OS X 10.4 or later, but there’s a way to make it work with Mac OS X 10.3 (Panther). After installing Vine normally, just delete the following directory. It contains the offending OS X 10.5 (Leopard) specific files:

/Applications/Vine Server.app/Content/Resources/TigerBundle.bundle

That’s it! You should now be able to launch Vine’s VNC Server from the Applications Folder, configure it, and remotely control to your Mac OS X 10.3 system over the network.

January 10, 2008

Kismac r62 download for Mac OS X 10.3 (Panther)

Filed under: Mac OS X,Wireless — Matt @ 11:58 pm

I was able to download a copy of the elusive Kismac r62 – the last version of Kismac to run on Mac OS X 10.3 (Panther). Kismac r62 is now running happily on my G4 iBook with OS X 10.3.9. I’ve mirrored Kismac r62 here in case anyone wants to download it:

Prevening an iBook G4 from going to sleep when closed

Filed under: Mac OS X — Matt @ 5:34 pm

Here’s how I prevented my iBook G4 notebook from going to sleep when the lid is closed. This worked with Mac OS X 10.3.9 (Panther). YMMV. If you’re running a OS X 10.4 (Tiger) or newer, you might want to check out InsomniaX instead. InsomniaX should work with Mac OS X 10.4 and later.

  1. Download and decompress Insomnia.kext.tbz. I wasn’t able to retrieve a copy of from the Insomnia project’s home page, but I did grab a working copy off of the Internet Archive, which I mirrored here. I also mirrored a copy of the source code in the Insomnia.src.tbz file.
  2. Open a command prompt, switch to the directory that you decompressed Insomnia.kext.tbz to, and execute the following commands:
    1. sudo chown root:wheel Insomnia.kext # set the module to be owned by root
    2. mv Insomnia.kext /System/Library/Extensions # move the module to the kernel extensions directory
    3. cd /System/Library/Extensions # change to the kernel extensions directory
    4. sudo kextload Insomnia.kext # load the module
  3. Test the module by closing your notebook’s lid. If your Mac doesn’t go to sleep, you’re in business.

You can unload the Insomnia.kext module at any time by executing the following commands:

  1. cd /System/Library/Extensions # change to the kernel extensions directory
  2. sudo kextunload Insomnia.kext # unload the module

Powered by WordPress