Screensaver

Questions about other topics & discussing non-support related topics related to LMDE 3.
Forum rules
Before you post please read how to get help
Post Reply
tlcmd
Level 4
Level 4
Posts: 259
Joined: Sat Jan 30, 2010 4:43 pm

Screensaver

Post by tlcmd » Thu Oct 18, 2018 2:08 pm

I wish to use the folder "pictures" as my screensaver and set the time for each picture to change every 5 - 7 seconds. How do I do this, please?
Thanks.

User avatar
smurphos
Level 8
Level 8
Posts: 2024
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Screensaver

Post by smurphos » Fri Oct 19, 2018 1:24 am

What version of Mint and what Desktop Environment are you using? What screensaver if not the default that came with your version?

If you are unsure just post back the output of this terminal command inxi -Fxz in between [code][/code] tags.

tlcmd
Level 4
Level 4
Posts: 259
Joined: Sat Jan 30, 2010 4:43 pm

Re: Screensaver

Post by tlcmd » Fri Oct 19, 2018 3:50 am

New install of LMDE3 which only has Cinnamon . I am "upgrading from LMDE2 Mate and Cinnamon seems a very different "beastie".

User avatar
smurphos
Level 8
Level 8
Posts: 2024
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Screensaver

Post by smurphos » Sat Oct 20, 2018 1:52 am

Cinnamon is pretty tied to the default cinnamon-screensaver package. Unfortunately there is no out of the box photo slideshow included in LMDE3

You can install some additional screen-saver options that aren't installed by default in LMDE - apt install cinnamon-screensaver-* should pull them in.

This gives you an example webkit screensaver and a variety of xscreensaver options - some of these are photo based - e.g photopile.

You'll need to update the config file ~/.xscreensaver to amend imageDirectory: /home/<user>/Pictures/ if you need to. This file is created when you pick a xscreensaver option in the Screensaver module.

It's shame there aren't more webkit based options - these are html based screensavers which for someone with a reasonable amount of html knowledge it would be easy to make additional modules including a HTML5 photo slideshow - I did start experimenting with this stuff a while back - see viewtopic.php?f=47&t=267393&hilit=webkit, but I'm no html developer so didn't carry on.

The other option is a bit of a cheap hack, but it works. This uses the default cinnamon screenlocker as the screensaver but uses a background script to cycle the desktop wallpaper whilst the screensaver is active. Example script below.

Save into a text file ~/bin/lock_screen_photo_slide_show.sh, make executable. Add a startup command using the Startup Applications to launch it after log-on - give it a delay of about 30 seconds. It will change the lock-screen background to a random .jpg from your pictures folder every 5 seconds - it searches recursively through all sub folders in ~/Pictures as written.

Code: Select all

!/bin/bash

# Script to set a lock screen slideshow for cinnamon's default lockscreen screensaver
# Check for existing instance and exit
for PID in $(pgrep -f "lock_screen_photo_slide_show.sh"); do
    if [ "$PID" != $$ ]; then
        exit 1
    fi  
done
# Background file definitions
DIR="$HOME/Pictures/"
DELAY=5
DESK_BACKGROUND=$(gsettings get org.cinnamon.desktop.background picture-uri)
# Start the main loop to monitor screensaver status
while :
do
	ACTIVE=false
#Screensaver active loop
	while cinnamon-screensaver-command -q | grep -q "The screensaver is active" 
	do
		if ( ! $ACTIVE ) ; then
		DESK_BACKGROUND=$(gsettings get org.cinnamon.desktop.background picture-uri)
		ACTIVE=true
		TIMER="$DELAY"
		fi
		if [ $TIMER == $DELAY  ] ; then
			LOCK_BACKGROUND=$(find "$DIR" -iname '*.jp*g' | shuf -n1)
			gsettings set org.cinnamon.desktop.background picture-uri "file://$LOCK_BACKGROUND"
			TIMER=0
		fi
		((TIMER++))
		sleep 1
	done
#Screensaver inactive loop
	while cinnamon-screensaver-command -q | grep -q "The screensaver is inactive"
	do
		if ( $ACTIVE ) ; then
		gsettings set org.cinnamon.desktop.background picture-uri "$DESK_BACKGROUND"
		ACTIVE=false
		fi
		sleep 1
	done
done

Last edited by smurphos on Sat Nov 03, 2018 2:09 am, edited 1 time in total.

DC5303
Level 1
Level 1
Posts: 1
Joined: Sun Oct 28, 2018 10:58 am

Re: Screensaver

Post by DC5303 » Sun Oct 28, 2018 11:05 am

SCREENSAVER question-- you can find what was formerly in SCREENSAVER in BACKGROUNDS on the settings panel. In backgrounds- set it as slideshow and select pictures- or add whatever you like with the + at the bottom of the screen-- and it's in the "settings" of this page that the customizing of it all is listed.
Works great for me!!

User avatar
smurphos
Level 8
Level 8
Posts: 2024
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Screensaver

Post by smurphos » Sun Oct 28, 2018 11:14 am

That's great if you want the desktop slideshow all the time - but not if you just want the slideshow for the screensaver and a static desktop wallpaper.

Post Reply

Return to “Other Topics & Open Discussion”