notify-send supports html

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
lmuserx4849

notify-send supports html

Post by lmuserx4849 »

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>"
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
FreedomTruth
Level 4
Level 4
Posts: 443
Joined: Fri Sep 23, 2016 10:19 am

Re: notify-send supports html

Post by FreedomTruth »

Apparently, not always...
notify-send.jpg
lmuserx4849

Re: notify-send supports html

Post by lmuserx4849 »

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: 443
Joined: Fri Sep 23, 2016 10:19 am

Re: notify-send supports html

Post by FreedomTruth »

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.
lmuserx4849

Re: notify-send supports html

Post by lmuserx4849 »

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.
Locked

Return to “Scripts & Bash”