I am learning how to use gtk notifications, and it seems that any output display via the notification bubble has a maximum overflow size, probably 10 lines or so. So, if the message I want to show is more than that, it gets suppressed. Is there any way to force display the entire message without anything getting suppressed?
I am using notifyOSD, by the way.
Best Answer
I posted this a while ago on a (now) deleted Q/A. Maybe it is useful to you.
A patch to allow (very) long messages
The "patch" below will allow you to have notifications as long as it takes on your desktop:
In case of (very) long notifications, instead of this:
you will see this:
The duration of the message is automatically set to the length of the text.
What it does
Notifications, send by
notify-osd
(notify-send
), are limited to appr. 120 characters.The solution "listens" to sent messages, using
dbus-monitor
. If a message exceeds the 120 characters, it takes over the messages and uses "its own" message window to display the notification, as shown above.The scripts
The setup exists of two sections; de "listen-" script, which intercepts the notifications:
Copy the script into an empty file and save it as
catch_notifs.sh
The script that creates the replacement- notifications:
Copy the script above into an empty file, save it as (exactly!)
message
(no extension) and make it executable.Test- run the script by the command (from a terminal window):
(keep it running)
You can test the setup by running (in another terminal):
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:
And it should work :)