You are not logged in.

#1 2009-09-02 19:42:03

Oliver_Schmid
Member
Registered: 2009-06-22
Posts: 10

xmessage low battery warnings

Every time I unplug my laptop I get an xmessage pop-up saying "Low Battery" even when my battery's fully charged. I think it started with the new kernel (2.6.30.5-1). Anybody know how I can turn it off? Or better yet change it so it only appears when I'm down to 5%?

Offline

#2 2009-09-02 21:37:03

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: xmessage low battery warnings

What's your window manager/desktop?

I use /usr/bin/acpi from the acpi package to get my battery info. I notice that right after unplugging my laptop this gives crazy results. So I had to put a sleep for a few seconds into my battery-notification scripts to stop from seeing garbage.

Offline

#3 2009-09-02 22:14:41

Oliver_Schmid
Member
Registered: 2009-06-22
Posts: 10

Re: xmessage low battery warnings

I use Openbox/LXDE.

To keep an eye on my battery I just use the Battery Monitor in the panel. I'm not sure though what's launching these xmessage pop-ups. Are there any logs I can check?

Offline

#4 2009-09-02 23:18:02

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: xmessage low battery warnings

Depends on the program whether it's writing to a log.

One thing you could try is move xmessage to xmessage.old. In its place put a script like this (untested, adjust to your needs):

#!/bin/bash
date >> ~/whos_calling_me
echo $$ >> ~/whos_calling_me
ps -FjH >> ~/whos_calling_me
xmessage.old "$@"

Then do what you need to do to trigger the popup, and inspect ~/whos_calling_me

Offline

#5 2009-09-10 23:36:29

Oliver_Schmid
Member
Registered: 2009-06-22
Posts: 10

Re: xmessage low battery warnings

I tried replacing xmessage with a logging script such as you suggested. While it did get rid of the popups. It didn't print anything to the newly created logs. Here was my code:

#!/bin/bash
date >> ~/battery
echo $$ >> ~/battery
ps -FjH >> ~/battery
xmessage.old "$@"

Offline

#6 2009-09-11 01:04:19

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: xmessage low battery warnings

Oliver_Schmid wrote:

I tried replacing xmessage with a logging script such as you suggested. While it did get rid of the popups. It didn't print anything to the newly created logs. Here was my code:

#!/bin/bash
date >> ~/battery
echo $$ >> ~/battery
ps -FjH >> ~/battery
xmessage.old "$@"

I wonder why this got rid of the popups. Did you rename the original xmessage to xmessage.old? I think you should also change the xmessage.old to "/usr/bin/xmessage.old" or whatever the appropriate path is. Sorry I didn't think of that before.

As to whether the messages are getting logged, perhaps xmessage was called by a root daemon---I wouldn't expect so, but it's possible. In that case the logs might be in /root instead of in /home/yourusername. You could also try changing the "~/battery" lines to "/home/yourusername/battery". If none of that works, then I'm stumped, unless some independent change removed the root cause of the popups. If you put the old xmessage back, do the popups return?

Offline

Board footer

Powered by FluxBB