Use Apple's screen saver images as desktop pictures

Nov 09, '04 09:12:00AM

Contributed by: juz10mac

Let me just warn you, this hint is a little technical. But when you are done with these steps, you will be able to set your desktop pictures to any of the the Beach, Cosmos or Forest pictures from the built-in screen savers, without using any additional hard disk space (aside from a few kilobytes for folders and hard links). The image at left shows what you'll wind up with when you're done; click on the image for a larger version.

[robg adds: This hint is a more thorough and elegant solution than that presented in this older hint, which basically involves copying the images out into another location. If you'd like the simple method, use the older hint. If you'd like more options and no wasted drive space, then read the rest of this hint.

I have tested every step of this process, and it does work as described -- the image at left is from my machine, after completing the modifications. Note that future system updates may overwrite your work, as this hint involves modifying a couple of system files.]

First you will need to make folders in your machine's top-level Library -> Desktop Pictures folder (not your user's Library folder!) called Beach, Cosmos, and Forest (you can do this in the Finder or the Terminal, it's up to you). The next part requires that you open the Terminal and type the following commands (copy and paste will make this easier and more accurate; don't copy the $, as that's just the Unix prompt):

$ ln /System/Library/Screen\ Savers/Forest.slideSaver/Contents\
/Resources/* /Library/Desktop\ Pictures/Forest/
$ ln /System/Library/Screen\ Savers/Beach.slideSaver/Contents\
/Resources/* /Library/Desktop\ Pictures/Beach/
$ ln /System/Library/Screen\ Savers/Cosmos.slideSaver/Contents\
/Resources/* /Library/Desktop\ Pictures/Cosmos/
These commands make hard links to the actual picture files within each screen saver. Now you have 'copies' of the pictures from those screen savers in your /Library/Desktop Pictures folder. However, these 'copies' are actually hard links to the files (they don't take more than 4KB a piece), but you'd never know by looking at them. You can stop here if you'd like and just get to these desktops by choosing the 'Choose Folder' link in your Desktop tab of the Desktop and Screen Saver preference pane.

The next step is adding those folders as options in your Desktop and Screen Saver preference pane. This is the technical part. I have only tested this with Panther, so if you have anything else, it may or may not work. Edit the file called Collections.plist, located in /System -> Library -> PreferencePanes -> DesktopScreenEffectsPref.prefPane -> Contents -> Resources -> DesktopPictures.prefPane -> Contents -> Resources. Using your favorite pure text editor, add the following lines:
    ,{
      identifier = beach;
      path = "/Library/Desktop Pictures/Beach";
      showScalingPopUp = NO;
    }
    ,{
      identifier = cosmos;
      path = "/Library/Desktop Pictures/Cosmos";
      showScalingPopUp = NO;
    }
    ,{
      identifier = forest;
      path = "/Library/Desktop Pictures/Forest";
      showScalingPopUp = NO;
    }
You can add these in any order you want, but please notice where the commas are, and do try and get the syntax right. The way it is setup now, you can just add the lines to the end of the file -- before the closing ).

For the next part you need to be root, or you can chown the file and directories you are working with to your user. Just be sure to change them back when you are done (this is the way I did it). Run this command to open the file, after chaning the permissions:
$ open /System/Library/PreferencePanes/DesktopScreenEffectsPref.prefPane\
/Contents/Resources/DesktopPictures.prefPane/Contents/Resources/\
English.lproj/Collections.strings
[robg adds: Perhaps the easiest way to edit this file if you're not overly comfortable in the Terminal is to use the Get Info box in the Finder. Change the owner of the English.lproj folder to your admin user (click the lock to enable this change). You can now open and edit the file in TextEdit -- you'll get a warning about saving, but it will work. Then change the owner back to System when you're done.]

This opened it in XCode for me -- note that this file is in Unicode, and you won't be able to edit it with vi, pico, or emacs. I don't know what it will do if you don't have the Developer Tools installed. Add the following:
beach = "Beach";
cosmos = "Cosmos";
forest = "Forest";
Save your modifications and open your Desktop and Screen Saver preference pane, and you should see your desktop selections added to the menu at the left. Enjoy!

Here's a recap and what it boils down to: That's it, sorry it was so technical, but if you only do the first step (making the hard links), it will still be usable to you by choosing the 'Choose Folder' link in your Desktop tab of the Desktop and Screen Saver preference pane. Just specify the location of the picture folder you want to use under /Library -> Desktop Pictures.

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041104103615316