luisbocanegra / kde-material-you-colors

Automatic color scheme generator from your wallpaper for KDE Plasma powered by Material You
https://store.kde.org/p/2136963
GNU General Public License v3.0
365 stars 6 forks source link

Port from qdbus to gdbus command #224

Open Pocitanoide opened 1 month ago

Pocitanoide commented 1 month ago

Describe the bug I run kde-material-you-colors and the program can't find qdbus6 in my computer, i already tried setting the executable directory in the configuration file manually, but, at least these options didn't work:

- /snap/qt515-core20/32/opt/qt515/bin/qdbus
- /usr/bin/qdbus
- /usr/lib/qt5/bin/qdbus
- /usr/lib/qt6/bin/qdbus
- /usr/lib/x86_64-linux-gnu/qt5/bin/qdbus

To Reproduce Steps to reproduce the behavior:

kde-material-you-colors

kde-material-you-colors
[D] utils: kill_existing: Found previous process in PID file: '58284' killing...
[D] utils: kill_existing: Process not found, probably ended by someone else
[I] main: main: ###### STARTED NEW SESSION ######
[D] main: main: Installed in /home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors
[D] config: eval_conf: Config "iconslight": empty, using fallback: None
[D] config: eval_conf: Config "iconsdark": empty, using fallback: None
[D] config: eval_conf: Config "on_change_hook": empty, using fallback: None
[D] config: eval_conf: Config "color": empty, using fallback: None
[D] config: eval_conf: Config "custom_colors_list": empty, using fallback: None
[D] config: eval_conf: Config "darker_window_list": empty, using fallback: None
[D] config: eval_conf: Config "qdbus_executable": empty, using fallback: None
[E] kwin_utils: get_desktop_window_id: [Errno 2] No such file or directory: 'qdbus6'
[E] wallpaper_utils: get_desktop_screenshot: [Errno 2] No such file or directory: 'qdbus6'
Traceback (most recent call last):
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 211, in get_desktop_screenshot
    window_handle = kwin_utils.get_desktop_window_id(screen, qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 147, in get_desktop_window_id
    script_id = load_desktop_window_id_script(qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 87, in load_desktop_window_id_script
    result = subprocess.run(command, capture_output=True, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qdbus6'
[E] wallpaper_utils: screenshot: [Errno 2] No such file or directory: 'qdbus6'
Traceback (most recent call last):
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 101, in screenshot
    screenshot_taken = get_desktop_screenshot(
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 211, in get_desktop_screenshot
    window_handle = kwin_utils.get_desktop_window_id(screen, qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 147, in get_desktop_window_id
    script_id = load_desktop_window_id_script(qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 87, in load_desktop_window_id_script
    result = subprocess.run(command, capture_output=True, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qdbus6'
[W] main: main: Screenshot mode enabled, Waiting 900.0s between updates
[E] main: main: Could not get wallpaper [Errno 2] No such file or directory: 'qdbus6'
[D] main: main: {'light': False, 'file': None, 'monitor': 0, 'ncolor': 0, 'iconslight': None, 'iconsdark': None, 'pywal': True, 'pywal_light': False, 'light_blend_multiplier': 1, 'dark_blend_multiplier': 1, 'on_change_hook': None, 'sierra_breeze_buttons_color': False, 'disable_konsole': False, 'titlebar_opacity': 100, 'titlebar_opacity_dark': 100, 'toolbar_opacity': 100, 'toolbar_opacity_dark': 100, 'konsole_opacity': 100, 'konsole_opacity_dark': 100, 'color': None, 'klassy_windeco_outline': False, 'custom_colors_list': None, 'darker_window_list': None, 'use_startup_delay': False, 'startup_delay': 0, 'plasma_follows_scheme': False, 'pywal_follows_scheme': False, 'main_loop_delay': 1.0, 'screenshot_delay': 900.0, 'once_after_change': False, 'pause_mode': False, 'screenshot_only_mode': False, 'scheme_variant': 5, 'chroma_multiplier': 1.1, 'tone_multiplier': 1.0, 'qdbus_executable': None}
[E] kwin_utils: get_desktop_window_id: [Errno 2] No such file or directory: 'qdbus6'
[E] wallpaper_utils: get_desktop_screenshot: [Errno 2] No such file or directory: 'qdbus6'
Traceback (most recent call last):
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 211, in get_desktop_screenshot
    window_handle = kwin_utils.get_desktop_window_id(screen, qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 147, in get_desktop_window_id
    script_id = load_desktop_window_id_script(qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 87, in load_desktop_window_id_script
    result = subprocess.run(command, capture_output=True, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qdbus6'
[E] wallpaper_utils: screenshot: [Errno 2] No such file or directory: 'qdbus6'
Traceback (most recent call last):
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 101, in screenshot
    screenshot_taken = get_desktop_screenshot(
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/wallpaper_utils.py", line 211, in get_desktop_screenshot
    window_handle = kwin_utils.get_desktop_window_id(screen, qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 147, in get_desktop_window_id
    script_id = load_desktop_window_id_script(qdbus_executable)
  File "/home/alejandrof/.local/pipx/venvs/kde-material-you-colors/lib/python3.10/site-packages/kde_material_you_colors/utils/kwin_utils.py", line 87, in load_desktop_window_id_script
    result = subprocess.run(command, capture_output=True, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qdbus6'
[I] main: main: Wallpaper: com.github.catsout.wallpaperEngineKde (screenshot): None
[E] apply_themes: apply: QDbus executable 'qdbus6' wasn't found, there will be errors. Please set the correct one in the configuration

Desktop:

luisbocanegra commented 1 month ago

Does /usr/lib/qt6/bin/qdbus exist in your system?

According to this search https://packages.ubuntu.com/search?mode=exactfilename&suite=jammy&section=all&arch=any&keywords=qdbus&searchon=contents you need qt6-tools-dev-tools package

luisbocanegra commented 1 month ago

I am currently porting away from qdbus command to plain dbus-python + gdbus command (where needed).

Unlike qdbus, gdbus has a standard name/location and should always be on the $PATH so it will fix the problem of having to manually configure it

luisbocanegra commented 1 month ago

Call for testers :)

qdbus executable option has been removed (replaced by gdbus). Everything else should work the same

Pocitanoide commented 1 month ago

Installing qt6-tools-dev-tools worked for me. Thanks a lot!

to replecate the fix: sudo apt install qt6-tools-dev-tools