zenity auto-close instantly closes
Hi all,
I'm trying to make this simple script work. If I remove the zenity auto-close option, the progress bar goes nicely from 100 to 0, and time counts down. But I don't get an exit code to use, and the zenity box stays there. If I do use the auto-close option, the zenity message instantly disappears without counting down, with an exit code 0. I would like this to close automatically after timeout (10 minutes, adjustable), with the same exit code as if I would click the "OK" button, and also being able to cancel the automatic shutdown, by clicking "cancel". Any ideas what I'm doing wrong here? Thanks in advance!! code: Code:
#!/bin/bash |
you certainly don't need the brackets around the while loop, you can put the pipe right behind 'done'.
i just tried this, and it's working as desired: Code:
$ i=0;while sleep 1; do echo $((i++)); done | zenity --progress --title="autoshutdown" --auto-close |
Welcome to LinuxQuestions.
From the man pages. Quote:
Code:
i=90 |
Wow. How could I have missed that... lol
Thanks! For anyone interested, my perfectly working script now: Code:
#!/bin/bash |
All times are GMT -5. The time now is 04:34 PM. |