Excellent. I saved a backup copy of existing batmon.sh as batmon.old, and replaced everything after the comments with your new code in the batmon.sh, and the battery level on the green batmon icon in the taskbar is now displaying a perfect % remaining figure.
Thanks for that.
When I hover the mouse over it, a little box appears with 'aasdf' in it. Can this be changed or stopped ?
Hello Brad_chuck,
I tried batmon a few days ago and I got the famous %- problem. Yesterday I noticed the line I had previously added to automatically mount one of my partition didn't function either since that day (I know I'm a bit slow...).
I went to the rc.local file and, wow, I found the batmon line your script added fot modprobing battery had benn added in the same line as my automount! So i just pulsed "enter" to separate both lines and I got the batmon working and my automount working again. It works great!
I also wanted to point out for the icewm users to edit preference in root/.icewm ant activate taskbarAPM something in order to show the batmon.
[color=blue]Dumbledore: "The evidence of the Dark Lord's return is incontrovertible"[/color]
IBM X31 - Puppy 2.16 Hard disk install with EZpup
I just started to use Puppy3.01 on a FujitsuSiemens K7610W laptop. I made batmon visible on the tray and it shows the good percentage of the battery but if I move the mouse above the tray it shows the "aasdf" which is weird to me...
I would appreciate if anyone had a good idea what to do!
BTW, this is the first Linux what I brave enough to try, but I really like it!
I run Puppy Linux 3.01 on a Compaq Armada laptop. Batmon used to work perfectly until I add a second battery. I then got -% in the tray.
Running batmon.sh in a terminal window gives the error :
--------------
/usr/local/bin/batmon.sh: line 18: let: per=((2885
2655*100)/(2885
2655)): missing `)' (error token is "2655*100)/(2885
2655))")
---------------
I look at the script and the tmp files and made the following changes to the script to add the values of the two batteries :
--------------
for a in `ls`
do
rc1="`cat /proc/acpi/battery/$a/state | grep "remaining capacity:" | sed -n 's/remaining capacity: //p' | sed -n 's/ m[A-Z]h//p'`"
cap1="`cat /proc/acpi/battery/$a/info | grep "last full cap" | sed -n 's/last full capacity: //p' | sed -n 's/ m[A-Z]h//p'`"
rc="($rc+$rc1)"
cap="($cap+$cap1)"
done
echo $rc >> /tmp/batmon.rc
echo $cap >> /tmp/batmon.cap
----------------
I now get what seems to be ok. I am not a Linux programmer and would like to know if my changes are valid and is there a better way to do it.
Been trying for a couple of days to get some kind of battery monitoring working with my ancient Dell Inspiron 2600 laptop. Running 4.3.1 Puppy. Previous versions of Puppy worked. Oddly, though, I've tried loading some livecd's of older versions of Puppy and they all present the contents of "/proc/apm" as indicated below.
Have to boot with "acpi=off".
No matter whether the laptop is plugged in or not, "cat /proc/apm" yields: