(workaround found) slideshow in KDE 5 desktop and live_wallpaper

Begonnen von ayla, 2015/07/15, 11:35:32

Vorheriges Thema - Nächstes Thema

ayla

Hi,

first: The "slideshow" on the KDE-desktop is workin. If I use a folder full of jpg images and add it to the slideshow I can view this Images in random order, as is to be expected.

What is not working as before (KDE4) is this case:

I have a script running, "Portal View Live Desktop Wallpaper", which stores me, on a two minute cycle, images from different webcams around the world in the same folder under the same name. Which means this picture "current" changes every two minutes to the current picture of the webcam in turn and the cycle of my slideshow is two minutes also.
So on KDE4 desktop I had fresh pictures from different places of the world comming up periodicaly as background, which, I guess, means that the image to show was loaded every cycle from "current" anew if "current" was the only image in the slideshow folder.

This seems to have changed. The slideshow now stays on the first picture stored in "current.jpg" when startet. The picture displayed on desktop does not change any more, no matter what image "current" has changed to and new images, which weren't in the folder when the slideshow starts, aren't recognized, too. So no possibility to store with consecutive number and delete the one before and get it to run again this way.

So, pity, this renders the slideshow for this case useless.

I guess this is a seldom usecase, so I dont expect a fix.

But if someone would point me to the script or part of code which is resposible, maybe I could try myself.

Greets
ayla

hendrikL

I know it is a bit off topic, but take a look here (have to share what i found  8)  )  , maybe you will also find, by searching , a solution for your little Problem in that forum.
https://www.kubuntuforums.net/showthread.php?67703-Kubuntu-video-wallpaper

dibl

#2
Zitat von: ayla in 2015/07/15, 11:35:32
... images from different webcams around the world in the same folder under the same name. Which means this picture "current" changes every two minutes to the current picture of the webcam in turn and the cycle of my slideshow is two minutes also...


Do you mean that it changed cameras automatically?  Or do you mean that it changed the image from the chosen camera every two minutes?

l had this script working on my prior KDE 4 desktop and now I will try to set it up again on Plasma 5.  But I never saw a way to switch cameras automatically -- that was always a manual task.


EDIT:  The "current.jpg" image is provided by the line in getpic.py that contains the URL of the image:


...    try:
        file = urllib.urlopen('http://images.webcamgalore.com/webcamimages/webcam-012769.jpg')
        im = cStringIO.StringIO(file.read())
...



So, if you wanted the image to come from different cameras, you would have to script the rotation cycle of cameras here.  I suppose you could simply repeat the code section starting below the timer value ... I'll give it a try.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

ayla

#3
Hi dibl,

I changed the "portal view" python script -with help from this forum- lightly. I brought in a loop, some error sequences, and simply multipled the part were the picture gets captured and used another camara in every multipled part.

Here is the script as it is now. The commentet out part was a cam in my home net with secured acces, which I got out of the net somewhere -no idea where any more.

  http://paste.siduction.org/20150715153745

I also let it run two times with to different named folders to display different backgrounds on my two screens and startet this with this script in KDE 4 autostart. This autostart is not working too since KDE 5 and I have to have a look at the why, too.

#!/bin/bash

python /home/cal/Downloads/live_wallpaper/getpic.py & python /home/cal/Downloads/live_wallpaper/getbild.py


greets ayla

EDIT: 
Zitat"I suppose you could simply repeat the code section starting below the timer value"
yep, thats in short what I did.


@hendrikl: That, of course, is interesting too. But then I would need cameras which give me an actual live stream -in very high quality. That I would avoid because for my impression it would be too much traffic generatet for a minor eyecandy. The other way would be to get my jpg's every two minutes, convert them to a two minute avi file or mpeg4 and then display this files. -Would be an interesting workaround :)
But I'm not now gone thrue all the links provided in the side you linked, I will continue there later. Thanks

dibl

Zitat von: ayla in 2015/07/15, 17:43:27
... and startet this with this script in KDE 4 autostart. This autostart is not working too since KDE 5 ...


I am running live-wallpaper automatically by starting with this "live-wallpaper.desktop" script in ~/.config/autostart:


[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/home/don/portalview-start.sh
GenericName[en_US]=
GenericName=
MimeType=
Name[en_US]=live-wallpaper
Name=live-wallpaper
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=don



However, I see the problem that you described.


Checking with gwenview, the "current.jpg" image file is actually changing every 120 seconds, including the camera rotation cycle, but the Plasma 5 desktop remains the same image as when it was first shown after login.


So the problem seems to be that Plasma 5 paints the desktop wallpaper once, for the entire login session.  :(
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

ayla

I'll try the .desktop file, thanks.

So the problem seems to be that Plasma 5 paints the desktop wallpaper once, for the entire login session.

It works if there are multiple images in the folder. But it seems to load this folder just once per session because new or changed files are not displayed when inserted after the start of the slideshow.

dibl

In KDE 4 I never used the KDE "slideshow".  The live-wallpaper script changed the wallpaper every 120 (or whatever) seconds, alone.  I ran that on one side of a 4-sided cube, with other images on the other faces.  We're still waiting for Plasma 5 to offer "different activities" on the virtual desktops.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

ayla

Zitat von: dibl in 2015/07/15, 20:40:25
In KDE 4 I never used the KDE "slideshow".  The live-wallpaper script changed the wallpaper every 120 (or whatever) seconds, alone.

Interresting, that never worked for me, so I thought it's just for providing the images... Will have a look at the original script again.

dibl

Zitat von: ayla in 2015/07/15, 20:47:54
so I thought it's just for providing the images...


Yes, it only pulls in the images and converts them to your "current.jpg" file.  Then your KDE4 plasma desktop wallpaper selection displays it. But the KDE4 desktop wallpaper display apparently updated every time the "current.jpg" file got updated.  I wonder whether there is a .xxxrc file somewhere under ~/.kde that has a refresh value in (or could have a refresh value added to it)?

System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

dibl

The wallpaper is set with ~/.config/plasmarc.  If a shell script could process that every 120 seconds, I think you could change the wallpaper.  But I don't know how that file is processed, or whether you could preserve all other open desktop activities/windows while changing only the wallpaper.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

ayla

Ok, thanks dibl, I 'll try a bit. Was searching the file on the left of this one when receiving the email for your post :)

dibl

I think dbus-launch plasmashell && exit might be part of the solution.  Here I can change the wallpaper after live-wallpaper has pulled in the next image.  So that command needs to be in a scripted loop with a 2-minute timer.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

dibl

#12
Try this:


#!/bin/bash
while true; do
   dbus-launch plasmashell &
   sleep 120
done
#trailing line



Seems to work here.  I'll make a .desktop file in ~/.config/autostart to call it at login.


EDIT:  It "works", but it is very tough on CPU resources.  Hopefully a better way can be discovered by folks smarter than me.  :)
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.

ayla

Zitat von: dibl in 2015/07/15, 22:49:15
Try this:


#!/bin/bash
while true; do
   dbus-launch plasmashell &
   sleep 120
done
#trailing line



Seems to work here.  I'll make a .desktop file in ~/.config/autostart to call it at login.


EDIT:  It "works", but it is very tough on CPU resources.  Hopefully a better way can be discovered by folks smarter than me.  :)

CPU usage raise just a little every two minutes here, thats bearable I would say :)

Works fine here too, thanks a lot.

greets
ayla

dibl

It's beating hard on my CPU here, and it's a core i7.  I must be doing something wrong in calling it from the .desktop file.
System76 Oryx Pro, Intel Core i7-11800H, ASRock B860 Pro-A, Intel Core Ultra 7 265KF, Nvidia GTX-1060, SSD 990 EVO Plus.