notify-send supports html

Forum rules
Before you post please read how to get help
Post Reply
lmuserx4849
Level 5
Level 5
Posts: 603
Joined: Wed Dec 17, 2014 2:55 am

notify-send supports html

Post by lmuserx4849 » Sat Jun 10, 2017 2:16 am

I have always played games to format gui notifications, dialogs, messages using notify-send or kde's kdialog. I recently learned that they support a subset of html.
Fun times! :-)

notify-send "<h3>Hello</h3>" "body<br/>body <a href="http://forums.linuxmint.com">Linux Mint Forums</a>"

kdialog --passivepopup "<h3>Hello</h3> body<br/>body <a href='http://forums.linuxmint.com'>Linux Mint Forums</a>"

FreedomTruth
Level 4
Level 4
Posts: 377
Joined: Fri Sep 23, 2016 10:19 am

Re: notify-send supports html

Post by FreedomTruth » Sat Jun 10, 2017 11:30 am

Apparently, not always...
notify-send.jpg
If you abide in My word, you are My disciples indeed. And you shall know the truth, and the truth shall make you free... Most assuredly, I say to you, whoever commits sin is a slave of sin... Therefore if the Son makes you free, you shall be free indeed.

lmuserx4849
Level 5
Level 5
Posts: 603
Joined: Wed Dec 17, 2014 2:55 am

Re: notify-send supports html

Post by lmuserx4849 » Sat Jun 10, 2017 2:39 pm

FreedomTruth wrote:Apparently, not always...
HHHmmm...

It works on all KDE. I've seen it on LMDE2 with MATE 1.18. I've been told that after the update to LMDE MATE <a> didn't work.

If I compare the two systems, inotify-tools are both at 3.14 and libnotify-bin is 0.7.6.

What do you see when you execute:

Code: Select all

dpkg -l $(dpkg -S /usr/bin/notify-send|cut -f 1 -d ':')   #1
lsb_release -d  #2
I see in the notify-send man page they point to the "Desktop Notifications Specification", which may or may not work in the real world :-)

Update:
Following some threads at github, there have been problems with notifications and gnome 3 thus cinnamon. I haven't used gnome or cinnamon, so can't say for sure.

FreedomTruth
Level 4
Level 4
Posts: 377
Joined: Fri Sep 23, 2016 10:19 am

Re: notify-send supports html

Post by FreedomTruth » Sat Jun 10, 2017 6:19 pm

Code: Select all

$ dpkg -l $(dpkg -S /usr/bin/notify-send|cut -f 1 -d ':')
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-=================================================
ii  libnotify-bin          0.7.6-2svn1      amd64            sends desktop notifications to a notification dae
$ lsb_release -d
Description:	Linux Mint 18.1 Serena
I'm using MATE.
If you abide in My word, you are My disciples indeed. And you shall know the truth, and the truth shall make you free... Most assuredly, I say to you, whoever commits sin is a slave of sin... Therefore if the Son makes you free, you shall be free indeed.

lmuserx4849
Level 5
Level 5
Posts: 603
Joined: Wed Dec 17, 2014 2:55 am

Re: notify-send supports html

Post by lmuserx4849 » Sun Jun 11, 2017 1:32 am

I thought I really found something with html support in notifications, but evidently the smart folks in the mate section of this forum knew about it. :-) And they know it is not working the way it use to work. Argh. :-( UUUmmmm, it works in kde ;-)

Possible bug in LM Mate 18.1 notification system

From the above link it looks like the module is: dpkg -l *mate-notification* and the git issue page is here.

Post Reply

Return to “Scripts & Bash”