79744728

Date: 2025-08-24 07:53:01
Score: 0.5
Natty:
Report link

I'm facing the same issue and this seems like a tough nut to crack.

One workaround I came across is using sudo to run the script that needs root privileges (and is supposed to send notifications). This provides access to environment variables SUDO_USER and SUDO_UID.

As the user running the Wayland session, run:

$ sudo notify-test.sh --app-name="Script" "Hello world!"

Contents of notify-test.sh:

#!/bin/bash
sudo -u ${SUDO_USER} DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${SUDO_UID}/bus notify-send "$@"

Tested successfully on KDE Plasma running a Wayland session.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I'm facing the same issue
  • High reputation (-1):
Posted by: Fonic