Lcars Screensaver

This article goes over getting the LCARS screensaver by mewho working in Linux. This Screensaver was originally intended for Windows 9x and this is for fun!

Installation and Testing

First download the System47 Screensaver from mewho.com
LCARS Download

Unzip the system47.zip

Create a WINE bottle for the Screensaver to run in from terminal:
WINEARCH=win32 WINEPREFIX=/home/$USER/.lcars winecfg
Change the Windows Version to Windows XP

Run the System47.exe in wine to install the screensaver
WINEPREFIX=~/.lcars wine '~/Downloads/system47 v2.2_setup.exe.exe'
Install the Screen saver and quit

Test the Screensaver in wine
WINEPREFIX=~/.lcars wine '/home/$USER/.lcars/drive_c/windows/system32/System47.scr' /s


Creating Screensaver Service

Creating the screensaver service is done in three sections: service dependencies installation, script creation, and systemd service.

Dependencies to install

Arch-based Installs yay -S xscreensaver xprintidle
Debian-based Installs apt install xscreensaver xprintidle

Script Creation

Create lcars.sh in your home directory (replace titus with your user)

#!/bin/sh

export DISPLAY=:0
# Wanted trigger timeout in milliseconds.
IDLE_TIME=$((5*60*1000))

# Sequence to execute when timeout triggers.
trigger_cmd() {
    WINEPREFIX=/home/titus/.lcars wine '/home/titus/.lcars/drive_c/windows/system32/System47.scr' /s
}

sleep_time=$IDLE_TIME
triggered=false

# ceil() instead of floor()
while sleep $(((sleep_time+999)/1000)); do
    idle=$(xprintidle)
    if [ $idle -ge $IDLE_TIME ]; then
        if ! $triggered; then
            trigger_cmd
            triggered=true
            sleep_time=$IDLE_TIME
        fi
    else
        triggered=false
        # Give 100 ms buffer to avoid frantic loops shortly before triggers.
        sleep_time=$((IDLE_TIME-idle+100))
    fi
done

Service Creation

Create lcars.service (sudo nano /etc/systemd/system/lcars.service) change titus to your user

[Unit]
Description=Screensaver

[Service]
User=titus
Type=simple
ExecStart=/bin/bash /home/titus/lcars.sh

[Install]
WantedBy=multi-user.target
  • Reload service daemon sudo systemctl daemon-reload
  • Start lcars service to test sudo systemctl start lcars
  • Verify service is running sudo systemctl status lcars
  • Enable on startup sudo systemctl enable lcars

Video Walkthrough