Author Topic: LM Sensors feat GKreLLM - GNOME Desktop And User Integration  (Read 1138 times)

String6

  • Guest
Hello All.
I thought I'd share my handy integration of LM Sensors and GKreLLM into the light!

How It Will Work:-
Open  GNOME CC (or in Preferences menu) and click on 'LM Sensors Configuration'.
This will run the 'lm-sensors-config' plus 'lm-sensors-terminal' scripts.
You will be presented with a console running the 'sensors-detect' program. Following instructions to probe hardware
and create '/etc/sysconfig/lm_sensors' file.
GKreLLM should now be running on your desktop. Enter GKreLLM preferences to add newly found sensors (temp etc)
as required.

                               ##############


1) Create the following file (lm_sensors.desktop) in /usr/share/applications:-

#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
StartupNotify=true
Exec=lm-sensors-config
Hidden=false
X-GNOME-Autostart-enabled=false
Name[en_GB]=LM Sensors Configuration
Name=LM Sensors Configuration
Comment[en_GB]=Set up LM Sensors to monitor CPU temps and more
Comment=Set up LM Sensors to monitor CPU temps and more
Icon=/usr/share/pixmaps/cpufreq-applet/cpufreq-na.png
Categories=GNOME;GTK;Settings;HardwareSettings;X-MandrivaLinux-System-Configuration-GNOME;

....................................................................................


2) Create the following bash script (lm-sensors-config) in /usr/local/bin :-

#!/bin/bash
gksu -l lm-sensors-terminal
gkrellm &
exit

....................................................................................

3) Create the following bash script (lm-sensors-terminal) in /usr/local/bin :-

#!/bin/bash
gnome-terminal -e sensors-detect
exit

....................................................................................

4) Create the following auto start file (gkrellm-startup) in /etc/skel/.config/autostart  (copy to existing user also) :-

[Desktop Entry]
Type=Application
Exec=/usr/bin/gkrellm
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_GB]=GKreLLM
Name=GKreLLM
Comment[en_GB]=Display hardware vital signs
Comment=Display hardware vital signs

....................................................................................

Don't forget to make bash scripts executable!
chmod   x <script>


..................GKreLLM Configuration....................

To create a global configuration that includes theme and other specifics,
the following should be considered:-

Play around with GKreLLM until satisfied then copy the hidden folder '.gkrellm2'
to /etc/skel.
Enter the copied '.gkrellm2' folder and delete the 'sensor config' file if a live cd
remaster is being created. Also delete 'etc/sysconfig/lm_sensors' file too.

If a personal live cd backup is being created and/or you
are not using your installation on different hardware keep the files as is.

To see a screen shot of my GKreLLM in action:-
Go to photobucket (.com) and search for 'PCLinuxOS Gnome #'

Here is my GKreLLM user-config file:-

### GKrellM user config.  Auto written, do not edit (usually) ###
### Version 2.3.4 ###
enable_hostname 0
hostname_short 0
enable_sysname 0
mbmon_port 0
sticky_state 1
dock_type 0
decorated 0
skip_taskbar 1
skip_pager 1
above 0
below 0
track_gtk_theme_name 0
default_track_theme "Default"
save_position 1
chart_width 184
update_HZ 5
allow_multiple_instances 0
float_factor 1000
hostname sysname_mode 1
clock_cal clock_launch
clock_cal clock_tooltip
clock_cal cal_launch
clock_cal cal_tooltip
clock_cal hour_chime_command
clock_cal quarter_chime_command
clock_cal loop_chime_enable 0
clock_cal clock_options 0
clock_cal cal_options 0
clock_cal cal_format %a <span foreground="$A"><big><big>%e</big></big></span> %b
clock_cal clock_format %l:%M <span foreground="$A"><small>%S</small></span>
cpu extra_info cpu 1
cpu chart_config cpu 40 20 0 0 0 0 : 0 0 0 0 500 : 0 0 0 0 500 : 0 0 0 0 500
cpu extra_info cpu0 1
cpu chart_config cpu0 42 100 1 0 0 0 : 0 0 0 0 500 : 1 0 0 0 500 : 0 0 0 0 500
cpu extra_info cpu1 1
cpu chart_config cpu1 40 100 1 0 0 0 : 0 0 0 0 500 : 1 0 0 0 500 : 0 0 0 0 500
cpu enable 1
cpu smp_mode 0
cpu omit_nice_mode 0
cpu config_tracking 0
cpu sensor_mode 0
cpu text_format $T
proc enable 0 1
proc launch (null)
proc tooltip_comment (null)
proc sensor_mode 0
proc text_format w88a$pf procs
e$uf users
proc chart_config 40 100 0 0 0 0 : 1 0 0 0 500 : 0 0 0 0 500
disk assign_method 2
disk device Disk 0 0 0 0 1 0 0
disk chart_config Disk 40 1500000 0 1 0 0 : 0 0 0 0 500 : 0 0 0 0 500
disk device sda 0 0 11 0 1 -1 0
disk chart_config sda 40 10 0 1 0 0 : 0 0 0 0 500 : 0 0 0 0 500
disk device sda1 0 0 11 0 1 1 0
disk device sda2 0 0 11 0 1 2 0
disk device sdb 0 0 11 0 1 -1 0
disk chart_config sdb 40 7000 0 1 0 0 : 0 0 0 0 500 : 0 0 0 0 500
disk device sdb1 0 0 11 0 1 1 0
disk device sdb2 0 0 11 0 1 2 0
disk device sr0 0 0 14 0 1 -1 0
disk device fd0 0 0 42 0 1 -1 0
disk text_format $T
inet text_format all    $af $lN$Af $L
inet update_interval all 1
net enables eth0 1 1 1
net chart_config eth0 40 1000 1 1 1 1 : 1 0 0 0 500 : 1 0 0 0 500
net label eth0 Net
net enables lo 0 1 0
net enables ppp0 1 1 0
net chart_config ppp0 40 2000 0 1 0 0 : 0 0 0 0 500 : 0 0 0 0 500
net timer_enabled 0
net timer_seconds 1
net timer_iface none
net timer_on
net timer_off
net text_format D: $rB/s   U: $tB/s
net reset_mday 1
net net_stats_window_height 201
meminfo mem_meter 1 0 0
meminfo swap_meter 0 0
meminfo swap_chart 0 1
meminfo mem_launch
meminfo mem_tooltip
meminfo mem_data_format $t - $f free
meminfo swap_launch
meminfo swap_tooltip
meminfo swap_data_format $t - $f free
meminfo text_format $T
fs fs_check_timeout 2
fs nfs_check_timeout 16
fs auto_eject 0
fs binary_units 1
fs data_format $t - $f free
mail mailbox-local mbox /var/spool/mail/rob
mail mua
mail notify
mail fetch_command
mail remote_check_timeout 5
mail local_check_timeout 4
mail fetch_check_is_local 0
mail msg_count_mode 0
mail animation_select_mode 3
mail fetch_check_only_mode 0
mail reset_remote_mode 0
mail unseen_is_new 0
mail enable 0 0 0 0
mail animation_continuous 0
mail show_tooltip 1
mail mh_seq_ignore 0
battery enable 1
battery enable_composite 1
battery estimate_time 0
battery estimate_time_discharge 1500
battery estimate_time_charge 3000
battery estimate_time_charge_model 0
battery full_cap_fallback 5000
battery poll_interval 5
battery alert_units_percent 0
uptime enable 0
uptime launch
uptime tooltip
gkleds_plugin margin 2 2 2 0
gkleds_plugin size 0 0
gkleds_plugin pm_idx 6 0 7 0 6 1 7 1 6 2 7 2
gkleds_plugin order 1 2 3
gkleds_plugin mb_panel 0

###################################
Disclaimer:- I'm no script wizard by any stretch.
Feel free to post corrections and optimizations.
This is the best I could muster!   :D
###################################
« Last Edit: June 10, 2010, 12:25:45 AM by String6 »