There is a native Cocoa/Quartz port of the XScreenSaver collection to MacOS now.
However, before I did that port, I made XScreenSaver work on MacOS systems that have the X11 server installed.
With the native port, there's no longer any sensible reason to run it that way, but this document describes some of the limitations you will encounter if you try to do so anyway...
XScreenSaver under X11 on MacOS has some limitations that are not present on more traditional Unix systems. These problems are unfortunate, but it's really pretty surprising that X11 programs work at all. The integration of MacOS and X11 is quite the little Frankenstein, and xscreensaver bumps up against a few rough edges that wouldn't matter to most other X11 programs.
To have xscreensaver start automatically on MacOS, first make the X subsystem launch at start-up; then create a file called /Users/yourname/.xinitrc that contains this text:
#!/bin/sh xscreensaver & . /usr/X11R6/lib/X11/xinit/xinitrc
Then turn off the built-in MacOS screen saver ("Screen Effects" in the system preferences) and configure your preferred xscreensaver settings by running the xscreensaver-demo program.
Limitations:
It is impossible for X11 programs to raise their windows above the system menu bar. So, when xscreensaver makes a full-screen window to run its display modes on, the menubar is still always on top. (Native Aqua/Darwin programs are able to occlude the menubar, but X11 programs are not.)
Setting the Dock to auto-hide helps somewhat.
On MacOS X, xscreensaver cannot be used to lock the screen. This is because it is impossible for X programs to intercept all keystrokes: if xscreensaver were locking the screen, the user would still be able to, for example, use Command-TAB to navigate through the Dock icons and launch other programs such as Terminal. Not to mention "Force Quit."
To decide when it's time to blank the screen, xscreensaver monitors keyboard activity and the mouse position. Unfortunately, it is only able to monitor keyboard activity in other X11 programs. So, if you are typing at another X11 program, xscreensaver will know that the system is active. But, if you are typing at a non-X11 program, and never move the mouse, xscreensaver will think the system is idle, and will blank the screen.
Please see the XScreenSaver FAQ for non-Mac-specific details.
Installation on MacOS X:
And you're done. That will get you a runnable xscreensaver, though probably one that is a few releases out of date. If you want to compile the very latest xscreensaver from source, then you have to install a bunch of other stuff first:
With DarwinPorts:
port install glib2-devel port install gtk2 port install libglade2 port install libxml2 port install jpeg |
With Fink / FinkCommander:
|
|
|
./configure --prefix=/opt/local make sudo make install |
./configure --prefix=/sw --with-gl=/usr/X11R6 make sudo make install |
Launch X11, then run xscreensaver-demo. If you're having trouble, make sure that /sw/bin and/or /opt/local/bin are on your $PATH. The display modes themselves will be in /sw/libexec/xscreensaver/ or /opt/local/libexec/xscreensaver/.