Description
- HowDoI/DBusApplicationLaunching – GNOME Wiki Archive
- D-Bus activation from desktop files
- D-Bus Activation | Desktop Entry Specification
- e.g. supported by Rofi: [DRun] If indicated by .desktop file, launch via dbus activation. · davatorium/rofi@b955b9a
Many applications (particularly in GNOME) are following the pattern
lately that there is only ever one instance of the application running.
This was done back in the day with things like libunique, but we grew
some more advanced ways of doing this lately (like GApplication).When the second instance of the application gets started (by running the
executable) then the second instance notices that there is already a
first copy running. It then sends a D-Bus message to that first
instance saying "please open a new window" (or whatever) and exits.The idea here is to avoid having to fork()/exec() and fully dynamic-link
this second copy of the process in order to send a D-Bus message and
immediately exit when (most probably) the process doing the launching is
already on D-Bus to begin with and perfectly capable of sending the
message for itself.
So if qutebrowser supported this, and people use a compatible launcher (e.g. Rofi and maybe xdg-open too?), the often cited "launching a second qutebrowser instance is too slow" issue would vanish without the hacks people often have with wrapper scripts and such.