LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Notification service not available (https://www.linuxquestions.org/questions/slackware-14/notification-service-not-available-4175736075/)

Francexi 04-16-2024 05:12 AM

Notification service not available
 
Hi there, for some reason I started getting failing to use the notification from Plasma. I'm on Slackware-current. The notification service falls back to xfce one, but I'm wondering what could cause it. Anyone can suggest any log file to check? The xorg one do not give any hint right now.

EDIT: I'm not sure, but I can recall that the problem started occurring after upgrading to xfce4-notifyd-0.9.4-x86_64-1.txz

EDIT: SOLVED. I had to edit org.xfce.xfce4-notifyd.Notifications.service changing the Name to a random one, in order to not conflict with the Plasma service. I have kinda the same problem with Thunar (each time i update Thunar, it changes the configuration files and conflicts with Dolphin as default file manager). Kinda wondering if there is a way to set a priority

ctrlaltca 04-17-2024 05:25 AM

Rebuilding xfce-notifyd to avoid the dbus service activation files is a possible solution:

https://www.linuxquestions.org/quest...ml#post6496575

xfce-notifyd already installs xdg autostart files, so its functionality is not borked even without dbus activation files.

z80 04-17-2024 07:18 AM

If you don't want to rebuild xfce-notifyd you can create a link from /usr/share/dbus-1/services/org.kde.plasma.Notifications.service to ~/.local/share/dbus-1/services/org.kde.plasma.Notifications.service. This tells dbus to prefer Plasma notifications.

dmillfree 04-26-2024 04:49 AM

xdg autostart of notifyd causes issues
 
In Slackware64 Current and xfce4-notifyd-0.9.4. They compiled this package with --disable-dbus-start-daemon this switch which removes the 2 dbus files from the build. The problem with that is when launching from xdg-autostart it will throw warnings like Gdbus.Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.xfce.Notifyd was not provided by any .service files (because they were disable at compile time and aren't in the package). In other words xfce4-notifyd still wants these dbus files even though they were not included.

When xfce4-notifyd is started with dbus there are zero errors. NONE.

I only install XFCE, However if someone did have both XFCE and KDE-Plasma installed you could do something like this.

#!/bin/sh

if env |grep XDG_CURRENT_DESKTOP |grep XFCE; then
rm $HOME/.local/share/dbus-1/services/*
ln -s /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service $HOME/.local/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service
ln -s /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service $HOME/.local/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service
fi

if env |grep XDG_CURRENT_DESKTOP |grep KDE; then
rm $HOME/.local/share/dbus-1/services/*
ln -s /usr/share/dbus-1/services/org.kde.plasma.Notifications.service $HOME/.local/share/dbus-1/services/org.kde.plasma.Notifications.service
fi

The XFCE dbus files are not there (just to be clear).

Since I only install XFCE and I do not want to rebuild the package every time it's updated. I simply copied the org.xfce.xfce4-notifyd.Notifications.service and the
org.xfce.xfce4-notifyd.Notifyd.service to $HOME/.local/share/dbus-1/services

As far as the xdg autostart you can either just uncheck the box in "sessions and startup" because you now have the dbus files or you can delete /etc/xdg/autostart/xfce4-notifyd.desktop

open a text editor and create the 2 XFCE4 dbus files

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib64/xfce4/notifyd/xfce4-notifyd

Save that as org.xfce.xfce4-notifyd.Notifications.service

[D-BUS Service]
Name=org.xfce.Notifyd
Exec=/usr/lib64/xfce4/notifyd/xfce4-notifyd

save that as org.xfce.xfce4-notifyd.Notifyd.service

Also because they did not use this switch --disable-systemd at compile time the xdg autostart desktop file looks like this

Exec=sh -c "systemctl --user start xfce4-notifyd.service 2>/dev/null || exec /usr/lib64/xfce4/notifyd/xfce4-notifyd"

systemctl is systemd which Slackware doesn't use. This desktop file should not be this way.

When it would look like this if they used this switch --disable-systemd at compile time, the compile process writes the desktop file.

Exec=/usr/lib64/xfce4/notifyd/xfce4-notifyd


All times are GMT -5. The time now is 08:51 AM.