jellyfin-mpv-shim
jellyfin-mpv-shim copied to clipboard
Systray still doesn't work in GNOME with Flatpak
Describe the bug The systray icon does not show with MPV Shim running in Flatpak on Gnome.
Screenshots
If socket=session-bus is provided to MPV Shim, it shows the status icon but no image.

Desktop (please complete the following information):
- OS: Linux
- Version 1.8.0
Error Messages
Gtk-Message: 21:39:25.713: Failed to load module "appmenu-gtk-module"
2020-08-20 21:39:25,740 [ DEBUG] PIL.PngImagePlugin: STREAM "b'IHDR'" 16 13
2020-08-20 21:39:25,740 [ DEBUG] PIL.PngImagePlugin: STREAM "b'pHYs'" 41 9
2020-08-20 21:39:25,740 [ DEBUG] PIL.PngImagePlugin: STREAM "b'IDAT'" 62 709
Using --talk-name=org.kde.StatusNotifierWatcher is less broad than --socket=session-bus and accomplishes the same goal.
The quick and dirty workaround for the icon would be to allow /tmp using --filesystem=/tmp, but that seems like quite a broad permission to give for the purpose of an icon so I'll leave that up to you.
I'm looking into PyGObject to see how to provide the icon directly through DBus rather than using a temporary file at all. Such a fix would belong in pystray upstream, so we'll see where this goes. Will update when I learn more (and when I can actually get a grasp on Python).