| Summary: | How to use dbus-send? | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | Nihin Dula <id1402> |
| Component: | D-Bus interfaces | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | alex.merry, tuomas |
| Priority: | NOR | ||
| Version First Reported In: | 2.9.71 | ||
| Target Milestone: | kf5 | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Nihin Dula
2025-02-23 21:56:22 UTC
An interesting question. Never tried myself before, but I tried exploring with qdbusviewer6. Seems like the correct method nowadays is org.mpris.MediaPlayer2.Player.Play and command line dbus-send --type=method_call --dest=org.kde.amarok /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play seems to work. Other commands seem to be discoverable with qdbusviewer, too. You are very welcome to update any related documentation you find outdated or insufficient. Your command dbus-send --type=method_call --dest=org.kde.amarok /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play works. But I found playerctl. Very simple to use. Used for amarok, vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify, ... Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. https://github.com/altdesktop/playerctl I tested this commands for Amarok: playerctl play-pause playerctl position 0 playerctl stop playerctl previous playerctl next playerctl position 5- playerctl position 5+ Ok, good to hear you found a solution for your usecase. As far as I know, the general mpris interface should indeed work pretty ok (except for the couple of open feature requests for missing functionalities, filed against d-bus interfaces), either by e.g. manually exploring with qdbusviewer6 or using some ready mpris capable tool. |