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!
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 screensaverWINEPREFIX=~/.lcars wine '~/Downloads/system47 v2.2_setup.exe.exe'
Install the Screen saver and quit
Test the Screensaver in wineWINEPREFIX=~/.lcars wine '/home/$USER/.lcars/drive_c/windows/system32/System47.scr' /s
Creating the screensaver service is done in three sections: service dependencies installation, script creation, and systemd service.
Arch-based Installs yay -S xscreensaver xprintidle
Debian-based Installs apt install xscreensaver xprintidle
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
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
sudo systemctl daemon-reload
sudo systemctl start lcars
sudo systemctl status lcars
sudo systemctl enable lcars