0

here is my code:

roroco@roroco ~/Dropbox/rbs/ro_wemedia $ time sudo -u root notify-send 'prpr'

real    0m0.033s
user    0m0.008s
sys 0m0.012s

roroco@roroco ~/Dropbox/rbs/ro_wemedia $ time sudo -u roroco /usr/bin/notify-send "prpr"

real    0m6.044s
user    0m0.016s
sys 0m0.016s
roroco@roroco ~/Dropbox/rbs/ro_wemedia $ time /usr/bin/notify-send "prpr"

real    0m0.110s
user    0m0.004s
sys 0m0.008s

see above output, when i use sudo -u roroco notify-send 'prpr', the time is long, what cause it?

here is my notify-send version

roroco@roroco ~/Dropbox/rbs/ro_wemedia $ notify-send -v
notify-send 0.7.6

1 Answer 1

0

solution: make sure 3 env vars exist

to me, it's

sudo -u roroco DISPLAY=:0.0 DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-L9d2ku9CfF" XAUTHORITY=/home/roroco/.Xauthority notify-send 'prpr'

you can get env var value with echo $env-name

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .