node-notifier icon indicating copy to clipboard operation
node-notifier copied to clipboard

prepend "XDG_RUNTIME_DIR" to command method in order to fix #226

Open chatn0ir07 opened this issue 5 years ago • 1 comments

In #226 some people complained that node-notifier doesnt work if the script is automatically invoked by CRON. SPDUK however found a soloution which is to prepend XDG_RUNTIME_DIR=/run/user/$(id -u) to the command, i think we should modify the way node-notifier calls the notify-send function so it just works out of the box.

I cant check whether this is working cross platform, on Linux it works like a charm, other platforms have to be tested, i dont have any windows/mac machine here so i unforunately cant test it :/

chatn0ir07 avatar Dec 28 '19 23:12 chatn0ir07

This looks to me to be very Unix specific. I have some concerns if this is something this module should handle or not, but in any case the PR as it sits now seems to add the envvar to every command also on mac and windows, which looks from #226 like it is unnecessary? If anywhere, maybe this should be inside notify-send implementation?

mikaelbr avatar Apr 08 '20 12:04 mikaelbr