May 2, 2010

Install Conky And Keep An Eye On Your PC

install conky
Conky is a system monitor displayed in the background on the desktop. It can monitor virtually all the variables of the system: CPU, memory, swap, disk space, temperature (s), upload, download, system messages, and many others. It is extremely configurable, however, the configuration can be a bit difficult to understand.
And this is nice conky configuration file. First you have to download conky, to do this follow this steps.

.1 Add repository to your sources.list by typing this command in terminal:

$sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/m-buck-conky-jaunty.list -O /etc/apt/sources.list.d/m-buck-conky-jaunty.list

2. Get conky repository key:

$wget -q http://www.kaivalagi.com/ubuntu/ppa/m-buck-conky-key.gpg -O- | sudo apt-key add -

3. Update your packages database:

$sudo apt-get update

4. install conky and some other plugins:

$sudo apt-get install conky python-feedparser hddtemp lm-sensors conkyforecast

5. Download some required fonts:

$wget -c http://dl.getdropbox.com/u/83257/conkyfonts.zip

6. Extract the fonts packages:

$unzip conkyfonts.zip

7. Copy extracted fonts to the default fonts directory: 


$cp ~/conkyfonts/*.* ~/.fonts/

8. remove extracted fonts directory:

$rm -rf ~/conkyfonts

9. Remove downloaded package:

$rm conkyfonts.zip

10. Now you need to create a configuration by issuing this command:

$gedit ~/.conkyrc

11. Copy this lines and past them to gedit appearing window:

# conky configuration
use_xft yes
xftfont verdana:size=8
alignment top_right
xftalpha 0.8
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1
default_shade_color grey
default_outline_color black
default_color white
use_spacer none
no_buffers yes
uppercase no
color1 white
color2 white
color3 white
color4 white
color5 white
TEXT
${font Radio Space:size=14}${time %A %d %B %Y}
${font Radio Space:size=55}${time %H:%M}${font}
${color1}${font StyleBats:size=12}2$font GENERAL${hr 3}
${color2}$alignc$nodename - $sysname $kernel
${color2}Uptime:$color $uptime $alignr${color2}Charge:$color $loadavg
${color2}Threads : $color $processes $alignr${color2}En cours : $color $running_processes
${color2}RAM :$color$mem/$memmax - $memperc% ${color3}${membar}
${color2}Swap :$color$swap/$swapmax - $swapperc% ${color3}${swapbar}
${color1}${font StyleBats:size=12}5$font CPU${hr 3}
${color2}Core1 : $color${cpu cpu1}% ${color3}${cpubar cpu1}
${color2}Core2 : $color${cpu cpu2}% ${color3}${cpubar cpu2}
${color white}${cpugraph 143712 13B108}
${color1}${font StyleBats:size=12}O$font RESEAU${hr 3}
${color2}IP Locale : $color${addr eth0}
${color2}IP Passerelle : $color$gw_ip $alignr${color2}Interface Passerelle : $color$gw_iface
${color2}Download : ${color}${alignc}${totaldown br0} $alignr${downspeed br0} k/s
${downspeedgraph br0 143712 13B108 650}
${color2}Upload : ${color}${alignc}${totalup br0} $alignr${upspeed br0} k/s
${upspeedgraph br0 143712 13B108 100}
${color1}${font StyleBats:size=12}Q${font} METEO ${hr 3}
${color2}Le temps à ${time %H}h : ${alignr}Direction du vent :
$color${font ConkyWeather:size=32}${offset 25}${execi 1800 conkyForecast --location=FRXX3798 --datatype=WF}${offset 260}${font ConkyWindNESW:size=40}${execi 1800 conkyForecast --location=FRXX3798 --datatype=BS}${font}
${color2}Vitesse du vent : $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=WS } ${color2} ${alignr}Force : $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=WS --beaufort -L fr}${font}
${color2}T° max : $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=HT } $alignr${color2}T° min : $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=LT}
${color2}Pression : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=BR -L fr} - ${execi 1800 conkyForecast --location=FRXX3798 --datatype=BD -L fr}
${color2}Risque de précipitation : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=PC --startday=0 -L fr}
${color2}Observation : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=CT -L fr}
${color2}Indice UV : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=UI -L fr} - ${execi 1800 conkyForecast --location=FRXX3798 --datatype=UT -L fr}
${color2}Point de rosée : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=DP -L fr}
${color2}Lune : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=MP --locale=fr}
${color2}Ephemerides : $alignr$color${execi 1800 conkyForecast --location=FRXX3798 --datatype=SR -L fr}${font} - ${execi 1800 conkyForecast --location=FRXX3798 --datatype=SS -L fr}
${color2}Les prévisions sur 4 jours :
$color${offset 30}${execi 1800 conkyForecast --location=FRXX3798 --datatype=DW --startday=1 --shortweekday -L fr}${offset 80}${execi 1800 conkyForecast --location=FRXX3798 --datatype=DW --startday=2 --shortweekday -L fr}${offset 75}${execi 1800 conkyForecast --location=FRXX3798 --datatype=DW --startday=3 --shortweekday -L fr}${offset 80}${execi 1800 conkyForecast --location=FRXX3798 --datatype=DW --startday=4 --shortweekday -L fr}
${offset 30}${execi 1800 conkyForecast --location=FRXX3798 --datatype=HT --startday=1 --hideunits --centeredwidth=3 --shortweekday -L fr}/${execi 1800 conkyForecast --location=FRXX3798 --datatype=LT --startday=1 --hideunits --centeredwidth=3 -L fr}${offset 65}${execi 1800 conkyForecast --location=FRXX3798 --datatype=HT --startday=2 --hideunits --centeredwidth=3 --shortweekday -L fr}/${execi 1800 conkyForecast --location=FRXX3798 --datatype=LT --startday=2 --hideunits --centeredwidth=3 -L fr}${offset 60}${execi 1800 conkyForecast --location=FRXX3798 --datatype=HT --startday=3 --hideunits --centeredwidth=3 --shortweekday -L fr}/${execi 1800 conkyForecast --location=FRXX3798 --datatype=LT --startday=3 --hideunits --centeredwidth=3 -L fr}${offset 60}${execi 1800 conkyForecast --location=FRXX3798 --datatype=HT --startday=4 --hideunits --centeredwidth=3 --shortweekday -L fr}/${execi 1800 conkyForecast --location=FRXX3798 --datatype=LT --startday=4 --hideunits --centeredwidth=3 -L fr}
${offset 25}${font ConkyWeather:size=32}${execi 1800 conkyForecast -L fr --location=FRXX3798 --datatype=WF --startday=1 --endday=4 --spaces=5}${font}
${color2}Station météo: $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=OB -L fr}
${color2}Dernière mise à jour: $color${execi 1800 conkyForecast --location=FRXX3798 --datatype=LU}${font}


Replace the city code by the one that you find on weather.com.

Create an account here, to get your access code. Once the account is created you will receive your code via email.

.12 Create the configuration :

$gedit ~/.conkyForecast.config

And add these lines:

CACHE_FOLDERPATH = /tmp/
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %d-%m-%Y
LOCALE = us
XOAP_PARTNER_ID = XXXXXX
XOAP_LICENCE_KEY = XXXXXX

13. Creation of lanching file script:

$gedit ~/conky_start.sh

add the following lines:

#!/bin/bash
sleep 30 &
exec conky -d -c ~/.conkyrc &
exit

14. Make the lanching file executable :

$chmod +x ~/conky_start.sh

15. Now add conky to startup:

Go to the menu Sytems-> Preferences-> Startup applications and click the add button. Indicate the name and command conky / home / [your home] / conky_start.sh

install conky


Author

Anouar Rahil is pro blogger, Linux user, He lives in Salé, Morocco.
Follow Anouar on Twitter or take a look at his Facebook Profile.