You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that, when using Meson to install a GNOME app to $HOME/.local, it is possible for .service files not to be picked up by D-Bus, so that one cannot launch the application from the GNOME dash until the D-Bus configuration is reloaded. There is a simple command to fix it, and I wondered whether this would be appropriate to add to Meson's gnome.post_install(), alongside the existing options for rebuilding the icon cache, compiling schemas, etc. It seems like it would be at home there.
I'm working on an app called Mending Wall. Using the following sequence:
meson setup build --prefix=$HOME/.local
cd build
meson compile
meson install
Everything is installed correctly of course: *.desktop files to $HOME/.local/share/applications, *.xml GSettings schemas to $HOME/.local/share/glib-2.0/schemas and *.service D-Bus service files to $HOME/.local/share/dbus-1/services.
However, in the specific circumstance that the $HOME/.local/share/dbus-1/services directory did not exist before the install, D-Bus will not pick up the new service files, as it could not establish a monitor on the non-existent directory when it started (related Flatpak issue here: flatpak/flatpak#3342). So, for example, if you try to launch the app from the GNOME dash, nothing happens. You can see why if you try to launch it via D-Bus from the command line:
gdbus call --session --dest org.indii.mendingwall --object-path /org/indii/mendingwall --method org.freedesktop.DBus.StartServiceByName '{}'
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
That's already doing a lot of post install stuff in the same vein: compiling schemas, updating icon cache, updating desktop database, etc. I wondered whether it's worth adding a Boolean flag that would result in reloading the D-Bus config as well? It could just run the above command when enabled.
The text was updated successfully, but these errors were encountered:
I noticed that, when using Meson to install a GNOME app to
$HOME/.local
, it is possible for.service
files not to be picked up by D-Bus, so that one cannot launch the application from the GNOME dash until the D-Bus configuration is reloaded. There is a simple command to fix it, and I wondered whether this would be appropriate to add to Meson'sgnome.post_install()
, alongside the existing options for rebuilding the icon cache, compiling schemas, etc. It seems like it would be at home there.I'm working on an app called Mending Wall. Using the following sequence:
Everything is installed correctly of course:
*.desktop
files to$HOME/.local/share/applications
,*.xml
GSettings schemas to$HOME/.local/share/glib-2.0/schemas
and*.service
D-Bus service files to$HOME/.local/share/dbus-1/services
.However, in the specific circumstance that the
$HOME/.local/share/dbus-1/services
directory did not exist before the install, D-Bus will not pick up the new service files, as it could not establish a monitor on the non-existent directory when it started (related Flatpak issue here: flatpak/flatpak#3342). So, for example, if you try to launch the app from the GNOME dash, nothing happens. You can see why if you try to launch it via D-Bus from the command line:The fix is to reload the D-Bus config:
Now everything works. You can possibly log out and in again too, although this command fixes it immediately.
The app in question has this at the end of its
meson.build
:That's already doing a lot of post install stuff in the same vein: compiling schemas, updating icon cache, updating desktop database, etc. I wondered whether it's worth adding a Boolean flag that would result in reloading the D-Bus config as well? It could just run the above command when enabled.
The text was updated successfully, but these errors were encountered: