I often have my audio player (usually Audacious v. 3.9) running while the Chrome browser is also running. If I open a video in Chrome, it seems to "claim" MPRIS controls from the audio player. The only way to get my shortcut keys to control Audacious is to close Chrome.
There must be a way of preventing MPRIS from recognizing Chrome as a "media player". I assume the problem is that one (or both) of these apps is not "claiming" MPRIS functions properly. According to the man page, this relates to an
If unset or set to
*, mpris-remote will communicate with the first player it finds registered under "
org.mpris.*" through D-BUS. If you only have one MPRIS-compliant player running, then this will be fine. If you have more than one running, you will want to set this variable to the name of the player you want to connect to. For example, if set to
foo, it will try to communicate with the player at "
org.mpris.foo" and will fail if nothing exists at that name.
My problem is that I don't know how to set this variable. I've looked in the D-bus editor for something corresponding to this (on the analogy in an answer about media-players in the tray), but there is no relevant setting there that I can spot.
Meanwhile, I have discovered this:
$ qdbus org.mpris.* org.mpris.MediaPlayer2.audacious org.mpris.MediaPlayer2.chrome.instance13448
So it seems Audacious does have its "own" MPRIS identity, so how can I prevent Chrome from being recognized as a "media player" for MPRIS purposes? Any help with setting that up would be greatly appreciated.
P.s. I'm on Ubuntu 18.04 LTS.