Did you find this article helpful?
Spotify D-Bus issue - cannot send CLI commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find below my detailed information regarding my problem, my desired result, and how to reproduce.
Plan
Premium
Country
The Netherlands
Device
➜ ~ neofetch --stdout larry@gentoo --------------- OS: Gentoo/Linux x86_64 Kernel: 4.17.5-zen Uptime: 1 hour, 36 mins Packages: 1002 Shell: zsh 5.5.1 Resolution: 1920x1080 WM: i3 Theme: Adwaita [GTK2] Icons: Adwaita [GTK2] Terminal: urxvtd Terminal Font: DejaVu Sans Mono CPU: Intel i5-2500K (4) @ 3.301GHz GPU: NVIDIA GeForce GTX 670 GPU: Intel 2nd Generation Core Processor Family Memory: 1523MiB / 15947MiB
Operating System
Gentoo
My Question or Issue
I am no longer able to send commands to Spotify using the command line, similar to https://community.spotify.com/t5/Desktop-Linux/Can-t-control-spotify-via-command-line/m-p/4405636. Note that I built the latest testing ebuild from Gentoo (see https://packages.gentoo.org/packages/media-sound/spotify).
My expectation
I expected to continue to control Spotify by using playerctl which I use to bind my keboard multimedia keys with.
How to reproduce
Verify that Spotify is indeed running:
➜ ~ ps -e | grep spotify 30739 ? 00:02:15 spotify 30742 ? 00:00:00 spotify 30789 ? 00:00:00 spotify 30810 ? 00:01:31 spotify
And then finding out D-Bus doesn't see it:
➜ ~ dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames method return time=1531736077.269027 sender=org.freedesktop.DBus -> destination=:1.7151 serial=3 reply_serial=2 array [ string "org.freedesktop.DBus" string ":1.7" string "org.freedesktop.ReserveDevice1.Audio0" string ":1.60" string ":1.8" string ":1.61" string ":1.9" string ":1.62" string "org.gnome.GConf" string "org.a11y.Bus" string ":1.10" string ":1.57" string "org.mozilla.firefox.ZGVmYXVsdA__" string "org.pulseaudio.Server" string "org.PulseAudio1" string ":1.2" string ":1.3" string ":1.7151" string ":1.4" string ":1.5" string "ca.desrt.dconf" string ":1.6" ]
As a result, playerctl cannot find it:
➜ ~ playerctl -l No players were found
And then trying to toggle play-pause, in vain:
➜ ~ playerctl -p spotify play-pause An error occurred: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files
I'm not exactly sure where the root of this problem exists, but I'm guessing Spotify doesn't fully register itself with D-Bus?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page