Just thinking, if your only need is simply to click on the icon and execute your script, just try musher0's suggestion for a one-liner (at one of the first posts in this thread)
Something like (this avoids the PIPE creating stuff, which has more possibilities (such as right-click menu), but apparently could be problematic, as you experienced):
Code: Select all
yad --notification --command='/usr/local/bin/spot-to-root' --image='/usr/local/share/icons/green-tick.png' 2>/dev/null
Fred