hhannine / superpaper

A cross-platform multi monitor wallpaper manager.
MIT License
1.14k stars 46 forks source link

No wallpaper on one display in KDE plasma 4.x, CentOS 7.8, Python 3.6.8 #64

Closed greensh7 closed 2 years ago

greensh7 commented 4 years ago

Running either the latest AppImage or master version crashes with the same error:

./Superpaper-2.0.2-x86_64.AppImage -s ~/wallpapers/dark/Forever_by_Shady_S.jpg -i 27 -d

/tmp/.mount_Superpnxy7Xh/usr ~/.config/superpaper ~/.config/superpaper/profiles libgcrypt selftest: binary (0): No such file or directory (/tmp/_MEIlzrdJk/.libgcrypt.so.11.hmac) ['~/wallpapers/dark/Forever_by_Shady_S.jpg'] None [27.0] None None None True get_display_data output: NUM_DISPLAYS = 1, RES_ARR = [(1920, 1080)], OFF_ARR = [(0, 0)] Display(resolution=(1920, 1080), digital_offset=(0, 0), phys_size_mm=(598, 336), detected_phys_size_mm=(598, 336), ppi=81.55183946488295, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='DisplayPort-3') Computed PPIs: [81.58915444749253] relative pixel densities: [1.0] ~/wallpapers/dark/Forever_by_Shady_S.jpg Exception in thread Thread-1: Traceback (most recent call last): File "threading.py", line 916, in _bootstrap_inner File "threading.py", line 864, in run File "superpaper/wallpaper_processing.py", line 1163, in span_single_image_advanced AttributeError: 'NoneType' object has no attribute 'get_ppi_norm_crops'

The GUI and tool popup seems to work fine, allowing saving profiles, and shows the preview wallpaper. But clicking Apply doesn't display the wallpaper.

hhannine commented 4 years ago

Would you mind running it in the GUI mode with debugging ./Superpaper-2.0.2-x86_64.AppImage -d and post the output when you it fails? It seems that the command line mode is omitting some essential debug messages.

Also I noticed that you're using the advanced mode with a single display, which doesn't do anything. Does it work in the simple span mode? Or does it work if you just run ./Superpaper-2.0.2-x86_64.AppImage -s ~/wallpapers/dark/Forever_by_Shady_S.jpg ?

greensh7 commented 4 years ago

Thanks much for the quick reply! Looks like new errors with this command:

./Superpaper-2.0.2-x86_64.AppImage -d -s ~/wallpapers/dark/Forever_by_Shady_S.jpg /tmp/.mount_SuperpZHqD10/usr ~/.config/superpaper ~/.config/superpaper/profiles libgcrypt selftest: binary (0): No such file or directory (/tmp/_MEIjReIz1/.libgcrypt.so.11.hmac) ['~/wallpapers/dark/Forever_by_Shady_S.jpg'] None None None None None True get_display_data output: NUM_DISPLAYS = 1, RES_ARR = [(1920, 1080)], OFF_ARR = [(0, 0)] Display(resolution=(1920, 1080), digital_offset=(0, 0), phys_size_mm=(598, 336), detected_phys_size_mm=(598, 336), ppi=81.55183946488295, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='DisplayPort-3') ~/wallpapers/dark/Forever_by_Shady_S.jpg Canvas size: [1920, 1080] file:///~/.cache/superpaper/temp/cli-b.png DESKTOP_SESSION is: '1-kde-plasma-standard' Exception in thread Thread-1: Traceback (most recent call last): File "dbus/bus.py", line 177, in activate_name_owner File "dbus/bus.py", line 363, in get_name_owner File "dbus/connection.py", line 653, in call_blocking dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.kde.plasmashell': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "threading.py", line 916, in _bootstrap_inner File "threading.py", line 864, in run File "superpaper/wallpaper_processing.py", line 1136, in span_single_image_simple File "superpaper/wallpaper_processing.py", line 1302, in set_wallpaper File "superpaper/wallpaper_processing.py", line 1376, in set_wallpaper_linux File "superpaper/wallpaper_processing.py", line 1561, in kdeplasma_actions File "dbus/bus.py", line 243, in get_object File "dbus/proxies.py", line 250, in init File "dbus/bus.py", line 182, in activate_name_owner File "dbus/bus.py", line 280, in start_service_by_name File "dbus/connection.py", line 653, in call_blocking dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.plasmashell was not provided by any .service files

greensh7 commented 4 years ago

Here's the gui mode debug output:

./Superpaper-2.0.2-x86_64.AppImage -d

get_display_data output: NUM_DISPLAYS = 1, RES_ARR = [(1920, 1080)], OFF_ARR = [(0, 0)] Display(resolution=(1920, 1080), digital_offset=(0, 0), phys_size_mm=(598, 336), detected_phys_size_mm=(598, 336), ppi=81.55183946488295, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='DisplayPort-3') load_system: archive_file not found: ~/.config/superpaper/display_systems.dat running profile job with profile: span Running wallpaper slideshow. ~/wallpapers/clouds trees field of grass beautiful_4293x2522.jpg Wrote active profile: span Canvas size: [1920, 1080] file:///~/.cache/superpaper/temp/span-b.png DESKTOP_SESSION is: '1-kde-plasma-standard' Exception in thread Thread-4: Traceback (most recent call last): File "dbus/bus.py", line 177, in activate_name_owner File "dbus/bus.py", line 363, in get_name_owner File "dbus/connection.py", line 653, in call_blocking dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.kde.plasmashell': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "threading.py", line 916, in _bootstrap_inner File "threading.py", line 864, in run File "superpaper/wallpaper_processing.py", line 1136, in span_single_image_simple File "superpaper/wallpaper_processing.py", line 1302, in set_wallpaper File "superpaper/wallpaper_processing.py", line 1376, in set_wallpaper_linux File "superpaper/wallpaper_processing.py", line 1561, in kdeplasma_actions File "dbus/bus.py", line 243, in get_object File "dbus/proxies.py", line 250, in init File "dbus/bus.py", line 182, in activate_name_owner File "dbus/bus.py", line 280, in start_service_by_name File "dbus/connection.py", line 653, in call_blocking dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.plasmashell was not provided by any .service files

hhannine commented 4 years ago

Ok I only now noticed that you're running KDE 4.x which I haven't built support for. That explains the dbus errors that come up in the KDE 5 interfacing code. Unfortunately this isn't a quick thing to implement, I'll need to research how it works on KDE 4.

greensh7 commented 4 years ago

Ok, thanks in advance for the R&D on the KDE 4.x incompatibilities. This is a highly valued utility from my team's perspective and we'll provide any info you need from this OS's configuration. Thanks again!

hhannine commented 4 years ago

Would you happen to know how to control the wallpaper on KDE 4 from the terminal / with DBUS? It's a bit hard to find old posts or docs specific to 4.x.

greensh7 commented 4 years ago

No, but a quick search provided some useful info perhaps in the comments here: https://peterlevi.com/variety/2014/05/variety-and-kde/ seems to indicate this workaround may be the only way for KDE < 5.5.5.

hhannine commented 4 years ago

Those workarounds unfortunately don't provide the power to control the wallpapers on each display separately which is necessary for both multi image and spanning image. From my searching it would seem that KDE 4 has the same structure as KDE 5 in the sense that each display has their separate activity that have separate wallpapers. I would need a way to control each of these to implement support.

hhannine commented 4 years ago

Based on the issues linked on the Variety compatibility page KDE4 support is looking pretty bleak, if not altogether impossible..

Would you test this script found here on this page

#!/bin/sh
js=$(mktemp)
cat > $js <<_EOF
var wallpaper = "$1";
var activity = activities()[0];
activity.currentConfigGroup = new Array("Wallpaper", "image");
activity.writeConfig("wallpaper", "/usr/share/wallpapers/myimage.jpg");
activity.reloadConfig();
_EOF
qdbus org.kde.plasma-desktop /App local.PlasmaApp.loadScriptInInteractiveConsole "$js" > /dev/null
xdotool search --name "Desktop Shell Scripting Console - Plasma Desktop Shell" windowactivate key ctrl+e key ctrl+w
rm -f "$js"

If you modify it to have a valid image does it work for you? Can you test what it does if you have at least 2 monitors?

greensh7 commented 4 years ago

Works perfectly on one monitor, and about to test on a dual display system :o) The only problem (so far) was the missing "xdotool" dependency. Also note, the script didn't launch from the konsole terminal, which was confusing; instead it launches an editor where "Execute" must be chosen.

greensh7 commented 4 years ago

The 2nd system with dual displays fails with either or both monitors connected. It fails by not changing the wallpaper. I'm trying to figure out if this one's configuration is different than the 1st. The 1st system with single display still works fine and changes the wallpaper, when the Desktop Settings Wallpaper is set to "Image". The only difference I've found so far, is that the 2nd is driving a dual display from one NVidia card and has no xorg.conf. 1st is using the AMD kernel driver with single display.

hhannine commented 4 years ago

Thanks for testing it.

Regarding the xdotool dependency, it's there as a hack to press the 'Execute' button programmatically. Not clean but I have found no other possible method that could work.

Ok I've no idea why it fails on your second system. Doesn't sound good that it is failing there even with a single monitor connected.

hhannine commented 2 years ago

Closing this as I am not aware of any reliable method to implement this, and KDE 4 has been deprecated.