aui::detail::single_instance::dbus::Handle#
GApplication (D-Bus, org.freedesktop.Application) backend of ASingleInstance for Linux.
| Header: | #include <AUI/Platform/linux/ASingleInstanceDBus.h> |
| CMake: | aui_link(my_target PUBLIC aui::core) |
Detailed Description#
Thin wrapper over GApplication (HANDLES_COMMAND_LINE | SEND_ENVIRONMENT) loaded dynamically from libgio-2.0.so.0.
GApplication owns the session bus name equal to the application id, exports org.freedesktop.Application and
forwards command line, working directory and environment (XDG_ACTIVATION_TOKEN) of secondary instances to the
primary one. Works across sandboxes (Flatpak, Snap). GTK is not required.
Unavailable (Outcome::available == false) if GIO can't be loaded, the key is not a valid application id or the session bus is not reachable. In this case ASingleInstance falls back to flock + unix socket.