Bug 399140 - Notification for "Bell" is useless
Summary: Notification for "Bell" is useless
Status: VERIFIED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: monitoring (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: investigated, junior-jobs, triaged, usability
: 165193 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-27 12:43 UTC by Oded Arbel
Modified: 2020-12-27 16:22 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2018-09-27 12:43:31 UTC
SUMMARY

When a "Bell" is sent in a terminal under Konsole, which is not the currently visible session, Konsole shows a desktop notification to let the user know a Bell has occured in another session.

The desktop notification lists the profile under which the session is run, but no other information about in which session the Bell occured. When the user has multiple sessions of the same profile (a very common scenario), then there's no way to know where the Bell came from.

STEPS TO REPRODUCE
1. Start Konsole and create 2 sessions (tabs) from the same profile (for example, the default profile).
2. In one tab run `sleep 3; tput bel`
3. Switch to the othe tab and wait 3 seconds.

OBSERVED RESULT
A desktop notification shows saying "Bell is session 'Shell'"

EXPECTED RESULT
A desktop notification should give a way to locate the specific session in which the shell occured.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.14.80
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Suggested alternatives:
1. Even putting the tab/window title in the notification is more useful then the profile name, as the profile name is not visible in the UI and a lot of users aren't even using the profiles feature and are confused by the name provided.
2. The desktop notification may be clickable and when clicked will activate the relevant Konsole window and activate the tab in which the bell was generated.
3. A visual indication of the bell would also be very useful - maybe adding a bell icon on the session's tab, for a few seconds or until the tab is activated.
Comment 1 Kai Uwe Broulik 2018-09-28 07:18:27 UTC
The relevant code [1] sends "_nameTitle" in the notification. Session class also contains _displayTitle and _userTitle which I think is used for the window title. Looks like an easy fix? :)

[1] https://cgit.kde.org/konsole.git/tree/src/Session.cpp#n692
Comment 2 Kurt Hindenburg 2018-10-11 14:29:47 UTC
For #2, I recall someone provided some code for that.  I'd have to search what happened to it.
Comment 3 Kurt Hindenburg 2018-11-01 22:06:27 UTC
Git commit 674243f126bb3bd72ce823ff0144b870d64bcf21 by Kurt Hindenburg, on behalf of Andrew Smith.
Committed on 01/11/2018 at 22:06.
Pushed by hindenburg into branch 'master'.

Update session icon on notification bell

Summary:
Change the icon of the session when a `bel` is triggered as a visually alert
FIXED-IN: 18.12

Test Plan:
1. Start Konsole and create 2 sessions (tabs) from the same profile
     (for example, the default profile)
2. In one tab run `sleep 3; tput bel`
3. Switch to the other tab and wait 3 seconds

Reviewers: #konsole, konsole-devel, hindenburg, ngraham

Reviewed By: ngraham

Subscribers: ngraham, konsole-devel, #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D16511

M  +5    -0    src/SessionController.cpp

https://commits.kde.org/konsole/674243f126bb3bd72ce823ff0144b870d64bcf21
Comment 4 Oded Arbel 2018-11-11 08:31:21 UTC
Works nicely. Thank you very much for this fix!
Comment 5 Ahmad Samir 2020-12-27 16:22:49 UTC
*** Bug 165193 has been marked as a duplicate of this bug. ***