How to Create A Minimal And Beautiful Desktop With Conky

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.

conky-screenshot

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.

Click here to install Conky on your Ubuntu machine. Alternatively, open your terminal (“Applications -> Accessories -> Terminal”) and type:

Once the installation is completed, type in the terminal:

To test if conky is working, in the terminal, type

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.

conky-window

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.

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.

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.

We need to install additional package in order for Conky to display new mail and weather forecast on your desktop.

In your terminal,

Add the following line to the end of the file.

Save and close.

Back to your terminal,

Now, go to Weather.com and sign up a partner account. This will enable you to enquire the weather information in your city.

weather-signup

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.

weather-key

Back to your terminal,

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.

weather.com xml file

Back to your .conkyrc file, scroll down to until you see the line

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.

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.

When you are done with your setting, in your terminal, type

to get it running, and

to terminate it.

Go to “System -> Preferences -> Sessions” and click “Add”. Fill in the field as shown below

conky session setting

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.

conky-screenshot

I am sure you have a much better setup than mine.

69 comments

  1. 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…

  2. 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.

    • 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

    • 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.

  3. 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.

    • 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.

  4. @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.

  5. 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.

  6. 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

  7. 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.

  8. 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}

  9. 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

  10. 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

  11. 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!!

  12. 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!!

  13. 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}

  14. 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!

  15. 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.

  16. 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.

  17. 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.

  18. 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. :)

  19. 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.

  20. 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

  21. 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

  22. 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.

Comments are closed.

Sponsored Stories