The time now is Fri 24 May 2013, 08:31
All times are UTC - 4 |
| Author |
Message |
JustGreg
Joined: 24 May 2005 Posts: 651 Location: Connecticut USA
|
Posted: Wed 16 Jun 2010, 15:06 Post subject:
Temperature Display Pet for Lucid Subject description: Uses BASH / GTKDIALOG |
|
Jemimah's excellent traytemp does not work under Puppy 5.0 Lucid. Here is a small BASH / GTKDialog script to display the acpi temperature value in a small window. The pet installs the script chck-temp to /usr/bin, the usual desktop file to /usr/share/applications and an icon to /usr/local/lib/X11/mini-icons. After the pet installs, there is a entry of Check Temperature in the Utility / General Utilities menu. With a little editing, one can have in the launcher section (next to Menu button) of JWM tray.
This does not monitor the temperature, so no warnings are given. But, it does allow one to check on it.
17 June 2010, I found a better looking thermometer image.
24 June 2010, I incorporated the code from rcrsn51 to handle the different versions of the file name with the temperature data
I hope this is a help.
| Description |
|

Download |
| Filename |
check-temp.pet |
| Filesize |
8.25 KB |
| Downloaded |
579 Time(s) |
_________________ Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Last edited by JustGreg on Thu 24 Jun 2010, 12:08; edited 5 times in total
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3016 Location: Oregon
|
Posted: Wed 16 Jun 2010, 18:25 Post subject:
|
|
It would do me no good on my Toshiba Satellite L550 laptop.
It seems it does not have any readable temperature sensors.
At least I could never get any results from pwidgets.
pwidgets also says it can find no fan.
The laptop has a fan.
But at the same time, hardware info reports the temperature as 51 Celsius.
I installed CPU frequency scaling tool also.
|
|
Back to top
|
|
 |
JustGreg
Joined: 24 May 2005 Posts: 651 Location: Connecticut USA
|
Posted: Wed 16 Jun 2010, 19:01 Post subject:
Subject description: 8-bit, try this |
|
This pet is very simple. Try entering this code in a console terminal window (urxvt):
| Code: | | cat /proc/acpi/thermal_zone/THRM/temperature |
If it returns the temperature, then this pet should work. For example, my system returns in response:
It sounds like the information is there if hardware info reports the temperature.
_________________ Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Last edited by JustGreg on Thu 17 Jun 2010, 09:30; edited 1 time in total
|
|
Back to top
|
|
 |
prehistoric

Joined: 23 Oct 2007 Posts: 1210
|
Posted: Wed 16 Jun 2010, 20:27 Post subject:
borrowed code for md5sums |
|
Hi Greg,
I just borrowed a little code to display md5sums for iso files. This allowed me to add this to a custom ROX menu for iso files without putting gtkhash in luci 203. (Myself, I use gtkhash, but I don't want to force the overhead on everyone.)
| Code: | #!/bin/sh
# For use with Puppy 5.0 Lucid, JustGreg 15 June 2010
# (for application to read CPU temperature)
# Based on Zigbert's guide to gtkdialog post,
# http://www.murga-linux.com/puppy/viewtopic.php?t=38608
# used by prehistoric to create a tiny script to display md5sums
# 16 June 2010
TEXT=`md5sum $@ | tr "[:blank:]" "\r"`
export script='
<vbox>
<text>
<label>md5sum: '$TEXT'</label>
</text>
<hbox homogeneous="true">
<button ok><action>Exit:0</action></button>
</hbox>
</vbox>'
gtkdialog3 --program=script
## exit from another poster on ubuntu
unset script #this ensures removal from memory
## <hbox>
## </hbox>
| This is so small and crude, I didn't feel it deserved to be a pet. It got me around the problem of waiting until someone reads the result before vanishing.
|
|
Back to top
|
|
 |
JustGreg
Joined: 24 May 2005 Posts: 651 Location: Connecticut USA
|
Posted: Thu 17 Jun 2010, 09:27 Post subject:
|
|
From Prehistoric:
| Quote: | | This is so small and crude, I didn't feel it deserved to be a pet. It got me around the problem of waiting until someone reads the result before vanishing |
I glad it was a help to you. I would not call it crude, since gtkdialog contains some elegant programing. I will agree it is simple. I based it on the classic "Hello World" program and added a centered button to exit. The pet packaging is the standard method of providing new items to puppy. Use of the pet makes it painless to install or remove.
The program is a handy way of displaying simple information. I hope others use the approach. Thank you for the feed back.
_________________ Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
|
|
Back to top
|
|
 |
nitejumper

Joined: 22 Jun 2010 Posts: 2 Location: Tampa, FL
|
Posted: Tue 22 Jun 2010, 08:27 Post subject:
system tray temperature in Lucid 5.01 Subject description: this works for me in Icewm |
|
First post for me, thanks everybody for the help I've gotten over the past 3 months with Puppy.
8bit, et al, the command to read temperature in MY machine is "cat /proc/acpi/thermal_zone/THM/temperature".
Notice the spelling of 'THM'.
----------------------------------------
I've been wanting a digital temperature display for my system tray in Icewm, but haven't been able to find one. I cobbled this thing together (my first program that compiled, and my first time making PNGs).
Since I had just modified pbatt to show battery percentage icons, I borrowed heavily from brad_chuck's program (in fact, the header in the source code still calls itself 'pbatt'). I just cut stuff out of 'bevent' until it did what I wanted.
Since I'm already running pbatt (with percentage icons), new program had to call a bash script named something other than 'bevent' ('cause that's what is called by pbatt), but otherwise, the main program is identical to 'pbatt'.
I put the main program (temp_tray5) in /usr/bin, the folder with all the PNGs in /usr/local, and added this line to /root/Startup/icewm -
sleep 1 && temp_tray5 &
it works, at least for me, YMMV.
------------------------------------------
next project is to modify 'freememapplet_tray_215ce' to display CPU load percentage in the system tray.
------------------------------------------
nitejumper
 |
| Description |
|

Download |
| Filename |
temp_tray.tar |
| Filesize |
99.5 KB |
| Downloaded |
405 Time(s) |
| Description |
|
| Filesize |
954 Bytes |
| Viewed |
1951 Time(s) |

|
| Description |
|
| Filesize |
942 Bytes |
| Viewed |
1953 Time(s) |

|
|
|
Back to top
|
|
 |
JustGreg
Joined: 24 May 2005 Posts: 651 Location: Connecticut USA
|
Posted: Tue 22 Jun 2010, 14:06 Post subject:
|
|
Nitejumper, it is interesting that on your system, the temperature information is in directory | Code: | | cat /proc/acpi/thermal_zone/THM/temperature | On my Acer Asprie Revo using Lucid Puppy 5.0, the directory location is: | Code: | | cat /proc/acpi/thermal_zone/THRM/temperature | I have noticed that Lucid Puppy 5.0 does not run/have the kernel module acpid like Quirkly and Pupeee. It is nice to see another approach. I will take a look at it. I am running jwm for the window manager so the icewm approach needs to be modified for my configuration.
_________________ Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
|
|
Back to top
|
|
 |
nitejumper

Joined: 22 Jun 2010 Posts: 2 Location: Tampa, FL
|
Posted: Wed 23 Jun 2010, 19:20 Post subject:
|
|
JustGreg said:
| Quote: | | I have noticed that Lucid Puppy 5.0 does not run/have the kernel module acpid like Quirkly and Pupeee. |
I just checked in Puppy Package Manager and found that I installed 'acpid-1.0.10-i486.pet' and 'acpitool-0.5.1-i486.pet' (found somewhere around here) recently - I was trying to get 'Suspend-to-RAM' working (and that still hasn't happened).
I worked with Puppy 4.31 for a short time before this one, and I love 5.01, - blazingly fast, more stable than WinXP, and infinitely configurable.
BTW, I just got a CPUload percentage working in the taskbar (digital, not analog). Hacked the source code from 'freememapplet_tray_215ce' from Lior Tubi (it works on my machine - none of the other versions work for me, but the text is still too big for the icon space), and 'cpu_test' from Paul Colby.
I changed the background to a comfortable green, with black text, but the text is too 'light' to jump off the screen without focusing on it.
I'm still looking for solutions to change either the taskbar width or make the font bold, but apparently, GTK doesn't let me change the font from what's defined in gtkrc.
-----------------------
niejumper
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7756 Location: Stratford, Ontario
|
Posted: Thu 24 Jun 2010, 08:44 Post subject:
|
|
| JustGreg wrote: | Nitejumper, it is interesting that on your system, the temperature information is in directory | Code: | | cat /proc/acpi/thermal_zone/THM/temperature | On my Acer Asprie Revo using Lucid Puppy 5.0, the directory location is: | Code: | | cat /proc/acpi/thermal_zone/THRM/temperature |
|
I have a machine that uses THM0. The solution is some code like this:
| Code: | THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"`
TEMP=`cat $THRMFILE | cut -c25-30` |
|
|
Back to top
|
|
 |
JustGreg
Joined: 24 May 2005 Posts: 651 Location: Connecticut USA
|
Posted: Thu 24 Jun 2010, 08:58 Post subject:
|
|
Thanks, rcrsn51. I will add the code and try it out. If it works then I will post the new pet. It did work properly. I have updated the pet (first post) with the improved script. Thanks for the help!
Nitejumper, the acpitool works nicely with Lucid. It is a handy "add-on" for laptops, net books, etc. I have added it to my Lucid installation. Be careful with the acpid pet. The program acpid should be a kernel module. If acpid module was not build for the kernel (2.6.33.2) then it will not install and work. You need to check to ensure there are no problems. I have no experience with the particular pet that you mentioned, so I can not help on its use. But, I have tried using kernel modules and found the it can be difficult to get added one to work properly. I hope this helps.
_________________ Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|