Documents is launched exclusively through DBus activation in the latest git, thanks to the GApplication service support.

That means there's a service process that acts as an entry point for all the various components of the application - full UI, search provider, notifications in the future - and a launcher process, which just activates the UI from the service using DBus. Those are respectively the "gnome-documents-service" and "gnome-documents" binaries inside src/.

Running inside JHBuild

When running Documents from a JHBuild terminal in a session that doesn't have the application already installed, DBus will not know about the service file in the JHBuild prefix, and running the launcher will fail with a DBus activation error. One way to work around that is to simply copy the service file to the system directory (e.g. /usr/share/dbus-1/services). Another way, and my recommendation, is to sidestep DBus activation of the service entirely and launch it manually instead.

From a JHBuild shell, in the gnome-documents checkout directory, run ./src/gnome-documents-service, and then from another shell run ./src/gnome-documents. The launcher should immediately return, and the UI will appear on screen. Note that all the code is executed in the service, so launching it manually this way is essential for debugging.

Environment variables

The service process supports the following environment variables:

  • DOCUMENTS_RUN_DEBUG=1 will run Documents inside gdb
  • DOCUMENTS_PERSIST=1 will prevent the service to automatically quit after a timeout when no window is open

Apps/Documents/RunningAndDebugging (last edited 2014-03-18 19:21:38 by CosimoCecchi)