What is the recommended way, from CLI or shell script or cron/timer command to:
show a notification
I have figured this out from an TJC thread. notificationtool -o add --application=MyApp --urgency=2 --icon=icon-s-filled-warning "$title" "$body"
works fine.
But this only places a notification in the notification area. It does not show a popup and it does not trigger a sound. So how do I:
show a popup notification
trigger a sound
As said I would like to do this without coding an actual application in QML or whatever. Just simple scripting (python is okay if necessary).
you should get the popup as well. If you want to do it without having to install the lipstick-qt5-tools package, you can also call the dbus interface directly (I’m pretty sure gdbus is installed by default). Admittedly a bit more cumbersome, but fine if it’s going in a script.
Thinking more about the sound, you could probably use something like this to play a sound at the same time. The paplay call blocks, so probably you’d want to trigger the notification first.
@SGE, notify-desktop and notify-send (usually part of the RPM file libnotify) are not provided by Jolla for SailfishOS, neither installed by default or available in Jolla’s RPM repositories.
In contrast to that notificationtool, gdbus and dbus-send are installed by default and work fine, hence I see no reason to compile and install a fourth tool, because one would have to maintain that by oneself, while three such tools maintained by Jolla for SailfishOS exist.
notificationtool is simple to use, see notificationtool --help
gdbus is easy to use, see gdbus --help / gdbus call --help; still it allows to send arbitrary signals and method-calls via D-bus.
dbus-send also allows to send arbitrary signals and method-calls via D-bus.