{{Short description|Screensaver software}} {{Use dmy dates|date=July 2021}} {{Infobox software | name = XScreenSaver | author = Jamie Zawinski | developer = Jamie Zawinski | screenshot = Xscreensaver xmatrix.png | caption = XScreenSaver-demo and the XMatrix hack | released = {{Start date and age|1992|08|17|df=yes}} | latest release version = 6.15 | latest release date = {{Start date and age|2026|03|30}}<ref>{{cite web | url = https://www.jwz.org/xscreensaver/changelog.html | title = Changelog | access-date = 7 April 2026}}</ref> | operating system = Unix, macOS, iOS, Android | programming language = ANSI C, X11, OpenGL | genre = Screensaver | license = MIT License<ref>{{cite web | title = Debian XScreenSaver copyright list | date = 24 December 2020 | url = https://metadata.ftp-master.debian.org/changelogs//main/x/xscreensaver/xscreensaver_5.45+dfsg1-1_copyright | access-date = 24 December 2020 }}{{Dead link|date=July 2025 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> | website = {{official URL}} }}
thumb|right|Xscreensaver "GLMatrix" screensaver
'''XScreenSaver''' is a free and open-source collection of 240+<ref name=screenshots>{{cite web | title = List of screen savers included in the XScreenSaver collection | date = 8 December 2020 | url = https://www.jwz.org/xscreensaver/screenshots/ | access-date = 24 December 2020}}</ref> screensavers for Unix, macOS, iOS and Android operating systems. It was created by Jamie Zawinski in 1992, with new releases coming out several times a year.<ref>{{cite web | title = XScreenSaver release history | date = 8 December 2020 | url = https://www.jwz.org/xscreensaver/changelog.html | access-date = 24 December 2020}}</ref>
==Platforms== The free software and open-source Unix-like operating systems running the X Window System (such as Linux and FreeBSD) use XScreenSaver almost exclusively.{{citation needed|date=June 2017}} On those systems, there are several packages: one for the screen-saving and locking framework, and two or more for the display modes, divided somewhat arbitrarily.<ref>{{cite web | title = Debian XScreenSaver package list | date = 24 December 2020 | url = https://packages.debian.org/unstable/x11/xscreensaver | access-date = 24 December 2020}}</ref>
On Macintosh systems, XScreenSaver works with the built-in macOS screen saver. On iOS systems, XScreenSaver is a stand-alone app that can run any of the hacks full-screen. On Android systems, the XScreenSaver display modes work either as normal screen savers (which Android sometimes refers to as "Daydreams") or as live wallpapers.
There is no official version for Microsoft Windows, and the developer discourages anyone from porting it. The author considers Microsoft to be "a company with vicious, predatory, anti-competitive business practices"<ref>{{Cite web | url = https://www.jwz.org/xscreensaver/xscreensaver-windows.html | title = XScreenSaver: Windows Version | website = www.jwz.org | access-date = 24 December 2020}}</ref> and says that, as one of the original authors of Netscape Navigator, he holds a "personal grudge" against Microsoft because of its behavior during the First Browser War.
==Software architecture== The XScreenSaver daemon is responsible for detecting idle-ness, blanking and locking the screen, and launching the display modes. The display modes (termed "hacks" from the historical usage "display hack") are each stand-alone programs.{{cn|date=August 2019}}
This is an important security feature, in that the display modes are sandboxed into a separate process from the screen locking framework. This means that a programming error in one of the graphical display modes cannot compromise the screen locker itself (e.g., a crash in a display mode will not unlock the screen).
It also means that a third-party screen saver can be written in any language or with any graphics library, so long as it is capable of rendering onto an externally provided window.
For historical and portability reasons, the included hacks are all written in ANSI C. About half of them use the X11 API, and about half use the OpenGL 1.3 API.
Rather than cloning the code-base and re-writing the hacks to target different platforms, XScreenSaver contains a number of compatibility layers.
* To allow the X11-based hacks to run natively on macOS and iOS, XScreenSaver contains a complete implementation of the X11 API built on top of Cocoa ("jwxyz").<ref name=jwxyz> {{cite web | title=jwz.org blog post about the iOS port | date = 19 June 2012 | url = https://www.jwz.org/blog/2012/06/i-have-ported-xscreensaver-to-the-iphone/ | access-date = 24 December 2020 }} </ref>
* To allow the OpenGL 1.3-based hacks to run natively on iOS and Android systems, which only support OpenGL ES, XScreenSaver contains an implementation of the OpenGL 1.3 API built on top of OpenGL ES 1.0 ("jwzgles").{{r|jwxyz}} * And to allow the X11-based hacks to run natively on iOS and Android, XScreenSaver also contains an implementation of the X11 API in terms of OpenGL ES 1.0.<ref> {{cite web | title=jwz.org blog post about the Android port | date = 23 May 2016 | url = https://www.jwz.org/blog/2016/05/xscreensaver-5-35/ | access-date = 24 December 2020 }} </ref>
==References== {{Reflist}}
==External links== {{Commons category|XScreenSaver}} *{{Official website}} *{{Freshmeat|xscreensaver|XScreenSaver}}
{{Portal bar|Linux|Free and open-source software}}
Category:Screensavers Category:X Window programs Category:Utility software for macOS