# HTPC flatpak and Media Keys support

**URL:** https://forums.plex.tv/t/htpc-flatpak-and-media-keys-support/826414
**Category:** Plex Players
**Tags:** plex-htpc
**Created:** [January 11, 2023, 11:10am UTC](https://forums.plex.tv/t/htpc-flatpak-and-media-keys-support/826414 "2023-01-11T11:10:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![plexuser559955](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@plexuser559955](https://forums.plex.tv/u/plexuser559955)
#### Post date: [January 11, 2023, 11:10am UTC](https://forums.plex.tv/t/htpc-flatpak-and-media-keys-support/826414/1 "2023-01-11T11:10:08Z")

</div>

Player Version#: tv.plex.PlexHTPC 1.31.1

When I press the play/pause or forward/back media keys I expect HTPC to recognize this but nothing happens. Instead, a Gnome overlay appears showing it does not recognize any media that needs to be paused/unpaused/skipped/etc. There are no other programs running.

My limited understanding is that gnome & kde both support media keys using mpris and plex htpc doesn’t support this. Though it does use mpv and there is a mpv-mpris plugin here [https://github.com/hoyon/mpv-mpris](https://github.com/hoyon/mpv-mpris). I was actually able to get this running in the flatpak by doing the following:

1. Copy the mpris.so file to ~/.var/app/tv.plex.PlexHTPC/data/plex/
2. Create a file ~/.var/app/tv.plex.PlexHTPC/data/plex/mpv.conf with:

```auto
script=/var/data/plex/mpris.so

```

3. Give the flatpak permission to use org.mpris.MediaPlayer2.mpv.\*:

```auto
$ sudo flatpak override --own-name='org.mpris.MediaPlayer2.mpv.*' tv.plex.PlexHTPC

```

After restarting the flatpak it now recognizes the play/pause button, but it does not react to the forward or back buttons.

Perhaps I need to create a ~/.var/app/tv.plex.PlexHTPC/data/plex/input.conf file with entries for these buttons but I am not sure how that would look.

Has anyone made this work? Media keys support _seems_ like a pretty basic feature and it is a shame it is missing out of the box, at least for the flatpak.

---

<div class="post-metadata">

### Author: ![gbooker02](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gbooker02/32/9726_2.png) [@gbooker02](https://forums.plex.tv/u/gbooker02)
#### Post date: [January 11, 2023, 6:50pm UTC](https://forums.plex.tv/t/htpc-flatpak-and-media-keys-support/826414/2 "2023-01-11T18:50:00Z")

</div>

We need to implement mpris in the app itself. It’s on our list of things to do but I don’t have a time-frame for it.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [April 11, 2023, 6:50pm UTC](https://forums.plex.tv/t/htpc-flatpak-and-media-keys-support/826414/3 "2023-04-11T18:50:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
