LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-10-2003, 02:30 PM   #1
professorfrink
LQ Newbie
 
Registered: Oct 2003
Location: Winnipeg Manitoba Canada
Distribution: Gentoo
Posts: 12

Rep: Reputation: 0
Need to generate popup message on Linux machines


Hi folks,

I have a network which contains 4 linux machines and 1 Win XP machine.
From a bash script that checks on the tape drive attached to one of the Linux machines I use smbclient to create a popup message on the windows machine if a problem is found. This uses the built-in alerter and messenger programs of Windows. It does exactly what I need.

I need to find a way to popup a message on one of the Linux machines at the same time.
I have tested using xmessage to disply a remote message and it only has one flaw. It waits for its return code before the rest of the script can be executed. I can have it timeout but I would rather send the message and just carry on. Is there a way that I can pipe in the return code on the command line and if so would that make the message on the remote machine dissappear?

Any other ideas?

Linux Machines are Mandrake 8.2.

Thanks.
 
Old 11-10-2003, 03:43 PM   #2
rameth
Member
 
Registered: Aug 2003
Location: new zealand
Distribution: debian unstable
Posts: 32

Rep: Reputation: 15
Would linpopup be of any use ?
http://www.littleigloo.org/downloads_002.php3
 
Old 11-10-2003, 04:02 PM   #3
professorfrink
LQ Newbie
 
Registered: Oct 2003
Location: Winnipeg Manitoba Canada
Distribution: Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
Unfortnueatley no.
It doesn't have the command line fiunctionality I need.

Thanks anyways.
 
Old 11-10-2003, 05:19 PM   #4
GAVollink
Member
 
Registered: Apr 2002
Location: Bronx, NY
Distribution: Ubuntu
Posts: 371

Rep: Reputation: 34
So you want XMessage, but you don't want to wait for a return... So how are you trying to call XMessage - is this a script (Perl, Shell) or a "program" (C/C++)?

[Edit - OK, read the post again]

Since this is a script - why not just background the xmessage?

xmessage --center "Hey, Check this error" & >/dev/null 2>&1

Wouldn't this do what you need?

Last edited by GAVollink; 11-10-2003 at 05:25 PM.
 
Old 11-14-2003, 11:46 AM   #5
professorfrink
LQ Newbie
 
Registered: Oct 2003
Location: Winnipeg Manitoba Canada
Distribution: Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
PERL does not honor the & at the end of the command so here is the fix.

I moved the xmessage command into a bash script.
The line in that script included the & at the end.

I then call that shell script from the perl script using the system() function like this
system("my_xmessage.sh","$variable1","$variable2");

I use variables because the messages are dynamically built.

Now my perl script continues on with it's business and does not rely on the user input from xmessage to be returned.

Thanks to those who replied.
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Irritating plugin popup message in mozilla downfall Linux - Software 2 10-29-2005 05:01 PM
popup message/ bruse Linux - Newbie 14 09-05-2005 01:53 PM
Broadcasting message to Windows machines muldereric Linux - Newbie 4 08-11-2005 10:36 AM
Need to generate popup alerts on linux machines professorfrink Linux - Software 10 04-17-2004 10:27 AM
How do I make a message box popup for all users? Joey.Dale Linux - General 3 04-09-2004 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:28 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
Open Source Consulting | Domain Registration