pashazz / ksetwallpaper

Set Plasma 5 wallpaper from command line
GNU General Public License v3.0
43 stars 12 forks source link

Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead #9

Open gmankab opened 2 years ago

gmankab commented 2 years ago

hello, i'm getting this error

[gmn@arch ~]$ sudo python Desktop/ksetwallpaper.py -f Desktop/wp.png
[sudo] password for gmn: 
Traceback (most recent call last):
  File "/home/gmn/Desktop/ksetwallpaper.py", line 100, in <module>
    setwallpaper(filepath=args.file, plugin=args.plugin)
  File "/home/gmn/Desktop/ksetwallpaper.py", line 26, in setwallpaper
    bus = dbus.SessionBus()
  File "/usr/lib/python3.10/site-packages/dbus/_dbus.py", line 212, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/lib/python3.10/site-packages/dbus/_dbus.py", line 102, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 124, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

os: newly installed arch KDE Plasma Theme Edition (Flagship) from https://archlinuxgui.in

gmankab commented 2 years ago

after running dbus-launch there is a new issue:

[gmn@arch Desktop]$ python ksetwallpaper.py -f wp.png
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.10/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
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 "/home/gmn/Desktop/ksetwallpaper.py", line 100, in <module>
    setwallpaper(filepath=args.file, plugin=args.plugin)
  File "/home/gmn/Desktop/ksetwallpaper.py", line 27, in setwallpaper
    plasma = dbus.Interface(bus.get_object(
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3.10/site-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3.10/site-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3.10/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.plasmashell was not provided by any .service files