« Infringement notices on the way | Main | Beginning Linux - Part 1 - Getting into Linux »


Conky is, in it's own words, "a free, light-weight system monitor ... that displays any information on your desktop." Sounds pretty dull, right? Well check it out ...








Click on the graphics above
to link to details of how they were done!



Installing Conky's a doddle: just use your package manager. For Ubuntu/Debian users, that means simply typing

sudo apt-get install conky

on the command line.

Once it's installed, you'll need a .conkyrc script in your /home/username folder. Here's a basic one to get  you started ...

# Use Xft? # Use Xft?
use_xft yes
xftfont OFL Sorts Mill Goudy:size=8
xftalpha 0.8
text_buffer_size 2048

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Update interval in seconds
update_interval 1

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_class conky
own_window_type panel
background no
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title conky-semi
own_window_class conky-semi

alignment top_right
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
use_xft yes
xftfont DejaVu Sans Mono:size=8
gap_x 10
gap_y 10
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type desktop
stippled_borders 0

uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

TEXT
${color goldenrod}Hostname: ${color} $nodename
${color goldenrod}Linux Kernel: ${color} $kernel
${color goldenrod}CPU Details: ${color} $machine, $freq(MHz)
$color$stippled_hr
${color}CPU History: ${color darkgreen}${cpugraph 20,0 0000ff 00ff00}
${color}CPU Usage:${color magenta2} $cpu% ${cpubar 6,0}

${color}RAM Usage:${color green} $mem ($memperc%) ${membar 6,0}
${color}Available RAM:${color green} $memmax
${color}Swap Usage:${color yellow} $swap/$swapmax - $swapperc% ${swapbar 4}

${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
$color$stippled_hr
${color}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey} Used: $color$fs_used_perc% ${color grey}Free: $color$fs_free_perc%
${color}Networking:
${color grey}Ethernet: Up:$color ${upspeed eth0} ${color grey} Down:$color ${downspeed eth0}
${color grey}Wireless: Up:$color ${upspeed wlan0} ${color grey} Down:$color ${downspeed wlan0}
$color$stippled_hr
$alignc${color}Processes:$color $processes ${color grey}Running:$color $running_processes
$alignc${color}(top 5 sorted by CPU usage)
${color goldenrod} NAME PID CPU% MEM%
${color} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}

$alignc${color}(top 5 sorted by MEM usage)
${color goldenrod} NAME PID CPU% MEM%
${color} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color} ${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${color} ${top_mem name 5} ${top_mem pid 5} ${top_mem cpu 5} ${top_mem mem 5}
$color$stippled_hr
$alignc${color}System Uptime:${color DarkOrange1} $uptime



Now all you need do is kick off Conky by hitting Alt+F2 and entering conky, or type this on the command line:

conky &

(The ampersand (&) will make it run as a background process.)

Now here's the fun part. Open .conkyrc in a regular text editor and make changes to it. Save those changes, and your display should be updated. Make some more changes, save them, and again you'll see the changes immediately reflected in Conky -- well, within a second anyway. That's what that line;

update_interval 1

is all about. In practice, once you're happy with your setup, you might want to reduce it to only update every five or ten seconds.

And what if the Conky display disappears altogether? Use Undo to undo whatever you last changed in .conkyrc and re-save it or, if it's totally screwed, use Alt+F2 or the command line to enter killall conky and restart from scratch.

For (much) more documentation on settings and features, type

man conky

or

man conky > conky.txt

to copy the manual pages to a file called conky.txt, from whence you can study them at leisure!



Previous Hidden Linux
Next Hidden Linux




Follow Geoff Palmer on Twitter

Comments

@Allan: Hardly a hack. Just a changed link, since updated. But thanks for pointing it out!

I think you have been hacked if you click onto the three graphics in the article you are sent to three different sites offering various products ,one is Zinga, there is no script for the Conky panel.

Fantastic Geoff :) Your instructions worked like a dream, and you're right, I'll be nicely distracted by this all day :)

James

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.