bharadwaj-raju / WeatherDesk

MOVED: https://gitlab.com/bharadwaj-raju/WeatherDesk
https://gitlab.com/bharadwaj-raju/WeatherDesk
GNU General Public License v3.0
217 stars 31 forks source link

Use /dev/shm/somedir or /tmp/somefile for KDE >4 #10

Closed ghost closed 8 years ago

ghost commented 8 years ago

As you may be aware, directly setting a custom wallpaper for KDE isn't really possible at the moment because the api is not exposed for security reasons.

However this can mitigated by asking the user to point kde's desktop slideshow at a designated folder with a smallish timeout (say, 4 seconds). The trick I have found is to have exactly one file with a randomized filename in a folder. On each wallpaper change, generate a new random name and move the new file in with it, and then delete the old file. It will work most of the time because collisions are very rare.

Example here, line 164-173 at https://github.com/cmdrkotori/qt314wall/blob/master/main.cpp#L164

bharadwaj-raju commented 8 years ago

@cmdrkotori I've committed an experimental implementation of what you say. Please test if it works.

Also, is there a way to set the wallpaper plugin to slideshow from the command line?

bharadwaj-raju commented 8 years ago

Also, is /dev/shm normal user-writable?