The Sun Right Now - Screensaver
30 Aug 2025
•
astronomy
•
software
•
nodejs
•
react
...
In a recent episode of Nyskjerrige Norge, a podcast by the Norwegian Research Council, host Kristoffer Schau meets with professor Mats Carlsson at the Rosseland Centre for Solar Physics, UiO, to discuss the mysteries of our sun. During the show, a particular comment made by Schau caught my interest. There was TV-feed in Carlsson's UiO lunchroom that displayed scientific images of the sun in real-time, and Schau remarked that it would be great if such a feed was available as a personal screensaver. This inspired me, and due to my lifelong interest in space, amateur astrophotography and software development, I decided to build such a screensaver for myself.
In this post, I present The Sun Right Now, my new desktop screensaver that displays 4K images of the sun in a mesmerizing slideshow. What's more, these images are real-time and updates automatically every 5 minutes to ensure only the very latest captures are shown. Below, I share how the app works and how you can use it for yourself.
To download the screensaver, visit my GitHub release page. For a quick preview, check out this online version in the browser.
How it Works
The screensaver is essentially a tiny Nodejs API and Electron application window that runs some React frontend to display images on the screen.

The Nodejs API has one job; to retrieve image filenames from a public NASA repository that holds images from their Solar Dynamics Observatory (SDO). The SDO is a satellite currently in orbit around Earth taking photos and continuous measurements of the sun. Read more about the SDO project on their website. All the scientific data from NASA SDO is publically available and hosted online. This was great news for me because when the images are already hosted, I didn't need to fetch them from some API, I could just retrieve the URLs to the images and load them inside my app.
To get the very latest images, on demand, I took advantage of how NASA organizes their SDO images. The photos are put into a folder structure that represents days, months and years. The image filenames themselves also include the date, time, type, and resolution of the images. You can browse the NASA SDO assets folder I use here. With this in place, I only had to use the current date to find the correct image folder. Then, to get the latest images, I simply fetched all the filenames in the folder and sorted them locally on my node API based on the values in their filenames. Here I filter for 4k images only.
Here is the Node local server in full:
In my React front-end, I call my local Node API first to acquire the initial batch of image filenames and to initalize the image slideshow. To make the filename-fetching recurrent and self-updating, I use the setInterval method in a UseEffect function to schedule API calls at fixed intervals. This happen every 5 minutes in my app, but it's easy to choose another interval simply by editing the second argument of the setInterval method.
To render the sun images on-screen, the filenames are passed one by one to an img HTML element. To handle the "one-by-one" slideshow-part, another setInterval method is used to iterate over the list of filenames and choose a new index automatically every 10 seconds, essentially rotating the image carousell.
Here is the React front-end component in full:
Finally, to host my project inside a nice application window (and not a browser window) I used the Electron library as a wrapper for my React front-end and Node API. Electron provides a lot of boilerplates and tools to manage user input and the compilation of the app into a ready executable.
In my case, not much config was needed with Electron, but I had to be explicit about a few processes to make my app window act like a screensaver. For instance, I had to make sure that it loaded in fullscreen, covering any taskbar or cursor that might be in front, see to it that cursor movements and keyboard presses exited the app, and start the Node API in the correct order. At the very end, I also added some Electron config for switching between development and production mode and edited the package.json with the necessary build settings for both Windows and macOS.
See my full Electron "main.js" here:
How to Use it
To use the screensaver on a Windows machine, first download the latest version for your system from this GitHub release page. Then, right-click on the screensaver file (.scr) and hit "install". Be aware that you may need to approve a few security warnings when first running the screensaver. This is simply because it hosts a tiny server and makes some HTTP requests while running, nothing dangerous.
On OSX, coming soon...
For development, follow the instructions in the GitHub code repository README.