HOWTO: Hack up a Mac OS X Screen Saver


With the release of Mac OS X, Apple put a screen saver back in the OS, not because monitor technology has gotten worse, but because users wanted this feature for entertainment purposes. But sometimes you just want a simple screen saver that won't steal processor time from whatever else your computer is doing. Apple provides Basic.saver, but you can't easily customize it. So, in the interest of making the basic screen saver a little more friendly, I present a hack to display any image you want.

Before we begin, be warned that this is a hack, so if your computer explodes into flames, eats your data, or whatever, I'm not responsible. Sorry, but I can't afford to accept that liability. It's your responsibility to use this information wisely.

Getting Started

Because every major revision of Mac OS X (10.1, 10.2, 10.3, ...) seems to change particulars in the screen savers, the instructions differ slightly intraversion. This first section, though, describes the first steps required for all versions.

The first thing you need is an image. Any image will do, but I recommend one not much more than 100 by 100 pixels, since larger images don't have as much room to move around, but this is just a matter of taste; it doesn't matter for making the hack work what size image you want to use. Your image will need to have a black background unless you like a different colored box around your image. Also, it's best to save your image as a tiff. Other formats may work, but tiff is the one originally used and it's what I used (I did not test others). Once you have your image ready, precede to the appropriate steps for your version of Mac OS X.

Mac OS X 10.3+

This section is forthcoming. If you'd like to see it soonish, e-mail me some encouragement and it will probably happen sooner.

Mac OS X 10.2

In 10.2 the process is very simple. From Terminal, type

cp -r /System/Library/Frameworks/ScreenSaver.framework/Resources/Computer\ Name.saver ./

This will put a copy of the Computer Name screen saver in the current working directory. Then copy your image by typing

cp your_image.tiff Computer\ Name.saver/Contents/Resources/ScreenSaver.tiff

To avoid strange errors, you need to rename your screen saver. Personally I use ShowTiff, but you can use whatever you want. First type

mv Computer\ Name.saver ShowTiff.saver

Next type:

mv ShowTiff.saver/Contents/MacOS/Computer\ Name ShowTiff.saver/Contents/MacOS/ShowTiff

That's it; you've created your own custom screen saver.

All that's left to do is install it. This is the same as for any screen saver: drag it into any ...Library/Screen Savers/ directory. Go to System Preferences and try it out. I haven't had as many problems as I used to after performing the hack on previous versions of OS X, but your mileage may vary.

Mac OS X 10.1

This version makes the hack a one-step process, but the only catch is that you'll need root access. With that in mind, type in Terminal:

cp /System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/Basic.saver/Contents/Resources/ScreenSaver.tiff

to make a copy of the Apple supplied image used by Basic.saver. Or skip this step if you don't care about preserving the original. Now, type:

cp path/to/your/image.tiff /System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/Basic.saver/Contents/Resources/ScreenSaver.tiff

and you're done. Just choose Basic in the ScreenSavers control panel to see the result. I'll admit, this means you just were able to change the built-in Basic.saver rather than create a new screen saver, but Apple seemed to 'fix' things so that creating a copy didn't work.

Mac OS X 10.0

Find Basic.saver. The easiest way to do this is start up Sherlock and search for 'Basic.saver' on your partition with OS X /System directory. Use the most recent version you find, but I did this with the one from version A of ScreenSaver.framework, so future versions may have small quirks that make things different, but most likely not. When you find this file, copy it into ~/Library/Screen Savers (you can move it around later, but let's work on it from your home directory).

Now we get to the hack part. First, rename that copy of Basic.saver in ~/Library/Screen Savers to something else (I used 'ShowTiff.saver', but so long as it ends in '.saver', you'll be fine, but from here on out I assume you are also using ShowTiff and if you are not just replace whatever you're using when I use ShowTiff). Next, using Terminal, type:

cd ~/Library/Screen\ Savers/ShowTiff.saver/Contents/MacOS

and:

mv Basic ShowTiff

Now, for the really important part:

cd ../Resources/English.lproj

(actually, cd into the right .lproj directory depending on your language) and then move the image you created earlier into the current directory under the name 'ScreenSaver.tiff'. You're done.

Start up System Preferences and on the Screen Saver panel choose ShowTiff and you should now be using Basic.saver but with your image of choice. Note that Basic.saver will now no longer work. I've tried some little tricks and I can't seem to get it to work so long as my hacked up saver is available for use. It's not that big a deal, though, since the whole point of this was to create a nice custom screen saver to use rather than the boring basic one with the graphite Apple logo, but getting access to it again is as simple as moving a file out of the a Screen Saver directory

Posted: Sat - August 23, 2003 at 05:18 PM        


©