Page 1 of 2
[Solved] batterymon problem.
Posted: 3. Feb 2012, 20:46
by globetrotterdk
I have downloaded batterymon and done the following:
Code: Select all
$ mv /home/user/Downloads/batterymon /opt
Code: Select all
# ln -s /opt/batterymon/batterymon.py /usr/local/bin/batterymon
Unfortunately I get the following errors:
Code: Select all
$ batterymon
2012-02-03 21:38:12,635 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-03 21:38:12,635 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-03 21:38:12,636 - batterymon - CRITICAL - Default theme does not exists, fatal
2012-02-03 21:38:12,636 - batterymon - CRITICAL - Default theme does not exists, fatal
The same happens when I run from root. What am I missing?
Re: batterymon problem.
Posted: 3. Feb 2012, 20:49
by Shador
Re: batterymon problem.
Posted: 3. Feb 2012, 21:55
by globetrotterdk
Thanks. Sorry, I try to avoid scripting if there is an easier solution as scripting isn't part of my skill set yet

Re: batterymon problem.
Posted: 8. Feb 2012, 19:19
by mimosa
I try to avoid scripting if there is an easier solution as scripting isn't part of my skill set yet
... but maybe in this case it's the simplest solution. I haven't tested it out but Shador seems to be suggesting that if you do exactly what you did with sunflower, it may work.
So:
1. Delete the symlink
2. Create a short script just like the "sunflower" one, substituting "batterymon" for "sunflower"
3. Make sure it is executable
4. Test by doing $batterymon
In this case you could save work by copying the sunflower launcher and editing it - you want /opt/batterymon and ./batterymon.py instead of /opt/Sunflower and ./sunflower.py:
Code: Select all
# cp /usr/local/bin/sunflower /usr/local/bin/batterymon
# nano /usr/local/bin/batterymon
... and then do whatever it was Shador said to do about menu entries, launchers etc.
However, I suspect you've managed to solve the problem some other way by now!

Re: batterymon problem.
Posted: 9. Feb 2012, 09:34
by globetrotterdk
Thanks for your post. I followed Shador's suggestion
Re: batterymon problem.
Posted: 9. Feb 2012, 11:38
by mimosa
Glad you got it working!

Re: batterymon problem.
Posted: 9. Feb 2012, 21:57
by globetrotterdk
mimosa wrote:Glad you got it working!

That was on the one computer. The other two have me baffled. I am trying to ascertain the problems. I installed Salix LXDE 13.37 also on my wife's tired Dell Latitude D505 laptop and my EeePC 701. Despite having done everything exactly the same, I am getting the following errors from batterymon:
Dell from the /opt/batterymon directory
Code: Select all
$ ./batterymon.py
2012-02-09 22:24:58,159 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
Dell from /home/user
Code: Select all
$ batterymon
2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
EeePC 701 from the /opt/batterymon directory
Code: Select all
$ ./batterymon.py
You do not seem to have libnotify installed. Notifications won't work.
2012-02-09 22:15:53,281 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
2012-02-09 22:15:53,281 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
^CTraceback (most recent call last):
File "./batterymon.py", line 525, in <module>
gtk.main()
(I do have libnotify installed.) EeePC 701 from the /home/user directory
Code: Select all
$ batterymon
You do not seem to have libnotify installed. Notifications won't work.
2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
Any ideas? I have double checked that I ran
Code: Select all
# chmod +x /usr/local/bin/battrymon
on the file on both computers.
Re: batterymon problem.
Posted: 9. Feb 2012, 22:16
by mimosa
Maybe you need to do so on the script itself, as well as the launcher (which deosn't really deserve to be called a script

):
Code: Select all
chmod +x /opt/batterymon/batterymon.py
but that doesn't account for all the problems on the various machines, even if it is needed. Libraries soemtimes have different versions ... try
on the machine where it works, and compare with those where it doesn't. There could be differences because of what else you have installed, including the desktop environment I think.
Those messages about theme defaults not existing are the same ones you were getting before, suggesting it may be the same or similar problem.
If you want to find out what the permissions are on a file, do
inside its directory - or using the full path, such as /opt/package/filename. The following Wikipedia entry is very informative (see the section on "Symbolic notation" for how to interpret the output of ls -l ):
https://secure.wikimedia.org/wikipedia/ ... ermissions
Sorry not to be more specific!

as far as I'm concerned, basically, further investigation is needed. Someone else may recognise the signs of the specific problems you're having from the information you've already given.
Re: batterymon problem.
Posted: 10. Feb 2012, 10:39
by Shador
This seems like different problems. Any more information, does the program actually start? If it does what doesn't work?
Seems like issues due to different configuration of the computers and/or different hardware.
globetrotterdk wrote:Dell from the /opt/batterymon directory
Code: Select all
$ ./batterymon.py
2012-02-09 22:24:58,159 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
globetrotterdk wrote:EeePC 701 from the /opt/batterymon directory
Code: Select all
$ ./batterymon.py
You do not seem to have libnotify installed. Notifications won't work.
2012-02-09 22:15:53,281 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
2012-02-09 22:15:53,281 - batterymon - ERROR - org.freedesktop.Hal.NoSuchProperty: No property battery.remaining_time on device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0
^CTraceback (most recent call last):
File "./batterymon.py", line 525, in <module>
gtk.main()
Battery not detected or at least the remaining battery time is not available/supported. Maybe modprobe battery helps? Or acpi is missing/disabled?
globetrotterdk wrote:You do not seem to have libnotify installed. Notifications won't work
Possibly notify-python is missing?
globetrotterdk wrote:2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - ERROR - Theme default does not exists, falling back to default
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
2012-02-09 22:26:21,393 - batterymon - CRITICAL - Default theme does not exists, fatal
Some problem with settings. Either it's referring to gtk themes or some internal theming system of batterymon. In the first case per-user gtk theme settings would be troublesome in the latter case batterymon's own settings.
Re: batterymon problem.
Posted: 10. Feb 2012, 12:12
by globetrotterdk
mimosa wrote:Maybe you need to do so on the script itself, as well as the launcher (which deosn't really deserve to be called a script

):
Code: Select all
chmod +x /opt/batterymon/batterymon.py
but that doesn't account for all the problems on the various machines, even if it is needed...There could be differences because of what else you have installed, including the desktop environment I think.
Those messages about theme defaults not existing are the same ones you were getting before, suggesting it may be the same or similar problem... Sorry not to be more specific!

as far as I'm concerned, basically, further investigation is needed. Someone else may recognise the signs of the specific problems you're having from the information you've already given.
Thanks for posting the info mimosa. I believe that at least part of the problem with the Dell, is either a loose wire or a wonky battery. That still doesn't account for my getting the same error message as previously with the other install. That error was in connection with using a symantic link, where as here, I am using the "launcher" script. I get the following on the Dell
Code: Select all
user[~]$ cd /opt/batterymon
user[batterymon]$ ls -l | grep batterymon.py
-rwxr-xr-x 1 user users 17389 May 1 2009 batterymon.py
user[batterymon]$ cd /usr/local/bin/
user[bin]$ ls -l | grep batterymon
-rwxr-xr-x 1 root root 46 Feb 9 12:31 batterymon
I got exactly the same results as on the laptops that I succeeded getting batterymon to function properly.
doesn't return anything. acpid is installed. I am unsure what this is about, I get the same error as user
Code: Select all
# locate acpid
locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db': No such file or directory