How to transfer/import info from .local/share/rhythmbox/rhythmdb.xml into the Flatpak installed version of Rhythmbox and configure it?

When using the Debian installed version of Rhythmbox, I can configure Rhythmbox via dconf-Editor. Also all the radio stations, podcast, music info are stored in .local/share/rhythmbox/rhythmdb.xml.

In the case of a Flatpak installed version of Rhythmbox to user home directory, I noticed that it do not detect any of the radio stations, podcasts, music info that are stored in .local/share/rhythmbox/rhythmdb.xml. I have tried copying .local/share/rhythmbox/rhythmdb.xml into .local/share/flatpak/app/org.gnome.Rhythmbox3/x86_64/stable/xxxxxxxxxxxxxx/files/share/rhythmbox hoping that the past info could be detected by the Flatpak installed version of Rhythmbox. But that did not work either.

How do I transfer/import the info from .local/share/rhythmbox/rhythmdb.xml to the Flatpak installed version of Rhythmbox?

How do I configure the appearance and behavior of the Flatpak installed version of Rhythmbox as it can’t be done via dconf-Editor? For example, the Flatpak Rhythmbox does not pick up the system dark theme; how do I change this?

I am referring to Rhythmbox 3.4.8 in Ubuntu 24.04.3.

I have also tried putting the .local/share/rhythmbox/rhythmdb.xml file into .local/share/flatpak/app/org.gnome.Rhythmbox3/x86_64/stable/xxxxxxxxxxxxxxxxx/files/share/glib-2.0/schemas/ and tried glib-compile-schemas this directory but this did not work either.

The Rhythmbox database is stored under XDG_DATA_HOME, and flatpak overrides that environment variable to point it to an isolated location. That location is:

$HOME/.var/app/org.gnome.Rhythmbox3/data

You can copy the file, but unless the Rhythmbox flatpak has been given access to the same directories where you store your music, the paths inside the file may very well be different or not accessible from within the sandbox.

The dconf database is an implementation detail of how settings are stored. The dconf-editor application reads and writes the user database, which is stored inside your home directory.

Sandboxed applications do not have access to that database; they don’t even use dconf as a backend. This means you can’t use dconf-editor to change settings, and you can’t save/restore settings via dconf.

It seems you’re unfamiliar with how sandboxed applications work. Is there a particular reason why you’re switching from the system installation to a Flatpak?

@ebassi This is very useful to know. There I could locate ~/.var/app/org.gnome.Rhythmbox3/data/rhythmbox/rhythmdb.xml.

The music data base is not so important to duplicate as Rhythmbox has an import function in the source toolbar to do that. However such an import function is not available for radio stations and podcast. As such, now I can just copy & paste those radio stations and podcasts sections in .local/share/rhythmbox/rhythmdb.xml to ~/.var/app/org.gnome.Rhythmbox3/data/rhythmbox/rhythmdb.xml.

Yes I know these. Your reply does not address my question. Simply put, how does someone configure the appearance and behavior of a Flatpak installed Rhythmbox? Could you provide info on this? For example, how do I relocate the toolbar from the top to the bottom GUI? How do I show the enhanced sidebar instead of the traditional sidebar? … etc. Where is its configuration file where I can manipulate it or implement the desired configuration changes?

If I understood you correctly, you can do:

flatpak run --command=/bin/bash reverse.DNS.of.your.app

And then you will be able to modify its gsettings. Sadly I’m not sure whether you can use Dconf Editor there. My small research proved fruitless.

Potentially related: Silverblue: customizing gsettings for flatpak gnome-text-editor - #5 by evanmohr - Fedora Discussion

The features you’re talking about here aren’t configuration settings, they’re added by third party plugins. Once you figure out which ones they are, you might be able to install them in the flatpak filesystem structure.

@jmatthew Thanks.

How do I install the Alternative Toolbar plugin? Its missing from the plugins.

Thanks for the link. I think you hit the jackpot. It looks to be the way. I will try it later. It should not be reverse.DNS.of.your.app but rather the flatpak Application ID of the app, i.e.

flatpak run --command=/bin/bash org.gnome.Rhythmbox3

Thereafter use the usual gsettings set command to amend the value of the respective keys of the schema id.

Flatpak apps use Reverse DNS for their names. It was just a white label

Also, you won’t be able to use dconf editor there, since flatpak GTK apps don’t use dconf, but keyfile database.

This is the appearance of the Debian Rhythmbox GUI which use the system theme and I can configure it:

However, this is the default GUI of the Rhythmbox installed via Flatpak:

As you can see, it’s whiteish-gray while my system is using a Yaru dark theme. hence it is not picking up the system theme.

I discovered $HOME/.var/app/org.gnome.Rhythmbox3/config/glib-2.0/settings/keyfile; it contains all the configuration keys for org.gnome.Rhythmbox3.

I have tried the following:

$ flatpak run --command=sh org.gnome.rhythmbox
error: app/org.gnome.rhythmbox/x86_64/master not installed
$ flatpak run --command=sh org.gnome.rhythmbox3
error: app/org.gnome.rhythmbox3/x86_64/master not installed
$ flatpak run --command=sh org.gnome.Rhythmbox3
[📦 org.gnome.Rhythmbox3 ~]$ gsettings set org.gnome.Rhythmbox3 maximized false
No such schema “org.gnome.Rhythmbox3”
[📦 org.gnome.Rhythmbox3 ~]$ gsettings set org.gnome.Rhythmbox3 queue-as-sidebar true
No such schema “org.gnome.Rhythmbox3”
[📦 org.gnome.Rhythmbox3 ~]$

It shows that the syntax org.gnome.Rhythmbox3 is correct while org.gnome.rhythmbox is incorrect . The strange thing is that $HOME/.var/app/org.gnome.Rhythmbox3/config/glib-2.0/settings/keyfile used org.gnome.rhythmbox instead of org.gnome.Rhythmbox3. Also, the gsettings set org.gnome.Rhythmbox3 commands seems to not work. Strange…

$HOME/.var/app/org.gnome.Rhythmbox3/config/glib-2.0/settings/keyfile shows that the plugin [org/gnome/Rhythmbox3/plugins/alternative_toolbar] is declared.

However, GUI of the Flatpak installed Rhythmbox does not show this. Strange…

How do i resolve these issues?

I have also encountered another issue. I forgot to exit the flatpak run --command=sh org.gnome.Rhythmbox3 command when I uninstalled the Flatpak installed Rhythmbox. Presently, after reinstalling the flatpak version of Rhythmbox using the Software Store, the Rhythmboc icon on the Dock and Application Overview is missing. Also,

$ flatpak list | grep Rhythmbox
Rhythmbox3 translations	org.gnome.Rhythmbox3.Locale		stable	system
$ flatpak run org.gnome.Rhythmbox3.Locale
bwrap: execvp /bin/sh: No such file or directory
$ flatpak run org.gnome.Rhythmbox3
error: app/org.gnome.Rhythmbox3/x86_64/user not installed

How do I resolve this issue?

I solved the last issue by doing

$ flatpak uninstall org.gnome.Rhythmbox3.Locale


        ID                                  Branch         Op
 1. [-] org.gnome.Rhythmbox3.Locale         stable         r

Uninstall complete.
$ rm -rf  ~/.var/app/org.gnome.Rhythmbox3
$ flatpak install flathub org.gnome.Rhythmbox3

In file $HOME/.var/app/org.gnome.Rhythmbox3/config/glib-2.0/settings/keyfile, I have also tried replacing all the [org/gnome/rhythmbox syntax with [org/gnome/Rhythmbox3 and restarted Rhythmbox3 by clicking on its icon. The only difference that I noticed is that instead of having a Rhythmbox with no radio station and music, this time they exist. However, its appearance is still whiteish-gray and it has no Alternative Tool Plugin.

These are its terminal log

$ flatpak run org.gnome.Rhythmbox3
Gtk-Message: 05:54:13.814: Failed to load module "canberra-gtk-module"
Gtk-Message: 05:54:13.814: Failed to load module "canberra-gtk-module"
Traceback (most recent call last):
  File "/app/lib/rhythmbox/plugins/magnatune/magnatune.py", line 94, in do_activate
    self.entry_type = MagnatuneEntryType()
                      ^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/rhythmbox/plugins/magnatune/magnatune.py", line 50, in __init__
    self.account = MagnatuneAccount.instance()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/rhythmbox/plugins/magnatune/MagnatuneAccount.py", line 58, in instance
    __instance = MagnatuneAccount()
                 ^^^^^^^^^^^^^^^^^^
  File "/app/lib/rhythmbox/plugins/magnatune/MagnatuneAccount.py", line 70, in __init__
    self.secret_service = Secret.Service.get_sync(Secret.ServiceFlags.OPEN_SESSION, None)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)

** (org.gnome.Rhythmbox3:2): WARNING **: 05:54:14.010: Could not open device /dev/radio0

(org.gnome.Rhythmbox3:2): Grilo-WARNING **: 05:54:14.098: [dleyna] ../src/dleyna/grl-dleyna-servers-manager.c:165: Unable to connect to the dLeynaRenderer.Manager DBus object: Error calling StartServiceByName for org.gnome.Rhythmbox3.dleyna-server: Process org.gnome.Rhythmbox3.dleyna-server exited with status 1

I don’t think any of these error/warning relates to my question on how to configure the Flatpak installed Rhythmbox.

I just check the source code of the Flatpak installed Rhythmbox for plugins. I did not find the Alternative Toolbar in its plugins directory.

Thanks forr sharing that article. It looks like $HOME/.var/app/org.gnome.Rhythmbox3/config/glib-2.0/settings/keyfile is the way to configure the Flatpak installed Rhythmbox. I belief it is interacting with the compiled gschemas inside of /var/lib/flatpak/app/org.gnome.Rhythmbox3/x86_64/stable/xxxxxxxxxxxxxxxxx/files/share/glib-2.0/schemas. As an experiment, I have cp the org.gnome.rhythmbox.plugins.alternative_toolbar.gschema.xml file fromthe Debian installed Rhythmbox to that directory and ‘glib-compile-schemas’ that directory. Although this plugin now appears in the plugins GUI but it does not work yet as other files relevant are missing.

The directory:

$ ls /usr/lib/rhythmbox/plugins/alternative-toolbar
alternative-toolbar.plugin  alttoolbar_controller.py  alttoolbar_preferences.py  alttoolbar_repeat.py   alttoolbar_type.py    __pycache__
alternative-toolbar.py      alttoolbar_plugins.py     alttoolbar_rb3compat.py    alttoolbar_sidebar.py  alttoolbar_widget.py

was also copied into:
/var/lib/flatpak/app/org.gnome.Rhythmbox3/x86_64/stable/xxxxxxxxxxxxxxxxxxxx/files/lib/rhythmbox/plugins.
But they are still insufficient to show the Alternative Toolbar.

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