Lua script how to invoke/call zenity or notify-send?

247 Views Asked by At

I'm a beginner in lua OS: Manjaro XFCE

If I run from terminal desktop notification with notify-send or zenity it works. for instance:

notify-send -t 4000 'Displays for 4 secs' "understood!!"

However, I can make it work from a lua script.

#!/usr/bin/lua

print ("basic test")

notify-send -t 4000 'Displays for 4 secs' "understood!!"

How to fix this, I tried several ways, incl os.execute(), but without success.

Thanks

1

There are 1 best solutions below

0
On
os.execute("notify-send -t 4000 'Displays for 4 secs' 'understood!!'")