altdesktop / playerctl

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
GNU Lesser General Public License v3.0
2.42k stars 79 forks source link

Doesn't work in herbstluftwm's configs #245

Open EliteGuzhva opened 3 years ago

EliteGuzhva commented 3 years ago

Description Recently I have updated playerctl to the latest version (from 2.0.2) in order to use playerctld daemon. Everything works fine from the command line. Daemon start as a systemd service. When calling playerctl commands from herbstluftwm (v0.9.2) scripts (for keybindings and polybar) I get error-code 127. However playerctl --version (--help) works as expected. Any other command, such as status, play, etc exit with an error.

What I've tried

acrisci commented 3 years ago

I don't believe I can do anything in the code to help this. I think the problem is with how your system is set up.

When calling playerctl commands from herbstluftwm (v0.9.2) scripts (for keybindings and polybar) I get error-code 127

This exit code means the binary is not found or a library dependency is not found. This script might be altering your PATH env variable to find the binary. Try using an absolute path such as /usr/bin/playerctl play to run commands. Try to get stdout to find any error messages.

EliteGuzhva commented 3 years ago

@acrisci The problem is that the binary is in PATH. whereis playerctl returns exactly /usr/bin/playerctl. And I can get the output of playerctl --help or playerctl --version. Right now the workaround is to install the latest version, launch the daemon and then reinstall the old version (v2.0.2). It works correctly with the daemon. Is there maybe a way to install playerctld separately? It fails when I'm trying to launch it with v2.0.2.

EliteGuzhva commented 3 years ago

Note: Old version is installed via apt