mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
set DBUS_SESSION_BUS_ADDRESS, needed by notify-send
This is needed by new versions of notify-send, as found on openSUSE Tumbleweed. Without this, desktop notifications don't work anymore, and notify-send starts to eat up CPU. If DBUS_SESSION_BUS_ADDRESS is already set, it won't be changed.
This commit is contained in:
parent
d71e46baaa
commit
cb5cdf2656
1 changed files with 3 additions and 0 deletions
|
@ -338,6 +338,9 @@ sub send_message {
|
|||
|
||||
$notify_home ne "" and $ENV{'HOME'} = $notify_home;
|
||||
$notify_display ne "" and $ENV{'DISPLAY'} = $notify_display;
|
||||
if (not defined($ENV{'DBUS_SESSION_BUS_ADDRESS'})) {
|
||||
$ENV{'DBUS_SESSION_BUS_ADDRESS'} = "unix:path=/run/user/$>/bus";
|
||||
}
|
||||
|
||||
# 'system' uses execvp() so no shell metacharacters here.
|
||||
# $notify_exe is an absolute path so execvp won't search PATH.
|
||||
|
|
Loading…
Add table
Reference in a new issue