LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 07-25-2011, 06:12 PM   #1
debianD
Member
 
Registered: Jul 2009
Posts: 37

Rep: Reputation: 16
How to refresh a graphical display through bash script


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.
 
Old 07-25-2011, 06:37 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to refresh a graphical display through bash script debianD Programming 5 07-27-2011 10:49 PM
Bash script to find available display sever ralfbutler Linux - Software 1 09-18-2010 06:15 AM
How to display remainder in Bash script packets Linux - Newbie 6 12-01-2007 02:30 AM
xset is unable to open display from within bash script copolii Linux - General 3 10-22-2005 07:26 PM
change refresh rate during graphical startup mmail75 Fedora 1 12-11-2003 04:41 PM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration