! 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 !
start using autostart and not dbus activation
Status:
RESOLVED: WONTFIX
Product:
Xfce4-notifyd
Component:
general

Comments

Description Yves-Alexis Perez editbugs 2011-09-02 07:59:25 CEST
Hey,

it seems that the trend in notification daemons is to start using freedesktop.org autostart (/etc/xdg/autostart and .config/autostart) so people can more easily chose which notification daemon should be started, and by default use what the environment wants (right now there's a race at dbus activation time if multiple daemons are installed).

I was asked to change the way xfce4-notifyd starts (http://bugs.debian.org/640082) but it's really your call, so reporting :)
Comment 1 Jérôme Guelfucci editbugs 2011-09-02 19:45:17 CEST
I'm personnaly opposed to this. It means the daemon has to be running all the time : the main advantage of dbus activation was that you don't keep useless things running and that you can load them on-demand.

I don't see what benefit we would gain from this. I don't really care about people who want to have several notification services installed if I need to damage the overall experience for that.

I'm ready to discuss this though but you'll have to convince me.
Comment 2 Yves-Alexis Perez editbugs 2011-09-02 21:33:58 CEST
(In reply to comment #1)
> I'm personnaly opposed to this. It means the daemon has to be running all the
> time : the main advantage of dbus activation was that you don't keep useless
> things running and that you can load them on-demand.
> 
> I don't see what benefit we would gain from this. I don't really care about
> people who want to have several notification services installed if I need to
> damage the overall experience for that.

Afaiui it's a trend leaded by GNOME 3 and KDE.

> 
> I'm ready to discuss this though but you'll have to convince me.

In fact the easiest might be to join the mail conversation from the Debian bug (you can just mail 640082@bugs.debian.org with me and Michael Biebl on CC: (and you can even get an mbox with all the messages to the bug if you want an easy reply).
Comment 3 Brian J. Tarricone (not reading bugmail) 2011-09-26 09:18:51 CEST
I'd argue DBus is broken -- there's no way to arbitrate between different services that register to provide the same bus name.

Agreed with Jerome that it's nice to be able to allow the notifications daemon to gracefully quit when it hasn't seen a notification in a while, and automatically get started up again on demand.  You also speed up desktop startup doing it this way, since you don't have to start it immediately on login.

Now, you could certainly argue that a notifications daemon is pretty lightweight, so running it all the time shouldn't be a big deal... but then you start making that argument for every other transient daemon too, and it adds up.

It looks like xfce4-notifyd has a resident size of almost 10MB, which isn't bad, but it's just one more thing the system has to reason about when it's considering swapping things in and out.

I dunno.  I've considered the lack of a true 'registration mechanism' for handling conflicts between bus names to be a really poor design decision in DBus-land.  I'd rather see this fixed at a lower level, sorta how you have file associations in a file manager.  You may have 4 apps installed that claim to handle PDF files, but the user can usually set a preference.  For DBus stuff, obviously most of these choices should be hidden from the user, but the mechanism should at least exist!
Comment 4 Jérôme Guelfucci editbugs 2012-12-08 18:09:13 CET
I'm closing this as "won't fix", I don't see any advantage for Xfce users.
Comment 5 Cygwin Ports maintainer 2015-06-24 23:46:44 CEST
The "advantage" is that if another desktop is installed on the same system (e.g. multiple users with different preferred desktops), then each desktop will get its own Notifications daemon.  Otherwise, a race condition can result with undefined results.

Most other desktops have come to this realization, and use autostart for this reason.  Instead of distributors having to carry this patch, we would prefer to see it upstream.

I'm attaching patches for git master as of today which implements this change.
Comment 6 Cygwin Ports maintainer 2015-06-24 23:47:37 CEST
Created attachment 6334 
Launch with autostart instead of D-Bus activation
Comment 7 Cygwin Ports maintainer 2015-06-24 23:48:19 CEST
Created attachment 6335 
Do not exit on idle

Bug #7950

Reported by:
Yves-Alexis Perez
Reported on: 2011-09-02
Last modified on: 2015-06-24

People

Assignee:
Jérôme Guelfucci
CC List:
1 user

Version

Version:
unspecified

Attachments

Launch with autostart instead of D-Bus activation (6.72 KB, patch)
2015-06-24 23:47 CEST , Cygwin Ports maintainer
no flags
Do not exit on idle (4.67 KB, patch)
2015-06-24 23:48 CEST , Cygwin Ports maintainer
no flags

Additional information