Solved

Alerting the user with a text message about a critical condition in C

Posted on 2003-11-26
8
245 Views
Last Modified: 2010-08-05
I want to notify the user when the UPS battery goes down. A simple text message is sufficient. Any user, working on any application on KDE/GNOME/Terminal... in that machine must be alerted. I have written the C program to monitor the UPS battery, but am not able to alert the user with some on-screen text. What is the easiest way to do this?
0
Comment
Question by:raj_nbr
8 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 250 total points
ID: 9826814
xmessage UPS down
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9829427
0
 
LVL 3

Expert Comment

by:scn
ID: 9830329
system("wall <message>")
man wall for details
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:raj_nbr
ID: 9835406
Thanks for the replies. Let me try and come back to you.


Raj Nambiar
0
 
LVL 3

Author Comment

by:raj_nbr
ID: 9845055
Ixmessage works fine. Thanks.
Wall does not work in GNOME GUI.
Does this also work in SUN SOLARIS?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9846050
Solaris does not come with xmessage, usually.
You can get it from http://www.sunfreeware.com/
0
 
LVL 3

Author Comment

by:raj_nbr
ID: 9873081
One more question if you don't mind. Does X message work with all versions of Linux?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9873608
AFAIK yes

if not, just get the sources and compile yourself, it's a very tiny application
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question