XScreenSaver 5.00 alpha 11

About this alpha I will go out on a limb and say that I think there is a very good chance that it won't wedge your computer. (High praise indeed!)

What's New:

  • I think all the preferences work now. Please let me know if you find anything that doesn't.
  • Comments on the layout/look of the .dmg?

    • Anything else I should say in the enclosed Readme? (Is HTML the Done Thing for those?)
    • I played around with writing a little Applescript "installer" that would just tell Finder "select all the .savers in this directory and drag them to $HOME/Library/Screen Savers", but I couldn't figure out any way to do that that didn't involve implementing the "replace/replace all/cancel" dialog myself, so I gave up.

  • Is it possible to delete the default Apple screen savers?   Update: Somehow I had missed that they are in "/System/Library/Screen Savers/".

  • Still waiting for a guru to tell me:

    • How to make screen grabbing work;
    • How to make XCopyArea() go real fast.
  • I'm open to suggestions about what to do about xscreensaver-getimage and xscreensaver-text. I could just put the scripts themselves inside the bundle, but what do I do about their preferences (image directory, URL to load, etc.) In the X11 version, those prefs are centralized...

  • Why don't my .saver bundles show up with custom icons in Finder? The .icns is in there, and CFBundleIconFile is set.

See the TODO list for more.

Tags: , , , ,

11 Responses:

  1. marmoset says:

    Another alternative for the README is to do an RTFD in TextEdit. The (minor) advantage over an HTML file is that, if you embed any graphics, they can be saved into a .rtfd bundle and you've got a single self-contained icon instead of a separate visible image folder.

  2. wombatbanana says:

    Have you tried profiling it with Shark?

    In Xcode, duplicate the Release configuration to a new configuration, Shark. Change the Shark configuration to generate debug info and not strip it out, set it to active, build one of the hacks (Truchet seems to call XCopyArea a lot) and copy it into ~/Library/Screen Savers. Then open /Developer/Applications/Performance Tools/Shark.app, open System Preferences, go to Desktop & Screen Saver, and select your hack so it runs in the preview window. Then hit Option+Esc to start Shark sampling, let it go for a while, and hit Option+Esc again to stop it.

    XCopyArea is spending most of its time in CGContextDrawImage. One thing to note is that, according to the CGContextDrawImage documentation, "Quartz scales the image-disproportionately, if necessary-to fit the bounds specified by the rect parameter." Do you know if you're hitting this case? This might be slowing you down.

    Also, there's something in the CGBitmapContextImageCreate docs that you might be running into. "The CGImage object returned by this function is created by a copy operation. Subsequent changes to the bitmap graphics context do not affect the contents of the returned image. In some cases the copy operation actually follows copy-on-write semantics, so that the actual physical copy of the bits occur only if the underlying data in the bitmap graphics context is modified. As a consequence, you may want to use the resulting image and release it before you perform additional drawing into the bitmap graphics context. In this way, you can avoid the actual physical copy of the data."

    • jwz says:

      I did try Shark (but right from XCode in my SaverTester, I didn't have to copy anything) and yeah, all I learned from that was "CGContextDrawImage is slow".

      I'm pretty sure I'm not scaling anything; there are a bunch of asserts in there to make sure of that.

      It seems likely that I'm hitting the "copy" case, but I don't know how to tell, or how to stop it if I am. I'm certainly not drawing into the CGBitmapContextImageCreate image after creating it; it's lifetime is fully within XCopyArea.

      So, I'm still completely out of ideas.

  3. giles says:

    I don't know about deleting screensavers, but you could use this thing:


    It lets you select a specific group of screensavers to be randomized, assign priorities to them, blah blah multiple monitors something something.

    • jimm3uller says:


      Very cool. My Linux box has been headless for a while, it's nice to have XScreenSaver back again.

      It would be nice if you added a randomizer that switches between the savers from time to time -- this is part of what makes the Linux versions kick ass.

  4. davidglover says:

    "MemScroller" crashes on my Dual G5 running 10.4.5. (Does the "unexpectedly quit" thing.)

    But also I just wanted to say thanks for all the hard work you're doing porting this. I'm loving having them on my Mac!

  5. duskwuff says:

    Only way to delete the Apple savers is to go into /System/Library/Screen Savers/ and delete them yourself.

    Have you fixed the GL pane-flipping bug in the preview? I'm on a slow connection and can't download a copy right now to check.

    • jwz says:

      Oh, they are just regular savers! I was confused because:

        % ls /Library/Screen\ Savers/
        2005 World Book.saver/

      But there they are:

        % ls /System/Library/Screen\ Savers/
        Abstract.slideSaver/ Paper Shadow.slideSaver/
        Beach.slideSaver/ RSS Visualizer.qtz
        Cosmos.slideSaver/ Random.saver/
        Flurry.saver/ Spectrum.qtz
        Forest.slideSaver/ iTunes Artwork.saver/
        Nature Patterns.slideSaver/

      I fixed a GL bug where some savers were competing amongst the two windows, so maybe that's what you're talking about?

      • duskwuff says:

        Yup. Most system-related stuff goes predictably into /System; /Library is essentially the OS X equivalent of /usr/local.

        That "GL bug" sounds like the issue I was running into. I'm on a faster connection now, and...

        Nope, still broken. Demo. As I said previously, I've got a 100% working GL screensaver example here (I independently ported Noof).

  6. alierak says:

    patch for jigsaw's flashing and clearing animations. Unfortunately it still blocks for a few seconds on my machine while taking the screenshot...

    • jwz says:

      Nice, thanks!

      Hopefully the "grab" delay will eventually be fixed by simply making the process of grabbing be really fast...