Shell – notify-send – How to display full message when message is longer than one line

gnome-shelllibnotifynotificationsnotify-send

Let's say I use notify-send with this long messages:

notify-send 'd: title, up/down: zoom, w: win_to_img, </>: rotate, *: orig, Enter/0: blah blah blah'

But it truncates the message, showing only a part of it with no option to view the full message:

enter image description here

With Fedora 21 I was able to view the full message (pop up at bottom with scrollbar), but not with Fedora 24.

Version of notify-send is libnotify-0.7.6-8.fc24.i686.

Is there anyway to display full messages in Fedora 24 ?

Best Answer

notify-send works like this:

notify-send [OPTION...] <SUMMARY> [BODY]

Now, as you only have one (quoted) string, that's being used for the SUMMARY and the BODY is empty. Just use blank or whatever for the SUMMARY and the BODY will display the whole message (but only when you hover over the pop-up with your mouse)1:

notify-send ' ' 'd: title,up/down: zoom,w: win_to_img,</>: rotate,*: orig,Enter/0: blah blah blah'

or if you prefer gdbus:

gdbus call --session --dest org.freedesktop.Notifications --object-path \
/org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify \
my_app_name 42 '' "" 'd: title, up/down: zoom, w: win_to_img, </>: rotate, \
*: orig, Enter/0: your very long message should now span over multiple lines \
and stuf blah blah blah blah whatever...' '[]' '{}' 20

1: this is on gnome 3, other DEs might actually display the whole message without the need to hover over it

Related Question