Add a compile option to rename the Xfconf service
When I wanted to package Ristretto in Flatpak format as I had done for Mousepad, I came across the difficulty that Ristretto depends on Xfconf (like probably all Xfce applications except Mousepad), with which it must communicate via D-Bus.
We are then faced with the following alternative (I don't see any other possibility):
- either we consider the existence of an Xfconf service outside the flatpak as a prerequisite, and we communicate with it via the APIs of the Xfconf dependency embedded in the flatpak;
- or we use this dependency both on the client and on the server side, by exposing our own Xfconf service for and from the flatpak.
The first solution is in my opinion not a solution, because it is totally contrary to the flatpak philosophy:
- we depend on an external service, especially for something as essential as configuration data;
- this data is stored externally, and shared with the classic version of the application.
So the second solution seems to me to be the right one, but it can only work decently if the Xfconf service of the flatpak is renamed in a unique way, so that there is no possible confusion neither with the Xfconf service of an Xfce session, nor with that of another Xfce application packaged in Flatpak.
I implemented this in a patch added to the Flatpak manifest for Ristretto, renaming org.xfce.Xfconf
to org.xfce.ristretto.Xfconf
. This works fine, but I'm not sure if it's accepted on Flathub (they don't like patches), and it would be better if this renaming was possible via a build option anyway. You would then just have to add something like
modules:
- name: xfconf
config-opts:
- --rename-service=org.xfce.ristretto.Xfconf
to the manifest.
All this unless, of course, there is a much simpler solution that I haven't seen, which is quite possible :).