tim: "System Status: Degraded" (degraded)
[personal profile] tim
For reasons, I find myself using a Linux machine -- specifically one running Ubuntu Trusty (for all intents and purposes) -- and for other reasons, I wanted my screensaver to display random photos from a folder (specifically a folder of images from posts I liked on Tumblr, but that part is separate).

My computer was set up to use the Cinnamon desktop manager and I didn't want to change that especially (something that I learned when I unintentionally uninstalled it while trying to change the screensaver). In Cinnamon you change the screensaver by going to the system settings and then selecting the Screensaver icon, which presents you with a list of possible screensavers, most of which are from xscreensaver. One option is the GLSlideshow program, which did exactly what I wanted: displays photos from a folder you select.

Only problem is, the System Settings GUI lets you choose GLSlideshow as your screensaver but doesn't have any configuration options that are screensaver-specific. So there's no way in the GUI to select the folder of pictures you want to use.

An easy way to address this problem would be to set Cinnamon's internal screensaver to never trigger and to install xscreensaver. But I wanted to run my screensaver when I clicked on the Lock Screen menu option. I couldn't figure out a way to reconfigure Cinnamon's menu options, so I resolved to find a solution that didn't require me to do that or to disable or circumvent Cinnamon's screensaver.

After some digging, I discovered that you can configure the folder GLSlideshow uses by creating a ~/.xscreensaver file -- this post answers that part of the question.

After I added that dotfile -- oh, and also deleted my ~/.cache directory, which took another 15 or so minutes to figure out (an alternative I tried first, which worked just as well, I think, is to rename the directory with your photos in it, and edit the .xscreensaver file to reflect the new name) -- I had a screensaver that showed random photos from my chosen directory when I locked my screen, but the photo that it chose would stay the same for a long time; I wanted the photos to alternate faster.

edited to add, 2016-05-13: You may also have to delete your ~/.xscreensaver-getimage.cache file, and/or ~/tmp/.xscreensaver-getimage.cache.

After another 15-20 minutes of digging, I found that GLSlideshow has two command-line options, -pan and -duration, that control how long it displays a single photo for. I still don't quite understand the semantics of these flags, but it suffices to set the pan and duration values to the same integer (5 seconds seems reasonable) to get the behavior I want. This is explained in this post.

Okay, but how do I actually pass those flags? GLSlideshow gets invoked by some widget that's part of Cinnamon that I can't change, and which doesn't expose that configuration in the UI? There is a solution that you get when you search for this problem, and it's wrong, or at least, doesn't work with Cinnamon on Trusty.

The solution is a hack: a single command

gsettings set org.cinnamon.desktop.screensaver xscreensaver-hack "glslideshow -pan 5 -duration 5"

to replace the specific xscreensaver module that the Cinnamon screensaver runs (the "xscreensaver hack") with that same module, suffixed by the flags that you want to pass to it. This works, although perhaps it shouldn't. Now I have a screensaver that displays a random photo from my photos folder and changes the photo every 5 seconds! Yay!

But in the meantime -- false starts, accidentally uninstalling Cinnamon (turns out if you use apt to uninstall the Cinnamon screensaver, it helpfully removes all of Cinnamon), and all -- I spent about 2 hours doing something that would take about 3 minutes on a Mac.

How's 2016, the year of the Linux desktop, treating you?

(no subject)

Date: 2016-01-08 11:36 am (UTC)
autumnus: A purple monochrome portrait of Zoe from Dreamfall, with drawn stars in background and "the Dreamer" written on bottom. (Default)
From: [personal profile] autumnus
How did you end up with cinnamon on ubuntu anyway? Doesn't that come with linux Mint normally. Most people use gnome or unity. :) I use ubuntu studio which is while official distro a bit more finicky but then again it is specifically optimized for audio editing, rather than regular end user.

Ubuntu studio xfce and I was able to set it up with no problems without needing any hacks (settings manager - screen saver - chosing the glslideshow)

edit: I actually hit before finishing to post. I do know what you mean but frankly windows 10 isn't much better. (there was a problem, still might be. that ate the start menu so that each time you hit it, windows gives an error and you have to restart. Yes. the start menu) I find ubuntu studio LTS (trusty) ok actually. Ubuntu studio (unlike proper ubuntu) is not entirely end consumer focused (for some reason there is no wacom setup gui, (which ubuntu and kubuntu has for example).
Edited Date: 2016-01-08 11:56 am (UTC)

(no subject)

Date: 2016-01-09 06:31 am (UTC)
From: [personal profile] casimirian
I liked xfce, but then I found some bugs that made it too difficult. I was sad about this until MATE came out. MATE is like xfce but doesn't have the audio and kernel bugs that I experienced. :-)

(no subject)

Date: 2016-01-09 03:31 am (UTC)
jesse_the_k: Cartoon of original Mac with screen displaying the "happy Mac" smile indicating successful boot (old Mac)
From: [personal profile] jesse_the_k
Yeah I tl;dr'd because I change my screen savers whenever I need a wee break (on my Mac).

(no subject)

Date: 2016-01-09 05:51 am (UTC)
bookherd: (Default)
From: [personal profile] bookherd
Not great, TBH. I recently installed Trusty on my new-to-me laptop with less hair-tearing-out than usual, but I haven't been able to make Steam work yet. It also was WAY more difficult than it should've been to disable the startup sound. Still, I'm running a free OS that doesn't force upgrades at a rate designed to make my hardware unusable long before I'm ready to let go of it, and that's a thing I value very highly.

(no subject)

Date: 2016-01-09 06:28 am (UTC)
From: [personal profile] casimirian
I actually can't use Ubuntu on my desktop anymore because of a bug that breaks my graphic card driver. I haven't tested to see if they fixed it, but now I use Debian. Debian works much better. But installing steam takes terminal knowledge. I had to install libraries separately and build my own steam package. O.O

It's some work but worth it in my opinion. I have a solid system that hasn't changed much and provides me with what I think is adequate software updates when necessary.

(no subject)

Date: 2016-01-09 06:34 am (UTC)
From: [personal profile] casimirian
When typing in terminal commands, especially with apt, you need to read the output before you type y. :P

Cinnamon is a pretty spiffy DE. I think it's a bit new yet to be trusted. I had a similar problem once with xfce where I couldn't get the pictures to show up properly. Sometimes a dummy image would appear, and it would look out of place.

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags