Solved

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

Posted on 2003-11-26
8
242 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
Comment Utility
xmessage UPS down
0
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
0
 
LVL 3

Expert Comment

by:scn
Comment Utility
system("wall <message>")
man wall for details
0
 
LVL 3

Author Comment

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


Raj Nambiar
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:raj_nbr
Comment Utility
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
Comment Utility
Solaris does not come with xmessage, usually.
You can get it from http://www.sunfreeware.com/
0
 
LVL 3

Author Comment

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

Expert Comment

by:ahoffmann
Comment Utility
AFAIK yes

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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now