1

There is a tutorial http://wiki.mate-desktop.org/matecorba_to_dbus#d-bus_service_file which says how to create DBus configuration file.

But I don't understood, why it is required. The service is registered by applet itself during the applet's startup. And applet's startup is described in another config (in config of mate-panel).

So, when DBus starts the applet independently from mate-panel?

1 Answer 1

0

If this is still an issue: AFAIK DBUS is used to make or start an applet, when a user right clicks on the mate-panel, chooses 'Add to panel...' and then adds the applet to the panel.

You may look at https://github.com/mate-desktop/mate-university if you want to make an applet. I am going to try to update it.

Edit: OK, let me try to be precise. - Though I'm new to this.
Why is the DBus config file required?
If you install an applet, the config file is copied into /usr/share/dbus-1/services - at least that's what I think. This starts the DBus service for the applet.
Mate-panel takes ownership of the factory service in:
mate-panel-applet-factory.c mate_panel_applet_factory_register_service() calling
g_bus_own_name().

So the statement 'The service is registered by applet itself during the applet's startup' seems kinda false to me. It is not that the applet registers the service, it just points to it.
If I remove the service and restart the panel, I can add the applet, but nothing happens.
The service executes the applet.
The service is probably called from panel-addto.c, but I couldn't find where exactly.

When does DBus start the applet independently from mate-panel?
Probably never. I suspect DBus is just an interface, through which mate-panel can parse a list of all applet factories and then call them if needed.

Note that I'm very new to the mate-panel code, so I can't really explain why 3+ years ago someone wrote something.

It is also not relevant. If someone wants to write an applet, I think I can help, otherwise please write to the original devs directly or browse the code, just as I have for the past hour...

1
  • How does this answer the OP question about why the applet config for dbus is needed? Commented Jan 29, 2018 at 17:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.