Closed Cyb10101 closed 4 years ago
Could this be related to the fact that the source is a PNG formatted image? I believe I have a similar problem with KDE: Support for Plasma works by copying the selected wallpaper to a local folder, and the resulting filename (for example: $HOME/Pictures/variety-wallpaper/variety-copied-wallpaper-cad84ad0c7d66778244130ec1707276e.jpg
) always has a .jpg
suffix even if the source file has a .png
suffix. When Plasma tries to read the wallpaper file it complains:
Not a JPEG file: starts with 0x89 0x50
file:///usr/share/plasma/wallpapers/org.kde.slideshow/contents/ui/main.qml:114:9: QML Image: Error decoding: file:///XXXXX.jpg: Unable to read image data
BTW, my workaround to this problem was to modify the Variety "set wallpaper" script at ~/.config/variety/scripts/set_wallpaper
in the KDE part to do this (instead of the relevant part that it currently does):
EXT=$(file -b --extension "$WP" | cut -d/ -f1)
NEWWP="$(xdg-user-dir PICTURES)/variety-wallpaper/wallpaper-kde-$RANDOM.${EXT}"
cp "$WP" "$NEWWP"
The "change wallpaper" script triggers the gnome background change right at the beginning, but it should be relatively trivial to add the extension detection code and a copy command, similar to how KDE is supported, before the gsettings
call.
@guss77 noob question, but where should I place this line of the script? or do I need to replace some content in set_wallpaper file?
can you just send your config file?
@EvilSpark - the current version I have installed (0.8.3) has a new set_wallpaper
script than the one I was using. The new script uses the Plasma 5 DBUS API to set the wallpaper directly from the "variety-copied-wallpaper" file - without a specific KDE copy. So I had to change my workaround.
The current workaround looks like this (patch against current set_wallpaper
script):
--- /usr/share/variety/scripts/set_wallpaper 2020-02-12 01:48:06.000000000 +0200
+++ /home/odeda/.config/variety/scripts/set_wallpaper 2020-04-17 16:41:25.457876850 +0300
@@ -28,7 +28,9 @@
# In the end put the path to the actual final wallpaper image file in the WP variable.
# The default is to simply set WP=$1.
WP=$1
-
+EXT=$(file -b --extension "$WP" | cut -d/ -f1)
+mv "$WP" "${WP%.*}.${EXT}"
+WP="${WP%.*}.${EXT}"
# Enlightenment
# Needs Modules/System/DBus Extension loaded to work
I don't think this the right thing to do, so I won't submit this as a PR to the project - the problem is in the variety code that assumes that all images are JPEG files and there for should be copied to $(xdg-user-dir PICTURES)/variety-wallpaper/variety-copied-wallpaper-${GUID}.jpg
. The program should check the mime type and create the appropriate extension.
As I was looking at this (and I know a tiny bit of Python - enough to be dangerous ;-) ) I sent a PR with a real fix. Hopefully that will get accepted and we can put the lid on this issue.
Version of Variety: 0.7.1
Describe the bug Images are downloaded which cannot be used for the desktop display. I suspect it will be loaded in a different file format. Since the image type is not supported, a black desktop is displayed.
Context It happens sometimes. Regardless of whether the computer is starting or not.
To Reproduce Randomly. Cannot be repoduced.
Attach Variety's log file Without
variety -v
! I've added -v in case it happens next time.Desktop environment and version Gnome 3.28.2
OS name and version
Screenshots The screen is black. The file is corrupted.
Attached files https://drive.google.com/file/d/17Wc5Mx0LZJ50B3chBm4QWdXk7zhLDMTz/view?usp=sharing
Additional context Part extract of the downloaded file.