[GH-ISSUE #3822] rhythmbox: media keys do not work #2407

Open
opened 2026-05-05 09:05:07 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @reinerh on GitHub (Dec 15, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3822

Someone reported at #977455 that meda keys (play, pause, next, ...) are not working when using Rhythmbox in firejail. He assumes that it might be related to dbus filtering.
Does someone know how this could be debugged, or is even able to reproduce it?

Originally created by @reinerh on GitHub (Dec 15, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3822 Someone reported at [#977455](https://bugs.debian.org/977455) that meda keys (play, pause, next, ...) are not working when using Rhythmbox in firejail. He assumes that it might be related to dbus filtering. Does someone know how this could be debugged, or is even able to reproduce it?
Author
Owner

@rusty-snake commented on GitHub (Dec 15, 2020):

Works for me.

Rhythmbox: 3.4.4
OS: Fedora-32
GNOME: 3.36.8
rhythmbox.local:

include deny-python2.inc
include deny-python3.inc

mkdir ${HOME}/.local/share/rhythmbox
whitelist ${HOME}/.local/share/rhythmbox
include whitelist-common.inc

dbus-system none

We have org.mpris.MediaPlayer2.rhythmbox, org.gnome.UPnP.MediaServer2.Rhythmbox and org.gnome.SettingsDaemon.MediaKeys in the profile.

$ flatpak remote-info --system flathub -m  org.gnome.Rhythmbox3
[Application]
name=org.gnome.Rhythmbox3
runtime=org.gnome.Platform/x86_64/3.38
sdk=org.gnome.Sdk/x86_64/3.38
command=rhythmbox

[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;fallback-x11;
devices=dri;
filesystems=xdg-run/dconf;xdg-music;~/.config/dconf:ro;

[Session Bus Policy]
org.mpris.MediaPlayer2.rhythmbox=own
org.gnome.UPnP.MediaServer2.Rhythmbox=own
org.gtk.vfs.*=talk
org.gnome.SettingsDaemon.MediaKeys=talk
org.freedesktop.Notifications=talk
org.gtk.vfs=talk
ca.desrt.dconf=talk

[System Bus Policy]
org.freedesktop.Avahi=talk

[Environment]
GIO_USE_VOLUME_MONITOR=unix
DCONF_USER_CONFIG_DIR=.config/dconf

If D-Bus is the problem, firejail --ignore="dbus-user filter" rhythmbox should work.

Other guesses:

  • the DE or an other program catches the keys or is preferred (but the it shouldn't w/o firejail either). (Which DE?)
  • forgotten locals or globals
  • MPRIS is implemented via plugin. Maybe firejail blocks loading,enabling,executing,... of it.

EDIT: D-Bus errors are usually printed to the terminal (GTK just says failed, while KDE also says what failed). (AT-SPI is expected to fail).

<!-- gh-comment-id:745305100 --> @rusty-snake commented on GitHub (Dec 15, 2020): Works for me. Rhythmbox: 3.4.4 OS: Fedora-32 GNOME: 3.36.8 rhythmbox.local: ``` include deny-python2.inc include deny-python3.inc mkdir ${HOME}/.local/share/rhythmbox whitelist ${HOME}/.local/share/rhythmbox include whitelist-common.inc dbus-system none ``` We have `org.mpris.MediaPlayer2.rhythmbox`, `org.gnome.UPnP.MediaServer2.Rhythmbox` and `org.gnome.SettingsDaemon.MediaKeys` in the profile. ``` $ flatpak remote-info --system flathub -m org.gnome.Rhythmbox3 [Application] name=org.gnome.Rhythmbox3 runtime=org.gnome.Platform/x86_64/3.38 sdk=org.gnome.Sdk/x86_64/3.38 command=rhythmbox [Context] shared=network;ipc; sockets=x11;wayland;pulseaudio;fallback-x11; devices=dri; filesystems=xdg-run/dconf;xdg-music;~/.config/dconf:ro; [Session Bus Policy] org.mpris.MediaPlayer2.rhythmbox=own org.gnome.UPnP.MediaServer2.Rhythmbox=own org.gtk.vfs.*=talk org.gnome.SettingsDaemon.MediaKeys=talk org.freedesktop.Notifications=talk org.gtk.vfs=talk ca.desrt.dconf=talk [System Bus Policy] org.freedesktop.Avahi=talk [Environment] GIO_USE_VOLUME_MONITOR=unix DCONF_USER_CONFIG_DIR=.config/dconf ``` If D-Bus is the problem, `firejail --ignore="dbus-user filter" rhythmbox` should work. Other guesses: - the DE or an other program catches the keys or is preferred (but the it shouldn't w/o firejail either). (Which DE?) - forgotten locals or globals - MPRIS is implemented via plugin. Maybe firejail blocks loading,enabling,executing,... of it. **EDIT:** D-Bus errors are usually printed to the terminal (GTK just says failed, while KDE also says what failed). (AT-SPI is expected to fail).
Author
Owner

@eighthave commented on GitHub (Jan 12, 2021):

  • Debian/buster/amd64
  • GNOME 3.30.1-2
  • rhythmbox 3.4.3-2
  • no rhythmbox.local

Media keys seem to work after reboot for a while. I think what breaks it is if another app steals the media key. For example, if Chromium is playing a YouTube video, the media key are sent to that instead of Rhythmbox. After that happens, Rhythmbox cannot receive them again. Running with firejail --ignore="dbus-user filter" rhythmbox did fix the media keys in this state.

Some more debug info:

 ~ $ dpkg -l firejail*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version          Architecture Description
+++-=================-================-============-===============================================
ii  firejail          0.9.64-1~bpo10+1 amd64        sandbox to restrict the application environment
ii  firejail-profiles 0.9.64-1~bpo10+1 all          profiles for the firejail application sandbox
 ~ $ 
 ~ $ export |grep -e LC_ -e LANG
declare -x GDM_LANG="en_US.UTF-8"
declare -x LANG="en_US.UTF-8"
declare -x LC_MEASUREMENT="de_AT.UTF-8"
declare -x LC_MONETARY="de_AT.UTF-8"
declare -x LC_NUMERIC="de_AT.UTF-8"
declare -x LC_PAPER="de_AT.UTF-8"
declare -x LC_TIME="de_AT.UTF-8"
  • firejail rhythmbox crashes with a massive amount of these messages:
(rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library/genre: The connection is closed

(rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to send property changes for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library: The connection is closed

(rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library/all: The connection is closed

(rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to send property changes for MediaServer2 container /org/gnome/UPnP/MediaServer2/Playlists/94922477141136: The connection is closed

(rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Playlists/94922477141136: The connection is closed
  • /usr/bin/rhythmbox works
  • firejail --ignore="dbus-user filter" rhythmbox works
  • firejail rhythmbox --disable-plugins works, but without media keys (provided by MPRIS plugins)
<!-- gh-comment-id:758671433 --> @eighthave commented on GitHub (Jan 12, 2021): * Debian/buster/amd64 * GNOME 3.30.1-2 * rhythmbox 3.4.3-2 * no _rhythmbox.local_ Media keys seem to work after reboot for a while. I think what breaks it is if another app steals the media key. For example, if Chromium is playing a YouTube video, the media key are sent to that instead of Rhythmbox. After that happens, Rhythmbox cannot receive them again. Running with `firejail --ignore="dbus-user filter" rhythmbox` did fix the media keys in this state. Some more debug info: ```console ~ $ dpkg -l firejail* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=================-================-============-=============================================== ii firejail 0.9.64-1~bpo10+1 amd64 sandbox to restrict the application environment ii firejail-profiles 0.9.64-1~bpo10+1 all profiles for the firejail application sandbox ~ $ ~ $ export |grep -e LC_ -e LANG declare -x GDM_LANG="en_US.UTF-8" declare -x LANG="en_US.UTF-8" declare -x LC_MEASUREMENT="de_AT.UTF-8" declare -x LC_MONETARY="de_AT.UTF-8" declare -x LC_NUMERIC="de_AT.UTF-8" declare -x LC_PAPER="de_AT.UTF-8" declare -x LC_TIME="de_AT.UTF-8" ``` * `firejail rhythmbox` crashes with a massive amount of these messages: ``` (rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library/genre: The connection is closed (rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to send property changes for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library: The connection is closed (rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Library/all: The connection is closed (rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to send property changes for MediaServer2 container /org/gnome/UPnP/MediaServer2/Playlists/94922477141136: The connection is closed (rhythmbox:5): Rhythmbox-WARNING **: 14:55:03.025: Unable to emit Updated signal for MediaServer2 container /org/gnome/UPnP/MediaServer2/Playlists/94922477141136: The connection is closed ``` * `/usr/bin/rhythmbox` works * `firejail --ignore="dbus-user filter" rhythmbox` works * `firejail rhythmbox --disable-plugins` works, but without media keys (provided by MPRIS plugins)
Author
Owner

@rusty-snake commented on GitHub (May 12, 2021):

Any progress here?

<!-- gh-comment-id:839995183 --> @rusty-snake commented on GitHub (May 12, 2021): Any progress here?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2407
No description provided.