I'm searching for a way to show the content of a notify-send message in the lockscreen of Gnome 3.20. Normally this is configured under settings > notifications, but "notify-send" isn't mentioned there, only installed apps are.
Playing with dconf, especially under org.gnome.desktop.notifications application-children ['org-gnome-software', 'firefox', 'org-gnome-pomodoro', 'gnome-tweak-tool', 'evolution', 'ca-desrt-dconf-editor']
didn't help much either.
My notify-send script shows me affirmations, fetched from another file, every 30mins:
#!/bin/bash
while : ; do
notify-send -i /usr/share/icons/gnome/scalable/emotes/face-smile-big-symbolic.svg --hint int:transient:1 "$(sort -R ~/Sonstiges/Affirmationen/Affirmationen.txt | head -n 1)"
sleep 30m # Zeit in Minuten
done
Any ideas how to accomplish this?
Best Answer
Thanks to Chris Williams (chrisawi) from the Gnome IRC Channel the following solution was found:
Create a script called
notifier
in/.local/bin/
with this content:Mention it in the original notify-send script, that also lies in
/.local/bin/
:You also have to create a
.desktop
file, either in/.local/share/applications/
or in/.config/autostart/
if you want this script to be executed at startup. My/affirmationen.desktop
in/.config/autostart/
looks like this:Enjoy!