and3rson / clay

Awesome standalone command line player for Google Play Music.
GNU General Public License v3.0
157 stars 11 forks source link

Could not import keybinder and Gtk #7

Closed svHatch closed 6 years ago

svHatch commented 6 years ago

Could not import Keybinder and Gtk. Error was: "Namespace Keybinder not available" Global shortcuts will not work.

This fixed it (from http://www.webupd8.org/2013/07/fuzzy-window-switcher-for-ubuntu.html): sudo apt-get install libkeybinder-3.0-0 gir1.2-keybinder-3.0

not sure if this was intended functionality, but it's pretty useless without the keybinder. Maybe this could be added to the requirements?

JPRuehmann commented 6 years ago

https://github.com/and3rson/clay/issues/4

and3rson commented 6 years ago

@svHatch does it fix your issue?

JPRuehmann commented 6 years ago

yes.

svHatch commented 6 years ago

@and3rson - yes it does. My reason for opening the issue was to propose these packages as requirements. I wasn't able to get any functionality without these packages, so I thought they might be appropriate as requirements, rather than simply throwing a warning. I may be misunderstanding the warning.

ValentijnvdBeek commented 6 years ago

The bug is caused by the fact that Clay needs to use the official keybinder Python bindings which use PyGObject. The Keybinder bindings are as far as I can tell only in the distro's package manager and not on PyPy. This means that you need to install that separately and that you need to pass --system-site-packages to virtualenv so it can find it.

This is further complicated by the fact that the PyPy and AUR python3-keybinder packages are not the same bindings as the Ubuntu one. The former is a long gone unofficial version that will not work with Clay while the latter is because Ubuntu separates the bindings.

Pull request #10 should fix the issue.

svHatch commented 6 years ago

@ValentijnvdBeek - understood.

Can Clay be used without a keybinder? If not, then can the installation of the keybinder be part of the Clay install documentation?

ValentijnvdBeek commented 6 years ago

@svHatch

Clay can be used without the Keybinder package but it will show an error. Keybinder makes global X bindings so you can control Clay from another window (or so is my understanding). So it should have no effect if you're using it as solely a terminal program. The use of keybinder should probably be optional and/or configurable so Clay doesn't rely on having X and GTK installed which is a big minus for headless systems.

I don't know why it is is not currently in the installation instructions but I've written some and filed a pull request.

and3rson commented 6 years ago

@svHatch fixed in #10 by @ValentijnvdBeek