Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Working (probably because of python 3.8) #31

Open
debnath-d opened this issue Feb 19, 2020 · 5 comments
Open

Not Working (probably because of python 3.8) #31

debnath-d opened this issue Feb 19, 2020 · 5 comments

Comments

@debnath-d
Copy link

Executing /usr/lib/plasma-hud/plasma-hud gives:

Traceback (most recent call last):
  File "/usr/lib/plasma-hud/plasma-hud", line 664, in <module>
    session_bus = dbus.SessionBus()
  File "/usr/lib/python3.8/site-packages/dbus/_dbus.py", line 212, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/lib/python3.8/site-packages/dbus/_dbus.py", line 102, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python3.8/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
@debnath-d
Copy link
Author

Is it possible to use this with virtualenv/pipenv and for normal user (installing it in user's home directory?)

@Zren
Copy link
Owner

Zren commented Mar 28, 2020

Are you using wayland? I'm using Python 3.8 too in Manjaro (X11) and it works.

$ python --version
Python 3.8.2

@debnath-d
Copy link
Author

I'm not using wayland

@Zren
Copy link
Owner

Zren commented Mar 28, 2020

https://dbus.freedesktop.org/doc/dbus-python/tutorial.html#setting-up-an-event-loop

mentions:

dbus_loop = DBusGMainLoop()
bus = dbus.SessionBus(mainloop=dbus_loop)

which I'm not doing here (I don't really think that's the problem):
https://github.com/Zren/plasma-hud/blob/master/usr/lib/plasma-hud/plasma-hud#L663

There's also this that mentions calling dbus-launch as a subprocess, then retrieving the environment variables from that subprocess.

https://stackoverflow.com/questions/2143785/python-dbus-session-bus-x11-dependency

@Zren
Copy link
Owner

Zren commented Mar 28, 2020

Though if you do manage to "launch a dbus" for that line there (to setup the Alt shortcut), it'll probably also fail when it fetches the menu items here. It might not though.

https://github.com/Zren/plasma-hud/blob/master/usr/lib/plasma-hud/plasma-hud#L456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants