Why does notify-send fail as root in RHEL 7 ?

Solution Verified - Updated -

Issue

  • On RHEL 7, notify-send fails as root making it impossible to send notification to the user directly.

  • All of the following work on RHEL 6 under GNOME when logged in as "testuser" (meaning that DISPLAY is properly set for each command):

$ notify-send test
$ su -
Password: 
# notify-send test
# su testuser -c "notify-send test"
  • Only the following work on RHEL 7:
$ notify-send test
$ su -
Password: 
# su testuser -c "notify-send test"

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content