! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
(appfinder) no --daemon option and .service file
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-appfinder
Component:
General

Comments

Description Andrzej editbugs 2012-02-22 04:57:18 CET
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.
Comment 1 Andrzej editbugs 2012-02-22 06:17:28 CET
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).
Comment 2 Nick Schermer editbugs 2012-02-22 07:59:59 CET
Do you have anything in mind that will use appfinder over dbus? Because else this will only cause problems.
Comment 3 Andrzej editbugs 2012-02-22 08:19:03 CET
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?
Comment 4 Nick Schermer editbugs 2012-02-22 08:36:47 CET
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.
Comment 5 Andrzej editbugs 2012-02-22 09:11:09 CET
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).
Comment 6 Nick Schermer editbugs 2012-02-22 09:28:42 CET
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.
Comment 7 Jannis Pohlmann editbugs 2012-02-22 10:31:03 CET
(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.

Bug #8499

Reported by:
Andrzej
Reported on: 2012-02-22
Last modified on: 2012-04-03

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

Additional information