Bug 343532 - empty notification string on wall messages
Summary: empty notification string on wall messages
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Martin Klapetek
URL: http://www.youtube.com/watch?v=9W_2cP...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 16:51 UTC by rapar
Modified: 2015-02-05 21:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rapar 2015-01-29 16:51:43 UTC
system messages don't show in notification tray popup

Reproducible: Always

Steps to Reproduce:
1. Open a terminal
2. Type "wall <some_random_message>"
3. Observe the notification tray popup with an empty string after ":"
Comment 1 Martin Klapetek 2015-01-29 16:58:45 UTC
wall doesn't do anything at all here, do I need to enable something somewhere?
Comment 2 rapar 2015-01-29 17:02:04 UTC
Well it's a common tool for sending messages to all terminals across the system. In my distribution, this binary is in util-linux. It's similar to "talk".
Comment 3 Martin Klapetek 2015-01-29 17:09:02 UTC
I do have wall present, it just doesn't do anything at all.
Comment 4 rapar 2015-01-29 17:13:54 UTC
If you open a terminal that registers a pts/X or go to a tty, typing "wall <message>" should send a message to every tty/pts which the same user observes. The root user can send messages to all the users.
Comment 5 Martin Klapetek 2015-01-29 17:32:10 UTC
Ok, this needs kpty build with utempter (is not in cmake output), then it will work across konsoles and stuff.

One thing that's immediately obvious is that the message starts with empty line, so that needs to be trimmed.

However I'm not sure this will fit into the popup anyway, it's limited to 3 lines I think and two lines are just the "Broadcast message from blah blah".

I'll see what I can do.
Comment 6 Martin Klapetek 2015-01-29 19:14:37 UTC
There we go: https://git.reviewboard.kde.org/r/122314/
Comment 7 Martin Klapetek 2015-02-05 10:15:41 UTC
Git commit 2aecaa502c9ae312069c74a7c86ce9163e4a6d51 by Martin Klapetek.
Committed on 05/02/2015 at 10:15.
Pushed by mklapetek into branch 'Plasma/5.2'.

Sanitize whitespace in notification popups

With this patch the text is first trimmed from whitespace at the
beginning and end, then all \ns are converted to <br/> (as before), then
the text replaces all remaining inner whitespace with single space and
finally, if there are two or more new lines in succession, it turns it
into just one.

REVIEW: 122314

M  +9    -0    dataengines/notifications/notificationsengine.cpp

http://commits.kde.org/plasma-workspace/2aecaa502c9ae312069c74a7c86ce9163e4a6d51
Comment 8 rapar 2015-02-05 21:37:53 UTC
Good job! :)