Welcome to my blog !

The famous author Arthur Koestler once said that “Creativity is a type of learning process where the teacher and pupil are located in the same individual.” My main purpose for this blog is to depict the little tricks I've learned over time in Computers and my increasing adaptation towards Open Source Software.
More about me... here

January 08 2008

Conky - A light system monitor

Tagged Under : , , , , , , , , ,

There a quite a few ways to view system stats in Linux like CPU or Hard Disk temperature. The usual ways include using gdesklets and screenlets to get the same. Although the benefit of the above is that you get rather neat looking little applets which you can place all over your desktop, they come with the disadvantage of using quite a bit more memory. With the decreasing prices of Memory this shouldn’t be an issue for most. However for those resource conscious folks who would like to view all those system stats at a low memory usage overhead then Conky is definitely the way to go.


I recently learned how to use Conky to monitor the stats of my system and Im pretty pleased with it. Just to make sure that you know what you’re getting into I’ve shown a screenshot of my Conky configuration given below.

Conky My Desktop

Now lets get started in configuring our own Conky. First of all you will need to install Conky from the repositories. You can do this by issuing the following command.
sudo apt-get install conky
Conky uses the file .conkyrc to load the various settings you want monitored on your system. Now you could either start writing your own conky or get a basic configuration listed at one of the sites below. I used the New Vision for Conky which you can get from here.

Theres quite a few scripts that you can use on gnome-look.org or you can get some from the Conky home page itself. For this example we will be using the New Vision of Conky. Download the script and then extract it to your home folder. You should now have a new folder called lukconky . Once we have the script extracted we need tog et the fonts that the script uses as well. In the above conky screenshot all the symbols are actually characters of various fonts. To get those symbols to work w will have to install those fonts to our computer. The fonts required for this conky script are given below. Download them to your lukconky folder.

Font 1: Pizza Dude Bullets
Font 2: Style Bats
Font 3: Weather
Font 4: Xspiralmental

Thanks to Murtaza for gettign the updated links :) .

Extract the above fonts and then run the following command in your terminal.
gksu nautilus fonts://
Using another Window (Use the menu Places > Home Folder) browse to the lukconky folder and copy the fonts that you just extracted and paste them into the nautilus window that just opened up. Lets move on to the configuration part. In the lukconky folder you will notice that there is a file called conky text in there. This is the text that needs to go into the .conkyrc file in your home folder to work. So open that file in gedit (Applications > Accessories > Text Editor ) and then open a new file. Copy and paste the text in the conky text file into the new file. Make sure you save the file using the character encoding “Western” as shown in the picture below.

Save As Screen

Name the file as .conkyrc and then add the following lines to the beginning of the file.
use_xft yes
xftfont verdana:size=8
xftalpha 0.8




You can close out of the file at this point. For .conkyrc to be able to access the temperatures of your Hard Disk and CPU etc you will need the packages lm-sensors and hddtemp installed. You can do this by running the command.
sudo apt-get install lm-sensors
sudo apt-get install hddtemp

Next copy the scripts folder as is from the lukconky folder and paste it in your home folder. There are two files in there which you will need to edit.

check_gmail.sh : In this file you will have to enter your user name and password where it says xxx and yyy respectively. Personally I don’t monitor my gmail like that so I haven’t configured it and have removed the line which access gmail from my .conkyrc file.

pogodynka.sh : This file contains all the weather related settings you will need. You will have to change the location to indicate your location in this file. You can do this to change the line that says kod=PLXX0013 to your location number which you can find by going to http://weather.yahoo.com/ and then browsing to your location. Extract the location ID from the web page address and then replace it in the above line. In my case I used kod=INXX0032 for Cochin, India.
Lets confirm that everything works now. Open up a terminal and then enter in the following command
conky
If everything went well then you should have a similar conky to mine running in your window.

Although this seemed to be a bit intensive to setup . There are quite a few conky scripts you can download which don’t need alot of setup. You can find them at the below sites.
Conky Screenshots and their Configuration

Gnome Look : Search for conky in this page.

Conky Home Page : For Documentation in case you would want to tinker with any settings.

Conky Screenshots with their configurations on Ubuntuforums.org : A huge thread with lots of conky configurations.

Edit: Ive added my conkyrc file that I use here for your use if you need it. Please note that my Conky configuration uses black as the font and does not check for email either. You can download it here.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Slashdot
  • Google
  • E-mail this story to a friend!
  • Print this article!
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
Loading ... Loading ...


Comments:

(52) posted on Conky - A light system monitor

Post a comment