fix GUI notifications

see also https://github.com/hakavlad/nohang/issues/85#issuecomment-593066828
This commit is contained in:
Alexey Avramov 2020-03-26 02:34:53 +09:00
parent 37807b4157
commit 72b1197aff

View File

@ -229,7 +229,14 @@ def re_pid_environ(pid):
continue
if i.startswith(display_env):
display = i[:10]
if i[-2] == '.':
# DISPLAY=:0.0 -> DISPLAY=:0
display = i[:-2]
else:
display = i
if len(display) > 10:
# skip DISPLAY >= :10
return None
continue
if i.startswith(dbus_env):