Solved

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

Posted on 2003-11-26
8
244 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mysql server issue in linux server 5 64
Stopping flocksnippet: Killed (core dumped) on doing kill -9 5 73
Problem to telnet 23 165
Openwrt vnstat 9 187
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

825 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