RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1834682 - [RFE] notify-send should return nonzero value if the notification was not sent
Summary: [RFE] notify-send should return nonzero value if the notification was not sent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libnotify
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Ray Strode [halfline]
QA Contact: Tomas Pelka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-12 08:36 UTC by Ondrej
Modified: 2022-05-10 14:13 UTC (History)
2 users (show)

Fixed In Version: libnotify-0.7.7-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2017158 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:44:22 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME libnotify merge_requests 13 0 None None None 2020-05-12 14:22:26 UTC
Red Hat Product Errata RHBA-2022:1818 0 None None None 2022-05-10 13:44:25 UTC

Description Ondrej 2020-05-12 08:36:48 UTC
Actual results:
Currently, notify-send always returns zero, regardless of the actual success in the notification.


Expected results:
Ideally, it should return non-zero if the notification was not sent (i.e. no dbus connection or such)


Additional info:

Comment 3 Michal Odehnal 2020-05-12 09:51:36 UTC
Can you provide some reproducer for this issue? Do you have something in logs or something of an indication that it was sent but the notification did not go through? I am not sure how to start reproducing this. What came to mind was to stop message bus, send the notification and check the return message, but the bus could be back up before the notification actually goes through.

systemctl stop messagebus;notify-send -u CRITICAL ABC; echo $?

It would be of great value to have some better reproducer. Thanks

Comment 4 Ondrej 2020-05-12 10:16:54 UTC
Well, it seems the issue is easy to reproduce - ssh to a RH-8 box, then execute 'notify-send  "hello world"'.
Ideally, this should return a failure as no GUI (Gnome session) running so nowhere to display the message.
Is it possible to achieve?

Also, easier test:
$ export DBUS_SESSION_BUS_ADDRESS=nonsense
$ notify-send "hello world"
- returns 0, should return non-zero as invalid DBUS configured

Comment 15 errata-xmlrpc 2022-05-10 13:44:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libnotify bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1818


Note You need to log in before you can comment on or make changes to this bug.