Registered Member
|
Hello,
I want to launch a notification on my screen when the script that I leave in the dispatcher.d directory, which is related to the Network Manager, is executed. But I can't get this notification to show on my screen. I have tried to test with the "cron" service but without success. Any help? I have searched for information in "https://develop.kde.org/deploy/kdialog/" but I have not found anything significant. Regards |
Registered Member
|
I didn't know about Kdialog, so I got curious. I tried this:
and this:
and both works. This thread also mentions Inotifywait but I didn't try. Then, I tried to test it on my wifi following Listing 2 of this guide, changing the UUID, removing the mount lines and adding kdialog. It didn't worked. I don't have more knowledge to make more testing on the network, but I hope this info helps you in some way. Thanks for the tip, sometimes i write some little scripts and it would be helpful to implement this when I left one running on the background. |
Registered Member
|
Hi!
Network scripts usually run as root and root does not have knowledge of your display. NM-Dispatcher scripts also have a special environment set up and uses DBus, so you may just have to listen on a signal or use notify-send looping over all logged in users. An (XServer) example can be found at jryan128/notify-send-all.bash. I cannot check the exact methods as I am not running NM.
Why cron? Ubuntu uses systemd for years now, so you should use a systemd-timer-unit. What exactly are you tring to do? |
Registered Member
|
Hello,
Thank you for replying to both of you. Next week I will test "notify-send-all.bash" and give you feedback. Thanks for the reply to both of you. Regards |
Registered Member
|
Hello,
Sorry for the delay in replying, today after trying I managed to do it this way:
I got the help from the web site "https://wiki.archlinux.org/title/Desktop_notifications". Thanks anyway |
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]