Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-11-26
8
Medium Priority
?
250 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 1000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

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 video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

824 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