Conky is a simple, lightweight system monitor application that can display information on your desktop and allows you to monitor several processes simultaneously. For those who like to keep a minimal desktop, but still want to have quick access to various information such as emails, weather, memory usage etc, then Conky is just the application for you.
While the installation of Conky is easy, configuring it can be a rather troublesome task. Follow this tutorial closely and I am sure you’ll master the trick in no time.
Installation
Open your terminal (“Applications -> Accessories -> Terminal”) and type:
sudo apt-get install conky
Once the installation is completed, type in the terminal:
zcat /usr/share/doc/conky/examples/conky.conf.gz > ~/.conkyrc
To test if conky is working, in the terminal, type
conky
A window will pop up showing all your system information. Other than the background which is your own wallpaper, the information will be the same as the one shown in the image below.
Close the conky window. We are now going to configure it to display the information that we want and also to change its color to match those of your wallpaper.
Configuring Conky
Go to your Home folder (“Places -> Home”). Press Ctrl + H to show hidden files. Scroll down till you found the file “.conkyrc”. Double click to open it in Text editor. This is the main config file that will affect what is showing on your desktop.
Scroll down the list and make sure the following configuration are set properly. Make sure that these settings do not have a ‘#’ in front. If yes, remove them.
background yes use_xft yes xftfont Bitstream Vera Sans Mono:size=8 xftalpha 0.8 update_interval 5.0 total_run_times 0 own_window no own_window_type desktop own_window_transparent yes own_window_colour black own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 280 5 draw_shades yes draw_outline no draw_borders no draw_graph_borders no stippled_borders 8 border_margin 4 border_width 1 default_color white default_shade_color black default_outline_color black alignment top_right gap_x 12 gap_y 12 no_buffers yes uppercase no cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale no use_spacer none text_buffer_size 1024 override_utf8_locale yes
The above configurations are the default setting that I used in my system. When you are more familiar with it, you can change it to suit your needs. When you are done with the configuration setting, leave this aside for a while. We will get back to it later.
Installing the Mail and Weather Forecast package for Conky
We need to install additional package in order for Conky to display new mail and weather forecast on your desktop.
In your terminal,
gksu gedit /etc/apt/sources.list
Add the following line to the end of the file.
deb http://ppa.launchpad.net/m-buck/ubuntu hardy main
Save and close.
Back to your terminal,
sudo apt-get update sudo apt-get install conkyemail conkyforecast
Configuring Weather Forecast
Now, go to Weather.com and sign up a partner account. This will enable you to enquire the weather information in your city.
Once you have signed up, check your mailbox for the confirmation email. Scroll down the mail until you see your Partner ID and License key.
Back to your terminal,
sudo cp /usr/share/conkyforecast/conkyForecast.config ~/.conkyForecast.config gedit ~/.conkyForecast.config
Fill in the “XOAP_Partner_ID” and “XOAP_License_key” fields with the information from the confirmation email. Save and exit.
On your browser, go to http://xoap.weather.com/search/search?where=YOUR_CITY and replace “YOUR_CITY” with the name of your city. You will see a xml similar to the image below. Record down the id. This is the identifier for your city and you will need it later on.
Putting all together
Back to your .conkyrc file, scroll down to until you see the line
# stuff after 'TEXT' will be formatted on screen
TEXT
As stated in the statement, anything that is placed under the word TEXT will be displayed on the screen. There is a certain syntax that you need to follow to get it to display correctly and beautifully.
The following is my configuration. You are free to copy and modify.
TEXT ${font Radio Space:size=30}${color5}DAMIEN PC ${voffset -20}${color1}$hr ${voffset -20}${font Radio Space:size=14}${color1}${time %A %d %Y} ${font Radio Space:size=55}${color1}${time %H:%M} ${voffset -15}${font ConkyWeather:size=36}c ${font Verdana:size=15}${voffset -5}${execi 3600 conkyForecast --location=SNXX0006 --datatype=LT} / ${execi 3600 conkyForecast --location=SNXX0006 --datatype=HT} $stippled_hr ${font Verdana:style=Bold:size=9}${color1}Yahoo: ${font Verdana:size=8}${execi 600 conkyEmail --servertype=POP --servername=pop.mail.yahoo.com --username=xyz --password=xyz --ssl} new emails ${font Verdana:style=Bold:size=9}${color1}Gmail: ${font Verdana:size=8}${execi 600 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=xyz --password=xyz --ssl} new emails $stippled_hr ${font Verana:style=Bold:size=9}CPU1: ${font Verana:size=8}${cpubar cpu1 10,150} ${cpu cpu1}% ${font Verana:style=Bold:size=9}CPU2: ${font Verana:size=8}${cpubar cpu2 10,150} ${cpu cpu2}% ${font Verana:style=Bold:size=8}Name PID CPU% MEM% ${font Verana:size=8}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5} ${font Verana:style=Bold:size=9}RAM: ${font Verdana:size=8}${mem} / ${memmax} (${memperc}%) ${font Verana:style=Bold:size=9}SWAP: ${font Verdana:size=8}${swap} / ${swapmax} (${swapperc}%) $stippled_hr ${font Verana:style=Bold:size=9}IP Address: ${font Verana:size=8}${gw_ip} ${font Verana:style=Bold:size=9}Total Download: ${font Verana:size=8}${totaldown eth1} ${font Verana:style=Bold:size=9}Total Upload: ${font Verana:size=8}${totalup eth1} ${font Verana:style=Bold:size=9}Up Speed: ${font Verdana:size=8}${upspeed eth1} Kb/s ${font Verana:style=Bold:size=9}Down Speed: ${font Verdana:size=8}${downspeed eth1} Kb/s $stippled_hr ${font Verana:style=Bold:size=9}To Do List ${font Verana:size=8}${execi 30 cat /home/damien/TODO.txt}
Some of the commonly used syntax involve:
${font Verdana:style=Bold:size=12} – This means setting the displayed font to “Verdana” of size 12 and bold. You can modify the font or the size to suit your desktop. A thing to note is that it only supports fonts that are installed in your system. To get new fonts, you can go to dafont.com and download your favorite fonts at no charge at all.
${execi 3600 …} – The “execi” syntax allows you to execute external scripts. Note that we use the execi syntax to check your email address, weather forecast and also to read a TODO list file and output to the screen. The number behind the “execi” determines the interval (in sec) for Conky to execute the scripts.
$hr / $stippled_hr – This is to insert a horizontal line in the screen. The “$stippled_hr” syntax refers to a dotted line.
${execi 3600 conkyForecast --location=SNXX0006 --datatype=LT}
– This is the execution code to retrieve Weather information from Weather.com. Note that you need to replace the --location=xyz
by your city’s identifier.
${execi 600 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=xyz --password=xyz --ssl}
– This is the execution code to retrieve information from your Gmail and Yahoo mail account. To enable IMAP service, you will need to enable the IMAP setting in your Gmail account (“Settings -> Forwarding and POP/IMAP”)
${execi 30 cat /home/damien/TODO.txt} – This is the execution code to read my TODO list file located in my Home folder and display it on the screen
For more information on the syntax, check out the Conky variable site.
Testing out your Conky
When you are done with your setting, in your terminal, type
conky
to get it running, and
killall conky
to terminate it.
Start Conky everytime you log in
Go to “System -> Preferences -> Sessions” and click “Add”. Fill in the field as shown below
Conky will now load up automatically next time you log in to your system.
This is a screenshot of my Conky setup. Not really the best, but it does clean up my desktop in an elegant style.
I am sure you have a much better setup than mine.
Useful resources
- Conky variables
- Conky config setting
- Conky documentation
- My .conkyrc file (Right click and select Save Link As. Rename the file to .conkyrc and place it in your home folder)
- Ubuntu Forum
69 comments
Comments are closed.
Thanks for this usefull howto, I will add the weather part to my own conky-setup.
Grate blog.
I always enjoy reading and learning new stuffs. That is the reason that I really like this site. I have to confess that you make me want to create my own blog to share new and amazing things everyday. I always follow all your howto. Thanksss
Keep going…
Thank you so much for your howto, I was having trouble setting up the weather and email applications, but your howto really helped. Thanks again.
Great article. One question: Where do you get your Radio font from?
I got the Radio font from dafont.com. You can find it at http://www.dafont.com/radio-space.font
Thanks a million Damien,
awesome script, awesome font.
will be using both.
Where did you get the background from?
I don’t remember where I downloaded it from. I have uploaded it to the server. If you want it, you can download it from here
Does it affect your desktop icons? I tried installing it and all my desktop icons are blinking
Yes. That is most likely due to the conflict between Compiz and Conky. Change your .conkyrc setting to the following:
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
and see if it works.
yes that works! thanks.
Really need your name that big?
do you often forget its your computer?
good tutorial
i am a linux newbie so am looking forward to learning something with this
just one question where did you obtain the theme for your desktop i love the transparency and would like to do something like that myself
No theme is required to make the panel transparent. Simply right-click on the panel, select Properties. In the background tab, check Solid color and drag the slider all the way to the left. That’s it.
Wow, that is some pretty cool stuff.
jess
www.privacy-tools.at.tc
How do you get the weather to show US degrees F etc?
Change the weather line to this:
${voffset -15}${font ConkyWeather:size=36}c ${font Verdana:size=15}${voffset -5}${execi 3600 conkyForecast -i –location=SNXX0006 –datatype=LT} / ${execi 3600 conkyForecast -i –location=SNXX0006 –datatype=HT}
What I would like to know is how to get rid of those A symbols showing up in the temperature. They aren’t in the conkyForecast command-line output.
set override_utf8_locale yes
To remove the A you need to change
override_utf8_locale no
to
override_utf8_locale yes
what to do for fedora,opensuse,gentoo????Is UBUNTU the only linux existing…………
Sheesh. That’s UNCOMPLICATED? No wonder Linux hasn’t gone beyond 1% market share.
@gnuboi
if you don’t know how to get conky for fedora/opensuse/gentoo you might want to read the documentation on the conky site. It’s remarkably straight forward.
gnuboi, http://letmegooglethatforyou.com/?q=conky+on+fedora+howto
There shouldn’t be a great deal of variation amongst Linux distributions, and is available on FreeBSD as well…
gnuboi
http://letmegooglethatforyou.com/?q=conky+fc10
http://conky.sourceforge.net/
Hi,
Install was not an issue but getting weather to work is. I am on kubuntu 8.04 hardy. What am I missing? I cut and pasted your weather lines and changed the “loc id” and thats all. Otherwise I like it.
Conky: desktop window (180000f) is subwindow of root window (1a6)
Conky: drawing to desktop window
Conky: drawing to double buffer
Traceback (most recent call last):
File “/usr/share/conkyforecast/conkyForecast.py”, line 1302, in
weather = Weather(options)
File “/usr/share/conkyforecast/conkyForecast.py”, line 453, in __init__
self.options.locale = locale.getdefaultlocale()[0][0:2]
TypeError: ‘NoneType’ object is unsubscriptable
Traceback (most recent call last):
File “/usr/share/conkyforecast/conkyForecast.py”, line 1302, in
weather = Weather(options)
File “/usr/share/conkyforecast/conkyForecast.py”, line 453, in __init__
self.options.locale = locale.getdefaultlocale()[0][0:2]
TypeError: ‘NoneType’ object is unsubscriptable
@Phil:
1) Check your conky forecast configuration. Did you fill in the XOAP_Partner_ID and XOAP_License_key fields .conkyForecast.config file?
2) Check your code. Did you put a double dash – – infront of the location and the datatype?
Damien,
Thank you. I double checked and when I cut and pasted your text above the dashed came out as one dash. So I edited the file and placed the right amount of dashes and it work as you said it would. Thank you for making me pay better attention to what I was doing.
Excellent article and app.
Nice conky tutorial,ive seen a lot around,and i must say that this one is pretty nice and easy or new users
I never thought about using a mail script,i don’t think i need it that much
The days that i was trying to get the weather script to work were the worst,and you got it all easy and simple :)
i didn’t think ill see a flame about how linux being out of the market and all
all got to say is that linux is linux,and the other OS’s are what they are,no one is demanding for it to be easy or different,or where will be the option in choosing your OS ??
anyway,here is my setup,enjoy :)
http://img514.imageshack.us/img514/7574/screenshotaw7.png
So… On the net many like this how-to. Nothing new.
anybody have a link for the leaves picture?
You can download it at http://images.maketecheasier.com/2008/12/leaf.jpg
what to do for fedora,opensuse,gentoo????Is UBUNTU the only linux existing…
Sheesh. That’s UNCOMPLICATED? No wonder Linux hasn’t gone beyond 1% market share…
So… On the net many like this how-to. Nothing new…
Great write up & better looking desktop. One question: what’s the story with the little A-hat between the temp and the *C?
I’ve followed along and have the same problem.
@Luke: In your .conkyrc file, add this line
override_utf8_locale yes
in the config section.
This looks great. One question, How do I change from celsius to ferenhedt (<–Spelling ??)?
I do not see anything obvious in the scripts.
Thanks,
Mike
I added “–imperial” in the template and others. It works for me.
$${execi 1800 conkyForecast –location=UKXX0103 –datatype=HT –imperial}
I’ve use conky, but just simple display..
I’d like to add congky forecast, but when i did
gedit ~/.conkyForecast.config to input partner & license key…
I got problem to save the confiq, system said “you have no authorize”.
Can u help me?Thx
Try the command:
sudo gedit ~/.conkyForecast.config
This should work.
Thx Dude…
It’s worked out..
by the way, i saw conky desktop from
Conky config
http://gnome-look.org/content/show.php/new+vision+of+conky?content=70929
Could you make tutorial for it?
when can I get the conky icons..
Thanks for the tutorial. I was going to gradually modify my conkyrc with bits from yours so that I could understand what each bit does (rather than copy and pasting) but fell at the first hurdle, the Radio Space font doesn’t display, do I need to download it?
cheers
matt
ignore this, sorry!
got it working.
Hi there,
Many thanks for the tutorial. I have a bit of a problem with viewing the temp’s. All I get under the conky time is a big “C” and space and then “/” that’s it. What did I do wrong??
Also my desktop icons are hidden since running conky, they only show up if a hover the mouse over them.
Many thanks!!
Hi Damien,
All working fine but the degree C in the weather. All I get it’s upside down exclamation. How do I correct this?
many thanks!!
In the conky config file, make sure you include this line:
override_utf8_locale yes
Thanks Damien , that line is already in my conkyrc file.
Here’s my conky, I just copy/paste don’t know if it will paste the whole thing:
# Conky configuration
background yes
use_xft yes
xftfont Bitstream Vera Sans Mono:size=9
xftalpha 0.8
update_interval 5.0
total_run_times 0
own_window no
own_window_type desktop
own_window_transparent yes
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_margin 2
border_width 1
default_color white
default_shade_color black
default_outline_color black
alignment middle_right
gap_x 12
gap_y 0
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_xft yes
use_spacer none
show_graph_scale no
show_graph_range no
text_buffer_size 1024
color1 white
color2 6892C6
color3 E77320
color4 78BF39
color5 3B3B3B
# stuff after ‘TEXT’ will be formatted on screen
TEXT
${font Zero Threes:size=30}${color5}ADI’S PC
${font Zero Threes:size=17}${color5}Ubuntu Ultimate 2.0
${font Zero Threes:size=14}${color5}$nodename -$sysname $machine
${font Zero Threes:size=14}${color5}$kernel
${voffset -20}${color1}$hr
${voffset -20}${font Zero Threes:size=14}${color1}${time %A %d %Y}
${font Zero Threes:size=55}${color1}${time %H:%M}
${voffset -15}${font ConkyWeather:size=36}c ${font Zero Threes:size=15}${voffset -5}${execi 3600 conkyForecast –location=UKXX0309 –datatype=LT} / ${execi 3600 conkyForecast –location=UKXX0309 –datatype=HT}
$stippled_hr
${font Zero Threes:style=Bold:size=9}CPU1: ${font Zero Threes:size=8}${cpubar cpu1 10,150} ${cpu cpu1}%
${font Zero Threes:style=Bold:size=9}CPU2: ${font Zero Threes:size=8}${cpubar cpu2 10,150} ${cpu cpu2}%
${color1}${font Zero Threes:size=9}${top_mem name 2}${alignr}${top mem 2} %
${font Zero Threes:size=9}${top_mem name 3}${alignr}${top mem 3} %
${font Zero Threes:size=9}${top_mem name 4}${alignr}${top mem 4} %
${font Zero Threes:size=9}${top_mem name 5}${alignr}${top mem 5} %
${font Zero Threes:style=Bold:size=9}RAM: ${font Zero Threes:size=8}${mem} / ${memmax} (${memperc}%)
${font Zero Threes:style=Bold:size=9}SWAP: ${font Zero Threes:size=8}${swap} / ${swapmax} (${swapperc}%)
$stippled_hr
${font Zero Threes:style=Bold:size=9}IP Address: ${font Zero Threes:size=8}${gw_ip}
${font Zero Threes:style=Bold:size=9}Total Download: ${font Zero Threes:size=8}${totaldown eth0}
${font Zero Threes:style=Bold:size=9}Total Upload: ${font Zero Threes:size=8}${totalup eth0}
${font Zero Threes:style=Bold:size=9}Up Speed: ${font Zero Threes:size=8}${upspeed eth0} Kb/s ${font Zero Threes:style=Bold:size=9}Down Speed: ${font Zero Threes:size=8}${downspeed eth0} Kb/s
$stippled_hr
${font Zero Threes:size=9}${color1}Rhythmbox 0.11.6
${font Zero Threes:size=9}${color1}Playing:
${exec rhythmbox-client –print-playing –no-start}
$stippled_hr
${font Zero Threes:style=Bold:size=9}To Do List
${font Zero Threes:size=8}${execi 30 cat /home/adi/TODO.txt}
One more thing, what do I need to display HDD, CPU, RAM temp wih your ppa?
Cheers mate!
there is a built in hddtemp option now, you can look it up on the http://conky.sourceforge.net/variables.html page :)
I got it working, the “!” was because of the font I was using. Still trying to get the HDD and CPU temp working.
Great job mate!
Is there a way to swap the temperatures to Farenheit?
As the creator of the original ConkyWeather, but not the version you are using. I can tell you that the reason for the A before the degree symbol is a result of your choice of fonts. In my ConkyWeather you could select the units. If you look at the script that you are using and your find the url that it grabs the data from, you will notice an _c or _f change it to the unit you would like.
I was not able to find a conkyrc (.conkyrc) anywhere. I did however find conky.conf in /etc/conky/conky.conf
conky version 1.6.1-0ubuntu3
Ubuntu 8.10
Did you extract the conky.conf.gz file to your home folder (zcat /usr/share/doc/conky/examples/conky.conf.gz > ~/.conkyrc)?
In Nautilus, you have to press Ctrl + H to display all the hidden files. You should be able to find it there.
found it thanks, bad eyes or something. Searches didnt seem to bring anything up, even if hidden files were included. dunno what i was doing.
Did you extract the conky.conf.gz file to your home folder (zcat /usr/share/doc/conky/examples/conky.conf.gz > ~/.conkyrc)?
In Nautilus, you have to press Ctrl + H to display all the hidden files. You should be able to find it there.
can i edit the email to check my comcast account its a pop3 and if so what needs to be edited…….. thaanks in advance
I do not have a comcast account and have not tried it on conky. Nevertheless you can try it out by editing the following line:
${execi 600 conkyEmail –servertype=POP –servername=your-pop-address.com –username=xyz –password=xyz –ssl}
Let me know if it works or not. :)
Damien that was first thing i tried to edit, but did not work, id be glad to create you temp. email accont if youd assist me
if not thnx for the rapid reply….. its one of the things i hard about using this os is everyone responds and helps each other out.. agian thnx
http://ubuntuforums.org/showthread.php?t=869771 has all of the settings for conkyEmail :)
remove the “–ssl” as mine worked after that :)
I finally have everything configured as prescribed, but after I copy and paste your code and run Conky I get this: mike@mike-laptop:~$ conky
Conky: /home/mike/.conkyrc: 110: no such configuration: ‘stu’
Conky: desktop window (14000a9) is subwindow of root window (77)
Conky: window type – normal
Conky: drawing to created window (0x3800001)
Conky: drawing to double buffer
Conky: MPD error: problems getting a response from “localhost” on port 6600 : Connection refused
Conky: MPD error: problems getting a response from “localhost” on port 6600 : Connection refused
Conky: attempting to use more CPUs than you have!
obj->data.cpu_index 2 info.cpu_count 1mike@mike-laptop:~$
If you could offer any help it would be greatly appreciated because I would really like to use this for my desk top.
Very nice explanation of how to set up conky. Thanks.
Hello,
Nice post !
As a complement, you might be interested in a post I’ve just written about conky, which demonstrate the “execpi” directive.
This directive makes it easy to extend Conky by writing scripts. Those scripts simply have to output conky configuration directive, which will be parsed and executed.
I’ve used that mechanisme to demonstrate how to monitor your rTorrent downloads progress :-)
Hope you’ll find that useful !
http://www.sakana.fr/blog/2009/10/11/conky-integrating-rtorrent-downloads-monitoring/
Stéphane
Great thanx! The only problem I have is that conky covers the icons it has behind, I would love to have icons over conky. I know conky does not do real transparency, but can this be achieved somehow?
Thanx in advanced.
By the way, I have this settings:
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,stciky,skip_taskbar,skip_pager
try
own_window_type normal
Hello,
Cana nyone tell me how to get teh statusbar of teh CPU, RAM and SWAP to be the same size?
Thank you all in advance.
By that link you will find my conkyrc file and screenshot of teh desktop: http://docs.google.com/leaf?id=0B9tjv_1T0fPtYjYxYjg5N2MtMWNkYy00MDYyLWE1MGUtMDY0MDJjNTU1YmM2&hl=en
The zcat command only seemed to mess up the config on my machine (Ubuntu 9.10). Conky wouldn´t start afterwards, strangely also after a reinstall.
This can be fixed by running the command ‘conky -C > ~/.conkyrc’, which creates a default config.