Currently appfinder cannot be started over DBus (there is no .service file for it). Adding such file manually works but then the first call to appfinder in addition to starting the service opens a window. This is problematic because the first call is most likely to the OpenWindow method. In this case the user gets 2 (instead of 1) windows open - one produced by starting the service, another by calling the OpenWindow mmethod. A suggested solution is adding a --daemon option to the appfinder, which prevent it from opening a window at startup, and using it in the .service file.
Created attachment 4230 A patch implementing this feature --daemon takes precedence over --disable-server --daemon takes precedence over the new /enable-service property (we probably don't want the DBus proxy to disappear after closing the last window, service can be closed explicitly with Quit) There is no model pre-caching at start-up (it is postponed until the first window is open). Model cache is kept until the service exits (even if there are no windows visible).
Do you have anything in mind that will use appfinder over dbus? Because else this will only cause problems.
Yes, the panel plugin (this time doing it much simpler - just asking Appfinder to open/close the window), but I assumed that since DBus API is already there someone else may try to use it as well. What are the problems you expect?
Applications launched from dbus have another environment, this means we need to send the user env over dbus and supply that with the spawn function.
That's a problem indeed. If you are interested in these features I can fix it (I see that xfrun is already doing something similar, and thunar does it for cwd).
I don't see a big advantage of a toggle button that shows, hides the window. The env will be a window property in that case, that is easy to implement and not a bad idea. But we shouldn't make this overly complicated.
(In reply to comment #6) > I don't see a big advantage of a toggle button that shows, hides the window. Agreed, that is not very useful. A regular launcher would provide about the same functionality, and the appfinder is usually closed with the keyboard (either by confirming a command/app or by pressing Escape). There is no need to add D-Bus complexity just for a toggle feature. Also, if this patch is only needed by your plugin, you should simply implement it in your feature branch. It's not a problem for anything in Xfce at the moment, so it's not really a bug, I'd say.