I had managed to make it work from a console (tty1), but it seemed as if it refused to work from cron.
During the tests my local mailbox was getting the output of the command, and I stood and watched at this error message for more than an hour trying to figure out what was wrong. I couldn't understand what was wrong:
This option is not available. Please see --help for all possible usages.
This was from zenity and I was starting to suspect that it was failing to expad properly the text variable since it worked with a fixed text.
This was failing:
(...) | /usr/bin/zenity --progress --auto-close --text "'$NOTIFICATION$XMSG'"
And this was working:
(...) | /usr/bin/zenity --progress --auto-close --text "OH!MY!GOD!"
I couldn't figure it out. Until I tried this:
(...) | /usr/bin/zenity --progress --auto-close --text "OH!MY!GOD!îîăăîăî"
And it failed.
God damn! Setting LANG in the script fixed the issue right away!
So, if you ever want zenity to show up from cron dont forget to:
- set DISPLAY
- set LANG
2 comments:
I use screen-message/sm for the same thing.
You could show how do you set the LANG option.
Post a Comment