Prevent MPRIS from recognizing an application

While it would still be good to know if there is an "MPRIS-managed" solution to this problem, there is a work-around using the settings in Chrome itself.

It seems Chrome is quite aggressive in "taking over" control of media keys/shortcuts. This can be disabled by following these steps, found in a post on the GHacks.net site:

You may disable the Hardware Media Key Handling flag in Chrome currently to prevent Google Chrome from restricting media keys access. Here is how that is done:

  1. Load chrome://flags/#hardware-media-key-handling in the Chrome address bar; this should open the right flag when loaded.
  2. Set the Hardware Media Key Handling flag to Disabled.
  3. Restart Google Chrome.

When I set this toggle on my machine, Chrome offered a "Relaunch" button which restarted the browser with the tabs from the previous/re-started session intact.

This takes care of my issue—with the caveat that if there is an MPRIS "solution" (i.e., use the MPRIS spec to "hide" a potential media-player), I would still like to know. ;)


I have just "discovered" Playerctl (or, on Github). playerctl is a wonderful command line tool that solves some (all?) of OP's problems. From the official "About":

Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. Playerctl makes it easy to bind player actions, such as play and pause, to media keys. You can also get metadata about the playing track such as the artist and title for integration into statusline generators or other command-line tools.

For more advanced users, Playerctl provides an introspectable library available in your favorite scripting language that allows more detailed control like the ability to subscribe to media player events or get metadata such as artist and title for the playing track.

It is a very simple way of using MPRIS controls while targetting particular media players, among much else besides. Worth having as an option in this Q&A, anyway.