Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] (workaround found) slideshow in KDE 5 desktop and live_wallpaper  (Read 16241 times)

Offline ayla

  • User
  • Posts: 1.745
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
« Last Edit: 2015/07/18, 11:27:31 by ayla »

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 1.030
Re: slideshow in KDE 5 desktop
« Reply #1 on: 2015/07/15, 12:59:27 »
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

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #2 on: 2015/07/15, 17:23:06 »
... 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:


Code: [Select]
...    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.
« Last Edit: 2015/07/15, 17:42:01 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ayla

  • User
  • Posts: 1.745
Re: slideshow in KDE 5 desktop
« Reply #3 on: 2015/07/15, 17:43:27 »
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.

Code: [Select]
#!/bin/bash

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

greets ayla

EDIT: 
Quote
"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
« Last Edit: 2015/07/15, 18:39:14 by ayla »

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #4 on: 2015/07/15, 20:26:57 »
... 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:


Code: [Select]
[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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ayla

  • User
  • Posts: 1.745
Re: slideshow in KDE 5 desktop
« Reply #5 on: 2015/07/15, 20:33:57 »
I'll try the .desktop file, thanks.

Code: [Select]
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.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #6 on: 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.  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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ayla

  • User
  • Posts: 1.745
Re: slideshow in KDE 5 desktop
« Reply #7 on: 2015/07/15, 20:47:54 »
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.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #8 on: 2015/07/15, 21:32:17 »
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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #9 on: 2015/07/15, 22:09:38 »
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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ayla

  • User
  • Posts: 1.745
Re: slideshow in KDE 5 desktop
« Reply #10 on: 2015/07/15, 22:15:07 »
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 :)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #11 on: 2015/07/15, 22:23:55 »
I think
Code: [Select]
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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #12 on: 2015/07/15, 22:49:15 »
Try this:


Code: [Select]
#!/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.  :)
« Last Edit: 2015/07/15, 22:58:04 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline ayla

  • User
  • Posts: 1.745
Re: slideshow in KDE 5 desktop
« Reply #13 on: 2015/07/15, 23:06:06 »
Try this:


Code: [Select]
#!/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

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.395
    • Land of the Buckeye
Re: slideshow in KDE 5 desktop
« Reply #14 on: 2015/07/15, 23:16:39 »
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, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO