Hi. I have an empty file for /usr/libexec/ayatana-indicator-n (or, the N is capitalized) otifications- (or a period) service and need someone to give me the contents, please. I am trying to get notifications working and have a script in my home/.local/bin, besides there being a mate-daemon that's supposed to be executing notifications using that file.
I have a dir, /usr/libexec/ayatana-indicator-notifications/
in there
-rwxr-xr-x 1 root root 39144 Mar 31 2024 ayatana-indicator-notifications-service*
which is
ayatana-indicator-notifications-service: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=93816d217ab0ec0c81ae77c3375175533a7cda7e, for GNU/Linux 3.2.0, stripped
I could not find any file with -N or -n
Hi @pavlos_kairis Thanks for the fast reply. The file, ayatana-indicator-notifications-service, I was hoping for you to post the contents of the file--the Exec line, WantedBy, that stuff. Thanks.
the service file is an exec, I cannot post the contents hence the file
command
If I try to run this from terminal as root, I get the following:
(process:1254916): ayatana-indicator-notifications-WARNING **: 17:32:01.436: Could not get a connection to the dbus session bus: Error spawning command line “dbus-launch --autolaunch=6bd840549f8b48b3b69be18a2ae8f4a5 --binary-syntax --close-stderr”: Child process exited with code 1
If yours is a zero byte file, I would suggest re-installing the notification process. I'm not sure how you'd do that offhand, but someone here should know.
What was the specific command, again? I have two issues, now just one since the display stays on (fingers crossed). The issue is that notifications don't work--in Startup Programs, the executable for Ayatana Notifications is:
/usr/libexec/ayatana-indicator-notifications/ayatana-indicator-notifications-service
which that file has encoding that Pluma cannot read, which seems like an error; I thought service files ended with .service, not a -service. Where does mate-notify fit in here--I was told the daemon does not seem to start.
You can check which package a file belongs to:
dpkg -S /usr/libexec/ayatana-indicator-session/ayatana-indicator-session-service
ayatana-indicator-session: /usr/libexec/ayatana-indicator-session/ayatana-indicator-session-service
It might be worth removing (possibly even purging) ayatana-indicator-session, then re-installing.
I tried different variations of the filename ayatana*, like I mentioned to @pavlos_kairis. The command was suggested in Ubuntu Discourse
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ ls
ayatana-indicator-notifications-service
ayatana-indicator-notifications.service
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo pluma ayatana-indicator-notifications.service
[sudo] password for anthony:
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo rm ayatana-indicator-notifications.service
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo rn ayatana-indicator-notifications-service ayatana-indicator-notifications.service
sudo: rn: command not found
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo mv ayatana-indicator-notifications-service ayatana-indicator-notifications.service
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ systemctl start ayatana-indicator-notifications.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'ayatana-indicator-notifications.service'.
Authenticating as: Anthony,,, (anthony)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to start ayatana-indicator-notifications.service: Unit ayatana-indicator-notifications.service not found.
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo mv ayatana-indicator-notifications-service ayatana-indicator-notifications.service
mv: cannot stat 'ayatana-indicator-notifications-service': No such file or directory
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$ sudo mv ayatana-indicator-notifications.service ayatana-indicator-notifications-service
anthony@anthony-OptiPlex-9010:/usr/libexec/ayatana-indicator-notifications$
Ok, ran command @stephematician suggested
dpkg -S /usr/libexec/ayatana-indicator-session/ayatana-indicator-session-service
ayatana-indicator-session: /usr/libexec/ayatana-indicator-session/ayatana-indicator-session-service
and purged. This error message resulted when clicking to Preview notification in Control Center.
Not every file is a 'text' file that can be read. On my system, there is no .service
file in the folder you are searching. Only the ayatana-indicator-notifications-service
file.
- This type of file is binary;
- It is executable, which you can see this from
ls -l
output which lists the 'permissions' as-rwxr-xr-x
(the lastx
means a user can run it); - It can be run from that folder with
./ayatana-indicator-notifications-service
When you run it; it probably won't do anything (until a notification is spawned).
You can check notification indicator settings with ayatana-settings
. By adding the indicator applet to the panel, you can also see old notifications and set/clear 'Do not disturb'.
What's the output of:
ls /usr/share/dbus-1/services/*Notif*
The applet is there--it has been there for a while now, even though I'm not getting any notifications (I'm supposed to get notifications from meteo-qt when weather is updating, as in past).
anthony@anthony-OptiPlex-9010:~$ ls /usr/share/dbus-1/services/*Notif*
/usr/share/dbus-1/services/org.freedesktop.mate.Notifications.service
/usr/share/dbus-1/services/org.kde.plasma.Notifications.service
/usr/share/dbus-1/services/org.mate.panel.applet.MateNotificationAppletFactory.service
/usr/share/dbus-1/services/org.mate.panel.applet.NotificationAreaAppletFactory.service
anthony@anthony-OptiPlex-9010:~$
The kde.plasma strikes me as odd. Have you looked at: org.freedesktop.Notifications: Timeout was reached (Error calling StartServiceByName) - Newbie - EndeavourOS
I changed the name in org.kde.plasma.Notification.service as suggested:
[D-BUS Service] Name=org.freedesktop.TestNotifications Exec=/usr/bin/plasma_waitforname org.freedesktop.Notifications
anthony@anthony-OptiPlex-9010:/usr/share/dbus-1/services$ notify-send "Hello"
Error calling StartServiceByName for org.freedesktop.Notifications: Failed to execute program org.freedesktop.Notifications: No such file or directory
Why is the KDE (plasma) notification even installed? KDE is a different desktop environment.
I guess I was installing meteo-qt and other things from Synaptic--I upgraded, then downgraded. After returning to Jammy (I had a backup of home on an external, so getting things back was easy), I find difficulties with meteo-qt sending notifications. I also cannot figure out why the Advanced Menu doesn't appear when I click it. The last issue is that the screen blanks--a problem when I'm in a shootout in Mafia: Definitive Edition.
meteo-qt
doesn't depend on KDE plasma (or its notification system); so something else is the cause of the dysfunctional setup of your desktop.
I'd start by looking at:
dpkg -S /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
to identify which package the file belongs to.
Then I'd use apt-cache rdepends --installed <name of package>
to see if its even necessary to keep that package installed. If not: I'd purge it, and also delete that .service
file altogether.
Ok, found the app requiring the KDE--it's the Latte Dock; I need to keep it because the clock is very big and I have poor vision.
The following packages will be REMOVED:
kinfocenter* latte-dock* plasma-desktop* plasma-workspace*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 41.3 MB disk space will be freed.
I probably dl'ed it from Software because Cairo Dock wouldn't work anymore and I had a big clock there as well.
Did you reboot as suggested?
Yes, I did reboot but notify-send still didn't work--gave the error
anthony@anthony-OptiPlex-9010:/usr/share/dbus-1/services$ notify-send "Hello" Error calling StartServiceByName for org.freedesktop.Notifications: Failed to execute program org.freedesktop.Notifications: No such file or directory
Believing that service files ended with .service, instead of -service, I renamed some files, but I should have fixed them when I read the error message.