macOS has its "osascript" with "display notification", Linux has its "notify-send". Both are the most native way to generate DE notifications. What is the most native way to generate desktop notification in BSD unixes?
Asked
Active
Viewed 151 times
4
-
4I think it would depend on what _"desktop system"_ you're using, wouldn't it? BSD is the base OS and most don't really include a _desktop_ beyond the basic X11 distribution and applications, with a basic window manager. The most basic X11 app for notifications would be `xmessage`. – Greg A. Woods Jun 24 '22 at 02:38
-
1Isn't notify-send just a freedesktop idea? Should it then not apply to a the major desktop environments (say, GNOME, KDE), no matter whether you're running them on Linux or *BSD? It really isn't very "Linux-native": it just is a client making no use of specificities of the Linux kernel. – Marcus Müller Jun 24 '22 at 07:15
-
1@GregA.Woods FreeBSD, at least, does not include X11 anything in a base install. – Rob Jul 12 '22 at 09:51
-
1If you mean "base install" without any graphics environment, then the simplest notification tool is `write(1)`. See also `mesg(1)`. Available in all BSDs since the 1980s. However "desktop" seems to imply some kind of graphical UI and environment. – Greg A. Woods Jul 12 '22 at 19:30
1 Answers
1
As stated in OP's comment, most dekstop environments, in particular KDE-Plasma and Gnome use their own implementations to display notifications based on kernel agnostic DBus. Implementation that just cannot be replaced. ( Some notification daemon is started at DE launch time )
If all you want is to generate DE notifications, the standard way to proceed is to conform to the kernel agnostic Desktop Notifications Specification which the libnotify library implements.
If you also need a daemon because your DE does'nt implement anything then you should probably go with the notification-daemon.
MC68020
- 6,281
- 2
- 13
- 44
-
I am looking for a command line utility like notify-send which is considered the most standard across DE on BSD's. It seems from Marcus Muller's comment that notify-send is the most native command line way to generate notifications? Do you think thats not the case? – codepoet Jun 24 '22 at 07:23
-
1@reportaman : It depends on what you mean by "native". From my understanding of the word, notify-send can't be said so since it is no more than a tool based on (and distributed by) libnotify. The most "native" and now standard way to send notifications is using DBus and conform to the Desjtop Notifications Specifications, libnotify being the most "native" API for their implementation. My understanding of your question was that, since you knew notify-send, you had the intention to write something else from scratch. – MC68020 Jun 24 '22 at 07:36
-
No, my intention is to write a function in shell script function that generates DE notifications for as many operating systems as possible. Thanks for your explanation and answer though. – codepoet Jun 24 '22 at 07:40