Hi friends ,
Firstly I am not sure if this is the right place to ask this question.
My problem is -->
I need to display a message graphically using a messagebox or textbox through bash script. However the message should be keep changing every 4 secs . I input the message from a file and use "gxmessage" to display it .
Code:
gxmessage -nofocus -center -title "Welcome screen" -geometry "600,600" -wrap -file $random
Where "$random" is some random data from a file.
But the problem is , how should I refresh the same gxmessage message box,putting different message each time .
I thought of
Code:
while :
do
sleep 4
if ps | grep "gxmessage"
then
killall -9 "gxmessage"
fi
gxmessage -nofocus -center -title "Welcome screen" -geometry "600,600" -wrap -file $random &
done &
I do not like this solution and it looks ugly too , because it is visible that the message box is getting killed and forked every time .
Can't I use the same gxmessage message box for all the messages just by putting new messages and hence refreshing the same box.
Any idea , anything other than gxmessage will do , if a solution is somewhere else.
Thanks.
D.