[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Add configure option to use autostart instead of dbus (Bug #13989)
noreply at xfce.org
noreply at xfce.org
Wed Nov 29 21:37:21 CET 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit 72334c07ae266dbb07adb73b247e944fa8fa13b3
Author: Andreas Müller <schnitzeltony at gmail.com>
Date: Fri Nov 10 10:29:28 2017 +0100
Add configure option to use autostart instead of dbus (Bug #13989)
The default behavior remains as before (autostart via dbus) and dbus is
still the recommended default.
However, on systems with multiple desktops installed, dbus service
'org.freedesktop.Notifications' may be defined by multiple instances. In some
cases (e.g. KDE-Plasma) this may lead to unpredictable results: On some environments
xfce4-notifyd is started and on others not.
To help distros/packagers a new configure option '--enable-dbus-start-daemon'
is introduced (disabled by default, as implied above).
It should be noted that the simplicity of this change is possible since recent
change: Daemon does not kill itself after being idle for certain time - see
commit d87a4a93b2ec4ab094f5a35ae818395f750f2891.
For the historically first discussion about this topic continue reading
here:
https://bugzilla.xfce.org/show_bug.cgi?id=7950
---
Makefile.am | 13 +++++++++++++
configure.ac.in | 8 ++++++++
xfce4-notifyd/xfce4-notifyd.desktop.in | 6 ++++++
3 files changed, 27 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index c81bdaa..3bd2d46 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@ xfce4_notifyd_config_xfce4_notifyd_config_LDADD = \
$(common_ldadd) \
$(LIBNOTIFY_LIBS)
+if USE_DBUS_START_DAEMON
servicedir = $(datadir)/dbus-1/services
service_in_files = xfce4-notifyd/org.xfce.xfce4-notifyd.Notifications.service.in
service_DATA = $(service_in_files:.service.in=.service)
@@ -97,6 +98,15 @@ dist_service = \
xfce4-notifyd/notify-dbus.xml \
xfce4-notifyd/xfce-notify-marshal.list
distclean_service = $(service_DATA) $(systemd_user_DATA)
+else
+autostartdir = $(sysconfdir)/xdg/autostart
+autostart_in_files = xfce4-notifyd/xfce4-notifyd.desktop.in
+autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+
+dist_autostart = \
+ $(autostart_in_files)
+distclean_autostart = $(autostart_DATA)
+endif
dist_man1_MANS = \
xfce4-notifyd-config/xfce4-notifyd-config.1
@@ -273,6 +283,9 @@ install-data-hook:
xfce4-notifyd/%.service: $(srcdir)/xfce4-notifyd/%.service.in Makefile
sed -e "s,\@notifydir\@,$(xfce4_notifyddir),g" < $< > $@
+xfce4-notifyd/%.desktop: $(srcdir)/xfce4-notifyd/%.desktop.in Makefile
+ sed -e "s,\@notifydir\@,$(xfce4_notifyddir),g" < $< > $@
+
distclean-local:
-rm -rf *.cache *~
diff --git a/configure.ac.in b/configure.ac.in
index 46a132c..a37da8c 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -124,6 +124,14 @@ AS_IF([test "x$use_old_gsi_sig" = "xyes"],
AM_CONDITIONAL([USE_OLD_GET_SERVER_INFORMATION_SIGNATURE],
[test "x$use_old_gsi_sig" = "xyes"])
+dnl dbus start daemon
+AC_ARG_ENABLE([dbus-start-daemon],
+ [AS_HELP_STRING([--enable-dbus-start-daemon],
+ [Start daemon by dbus - if not set by autostart. (default=yes)])],
+ [use_dbus_start_daemon=$enableval], [use_dbus_start_daemon=yes])
+AM_CONDITIONAL([USE_DBUS_START_DAEMON],
+ [test "x$use_dbus_start_daemon" = "xyes"])
+
dnl create #define for spec version
AC_DEFINE_UNQUOTED([NOTIFICATIONS_SPEC_VERSION], ["notifications_spec_version"],
[Set to the version of the freedesktop.org notifications spec we support])
diff --git a/xfce4-notifyd/xfce4-notifyd.desktop.in b/xfce4-notifyd/xfce4-notifyd.desktop.in
new file mode 100644
index 0000000..d1f76f9
--- /dev/null
+++ b/xfce4-notifyd/xfce4-notifyd.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Xfce Notification Daemon
+Exec=@notifydir@/xfce4-notifyd
+Icon=xfce4-notifyd
+OnlyShowIn=XFCE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list