Conky Setup Guide (en)

From Conky PitStop

Jump to: navigation, search


Conky Setup Guide

 Language   English   Français   

For: Debian based systems.
With a touch of OpenSUSE!

Chapter I

Setting Up A Conky

CONKY – Since its original conception, Conky has changed a fair bit from its predecessor. Conky can display just about anything, either on your root desktop or in its own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout.

First you need the file “conky” and I’d suggest you look at curl, lm-sensors and hddtemp as well, described below. You may as well get them now, I’ll bet you will in the future if you don’t:

Debian based distros:

sudo apt-get install conky


Get it
Choose your OS version.
Search for: 1. conky, 2. curl, 3. hddtemp. 4. conkyForecast
Set search options: [X] Include users' home projects  [X] Exclude debug packages
Unfortunately I did not see lm-sensors there.

curl – Get a file from an HTTP, HTTPS or FTP server

curl is a client to get files from servers using any of the supported protocols. The command is designed to work without user interaction or any kind of interactivity.

curl offers a busload of useful tricks like proxy support, user authentication, ftp upload, HTTP post, file transfer resume and more.

lm-sensors – utilities to read temperature/voltage/fan sensors

Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems.

This package contains programs to help you set up and read data from lm-sensors.

Visit the [*" lm-sensors Homepage]

hddtemp – hard drive temperature monitoring utility

The hddtemp program monitors and reports the temperature of PATA, SATA or SCSI hard drives by reading Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.) information on drives that support this feature.

Setting up hddtemp - a little help from Crinos512:

sudo chmod u+s /usr/sbin/hddtemp

To reconfigure hddtemp

sudo dpkg-reconfigure hddtemp

Answers: No, 0, Yes, OK, OK

Now use the conky hddtemp: without -n

${hddtemp /dev/sda}°

If you want all four, it’s easy, in Terminal :

sudo apt-get install conky curl lm-sensors hddtemp

OK, so you have the file(s).

Now to use conky, open a terminal and type:


and you’ll see a little window open and display a basic conky. That’s the default conky found in: /etc/conky/conky.conf

But you want it on your desktop all the time and customized for your system, not in a pop-up window.

I’m going to be using gedit, you may have mousepad or kate. I use Xfce, but have gedit installed because I open multiple files in a tabbed environment. I’m also suggesting a directory and file names, one is hidden, use whatever you like, I’m using my setup here as an example only.

Step 1 – Create a conky

geany ~/Conky/conkymain

geany or any text editor of your choice! I use geany

Believe it or not that’s it, you now have a working (maybe not configured correctly) conky.

In terminal type (the -c is telling conky to load and run the file that follows):

conky -c ~/Conky/conkymain

and you’ll see it, it may not be perfect for your setup, that’s why I suggest you go to the threads mentioned above or even the default file: /etc/conky/conky.conf

The point is, you now have a working conky.

Step 2 – Setting up conky to autostart on boot

1. Create a hidden file ~/

geany ~/
# click to start, click to stop

if pidof conky | grep [0-9] > /dev/null
    exec killall conky
    #sleep 30  # sleep not required for xfce on startup - 30 or more for others
    conky -c ~/Conky/conkymain &
    #conky -c ~/Conky/conkyforecast &

If you are using Gnome or KDE you’ll need to change sleep 0 to sleep 20 or better, depending on your system. This gives your desktop (Metacity, Compiz, etc.) time to load itself and not over write an existing conky. The start conky command will be delayed by that time and not start until after your desktop is running.

I left an extra line in there (commented out: #conky -c ~/Conky/conkyforecast &) for future reference if you ever want to run more than one conky. That’s why I’m suggesting the ~/ here. Once you start with conky, in my opinion, it’s addictive and you may want more than one running. This way you are prepared.

Now you must make ~/ executable. There are two methods:


chmod a+x ~/

File Manager: Right click on ~/ > Properties > Permissions > check the box necessary to make it executable.

OK, so now you have conkymain working and a way to start it and a second one for future reference inside your ~/ file.

Getting Ubuntu to Autostart conky.

In Ubuntu:

   * System -> Preferences -> Sessions -> Startup Programs
   * Click on the ADD button:

In Xubuntu:

   * Applications > Settings > Settings Manager > Autostarted Apps
   * Click on the ADD button:

Continuing in Ubuntu and Xubuntu:

   * Name: Conky <<– anything you want
   * Description: <<— anything you want (mine is blank)
   * Command: <<– see the “Open Icon” click on that. When your home folder shows, right click to show hidden files if not visible … and find the hidden file: … highlight it and click [ OK ].
   * Close
   * Now: [Ctrl]+[Alt]+[Backspace] to restart your session and conky will start in xx seconds, depending on your sleep command.

NOTE: Create a launcher like you would for any other program on your desktop or panel to start/stop conky when you want.

In Kubuntu

I am NOT a KDE user and have never seen it but Crinos512 has come up with an easy way to do this in KDE:

As I promised I have come by to help out on autostarting conky in KDE 4. It actually is just as easy as under Gnome, make your startconky script and make it executable…. as before. Then in the Kick Off panel, click the big blue K, select the Computer tab and then System Settings. In the system settings App select the Advanced Tab and then AutoStart in the top section. Click “Add Script” and browse to your script. Close system settings, you are done.

Well, that looks easy, Thank you Crinos512. Don’t forget to thank him if you need it.

Here’s another one for KDE users by Ng Oon-Ee, for those times when:

    #! /bin/bash
    until [ "$done" = "true" ]
    if [ $(dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/dbus/screen0 org.freedesktop.compiz.list | wc -l) != 0 ]
    DISPLAY=:0.0 conky -c /home/symlinked/Conky/conkymain >/dev/null 2>&1 &
    DISPLAY=:0.0 conky -c /home/symlinked/Conky/conkyclock >/dev/null 2>&1 &
    DISPLAY=:0.1 conky -c /home/symlinked/Conky/conkymain >/dev/null 2>&1 &
    sleep 5;
    exit 0

Obviously, some changes will be needed for your system

Again, Thank you Ng Oon-Ee for your support, and if you find it useful, don’t forget to thank him.

Chapter II

A Multiple Conky Setup

Ok, you have your conky set up, you’ve configured it the way you want it’s working properly for your system.

Now you want to put a second conky on your desktop, for example: weather. If you followed the example above you have a ~/ file with a second entry commented out, called conkyforecast. Uncomment those lines and you are ready to create an run a second conky.

Create that file the same way you created conkymain. When you get the blank file up I “suggest” copying your “conkymain” file into it and deleting everything below TEXT and change the “alignment” line for example:

alignment tr


alignment bl

so they don’t overlap each other.

NOTE: tr = top_right, tl = top_left, bl = bottom_left, br = bottom_right, tm = top_middle, bm = bottom_middle, mr = middle_left and mr = middle_right

Add what ever you want conky to display below TEXT, save it. Then edit the ~/ file removing the # before the line and make sure the last line points to your second file:

    # click to start, click to stop
    if pidof conky | grep [0-9] > /dev/null
     exec killall conky
    #sleep 30  # sleep not required for xfce on startup - 30 or more for others
    conky -c ~/Conky/conkymain &
    conky -c ~/Conky/conkyforecast &

Click on your launcher icon – wait a second – click again and you’ll see the two conkys.

OK that will get you started, now comes the fun part … configuring it to your own personal tastes and machine.

Have a nice day.
Bruce & Uncertain

PS: If you see errors or have other conky resources that you feel might be helpful here please leave a comment.

Sample Conky File

When you install conky for the first time opening a terminal and typing:


will show you a very basic conky in a window, usually at the lower left of your screen.


Obviously this is not what we want. We want a conky sitting on our screens displaying what we have configured. And we must do that in a text editor or our choice, as that’s what conky is, a simple text file without the .txt ending. Although, and I’ve just tested this if you name your conky file with a .txt ending it will still work, but you must call it as so. I renamed my conkymain to conkymain.txt and called it like this:

conky -c ~/Conky/conkymain.txt &

And it did display. So call your conky whatever you want, but use that name to call it to your screen for displaying it.

So here you are, thinking; “I don’t have a conky file, other than that sample.” Well, that sample is called: conky.conf and can be found in etc/conky/conky.conf.

I’ll reproduce it here, if you want to copy and paste it to your first conky to get something started right away. It has some simple changes to start in the upper-right and in it’s own window.

alignment tr
background no
own_window yes
own_window_type override
own_window_transparent yes
background no
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
font 6x10
gap_x 5
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
stippled_borders 0
update_interval 3.0
uppercase no
use_spacer no
show_graph_scale no
show_graph_range no
${scroll 16 $nodename - $sysname $kernel on $machine | }
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
${color grey}File systems:
/ $color${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
${color grey}Name                  PID   CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

Pretty boring isn’t is, but (there is always a BUT isn’t there) that’s why we’re here. To help you “spruce it up” to “tweak it”, “modify it”, “personalize it”, however you want to call it. You’re at the right place!

Personal tools