HAVE you ever looked at screengrabs of other people's computer desktops on Google or in Linux forums and wondered: "How do they get that cool text on their desktop?"
The answer - or at least one of the answers (because there's more than one way to do it) - is Conky.
It's nothing to do with horse chestnuts and everything to do with monitoring what's going on in your computer.
Conky is a small application that provides a simple, low-resource way to monitor basically anything you want, from swap memory use, to disk space, to the MP3s you're playing, to the number of processes running or network traffic - you name it, Conky can monitor it.
However, Conky is one of those programs that tends not to come set up for you, so there's a DIY element involved.
You don't need to be an expert programmer or hacker to get Conky running just how you like - I'm not, and I did!
You see, Conky is controlled by a fairly simple text-based configuration file which lives in your Home folder.
But I'm jumping ahead of myself: First, let's deal with actually acquiring Conky.
I've got it installed on two machines: One runs Vector Linux 5.9 and Fluxbox, the other Parsix (Debian-based) and GNOME, and in both cases the distribution repositories had Conky available for downloading.
If your distribution doesn't have Conky then the program's home page is here and you can download platform-independent source code for the latest version, Conky 1.5.1.
Then it's a case of compiling the software yourself in the usual manner: There's a useful guide on how to do this here and here.
Anyway, let's assume that by one method or the other, you now have Conky installed.
There's little point looking for it in your menu, unless it came pre-installed with your distribution and those nice developers created a shortcut there for you (like the guys behind antiX do - see review below).
No matter, pretty much every distro has a menu entry enabling you to run programs by just entering their name - helpfully, the menu entry's usually called 'Run'!
Alternatively, you can create a launcher on your desktop - this is easily done in both KDE and GNOME by right clicking anywhere on your desktop and selecting the 'Create Launcher' option.
Another way of getting Conky running is by launching a terminal and entering a simple 'conky' command (without the quote marks).
Whichever way you achieve it, when you first run Conky it will contain a series of default monitors like the one shown here (from the Parsix/Debian repository).
If you're happy with the default settings, then lucky you - I hope you and your Conky are very happy together.
I wasn't, and set about working out how to change them.
Here's where we roll our sleeves up, because the default configuration files for Conky can take a bit of finding.
The file you're looking for is '.conkyrc' and, if you're lucky, it will be one of the Hidden Files sitting in your Home folder (though this is only likely if Conky was a) pre-installed and b) customised by your developers).
In the majority of cases, you have to dig into your system folders for a sample configuration file (usually something like .conkyrc-sample) and copy it into your Home folder, renamed as '.conkyrc'.
Which folder you'll find the sample config file in may vary according to your distribution - by way of an example, in Vector Linux I found it in /usr/doc/conky-1.5.1, while in Parsix it was in /usr/share/doc/conky/examples.
Here's a copy of my Parsix sample configuration file - the one that produced the basic Conky shown above. Take some time to scan it and try to see what it's doing and how:
# Conky sample configurationNow take a look at this screenshot of my Vector Linux/Fluxbox machine - notice how different Conky looks?
#
# the list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
# set to yes if you want Conky to be forked in the background
background no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=8
# Text alpha when using Xft
xftalpha 0.8
# Print everything to stdout?
# out_to_console no
# MPD host/port
# mpd_host localhost
# mpd_port 6600
# mpd_password tinker_bell
# Print everything to console?
# out_to_console no
# mail spool
mail_spool $MAIL
# Update interval in seconds
update_interval 5.0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
# If own_window is yes, you may use type normal, desktop or override
own_window_type normal
# Use pseudo transparency with own_window?
own_window_transparent yes
# If own_window_transparent is set to no, you can set the background colour here
own_window_colour hotpink
# If own_window is yes, these window manager hints may be used
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 280 5
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders yes
# Draw borders around graphs
draw_graph_borders yes
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black
# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
alignment bottom_left
#alignment bottom_right
#alignment none
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 12
gap_y 12
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
# Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)
#max_port_monitor_connections 256
# Maximum number of special things, e.g. fonts, offsets, aligns, etc.
#max_specials 512
# Maximum size of buffer for user text, i.e. below TEXT line.
#max_user_text 16384
# Timing interval for music player thread, e.g. mpd, audacious
#music_player_interval (update_interval is default)
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
# stuff after 'TEXT' will be formatted on screen
TEXT
$nodename - $sysname $kernel on $machine
$stippled_hr
${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg
${color lightgrey}CPU Usage:${color #cc2222} $cpu% ${cpubar}
${color red}${cpugraph 0000ff 00ff00}
${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% ${membar}
${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes
$color$stippled_hr
${color lightgrey}Networking:
Down:${color #8844ee} ${downspeed eth0} k/s${color lightgrey} ${offset 80}Up:${color #22ccff} ${upspeed eth0} k/s
${color #0000ff}${downspeedgraph eth0 32,150 ff0000 0000ff} ${color #22ccff}${upspeedgraph eth0 32,150 0000ff ff0000}
${color lightgrey}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar /}
${color #88aadd}MPD: ${alignc}$mpd_artist - $mpd_title
${color #88aadd}$mpd_bar
${color #88aadd}${alignc}$mpd_status
${color}Name PID CPU% MEM%
${color #ddaa00} ${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}
${color}Mem usage
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
$stippled_hr
${color #ddaa00}Port(s)${alignr}#Connections
$color Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}ALL: ${tcp_portmon 1 65535 count}
${color #ddaa00}Inbound Connection ${alignr} Local Service/Port$color
${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
${color #ddaa00}Outbound Connection ${alignr} Remote Service/Port$color
${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
Here, then, is the heavily edited .conkyrc for that version:# Conky sample configurationA close read will reveal the different colour coding for the readouts as opposed to the plain white of the section headings.
#
# the list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
# set to yes if you want Conky to be forked in the background
background no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=12
# Text alpha when using Xft
xftalpha 0.8
# Print everything to stdout?
out_to_console no
# MPD host/port
# mpd_host localhost
# mpd_port 6600
# mpd_password tinker_bell
# Print everything to console?
# out_to_console no
# mail spool
mail_spool $MAIL
# Update interval in seconds
update_interval 5.0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window no
# If own_window is yes, you may use type normal, desktop or override
own_window_type normal
# Use pseudo transparency with own_window?
own_window_transparent yes
# If own_window_transparent is set to no, you can set the background colour here
# own_window_colour hotpink
# If own_window is yes, these window manager hints may be used
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 280 5
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
# draw_borders no
# Draw borders around graphs
# draw_graph_borders yes
# Stippled borders?
# stippled_borders 8
# border margins
# border_margin 4
# border width
# border_width 1
# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black
# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
alignment middle_left
#alignment bottom_center
#alignment none
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 12
gap_y 12
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
# Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)
#max_port_monitor_connections 256
# Maximum number of special things, e.g. fonts, offsets, aligns, etc.
#max_specials 512
# Maximum size of buffer for user text, i.e. below TEXT line.
#max_user_text 16384
# Timing interval for music player thread, e.g. mpd, audacious
#music_player_interval (update_interval is default)
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
# stuff after 'TEXT' will be formatted on screen
TEXT
$nodename - $sysname $kernel on $machine
$stippled_hr
${color white}Uptime:${color #cc2222} $uptime ${color white} Load:${color #cc2222} $loadavg
${color white}CPU Usage:${color #cc2222} $cpu%
${color white}RAM Usage:${color #cc2222} $mem/$memmax - $memperc%
${color white}Swap Usage:${color #cc2222} $swap/$swapmax - $swapperc%
${color white}Processes:${color #cc2222} $processes ${color white}Running:${color #cc2222} $running_processes
${color white}Networking: Down:${color #cc2222} ${downspeed eth0} k/s${color lightgrey} ${offset 10}Up:${color #cc2222} ${upspeed eth0} k/s
${color white}File systems: Root${color #cc2222} ${fs_used /}/${fs_size /}
If all else fails and you can't find your own .conkyrc-sample, there's a default one here.
Now, there are as many ways of configuring Conky as there are Linux users, and to prove it, here are some screengrabs I harvested from the internet:

I found two different ways of doing this, one in Fluxbox, the other in GNOME (see footnote).
In Fluxbox, you need to enable 'Hidden Files' in the 'View' section of your file browser, then double click on the '.fluxbox' folder.
In there you'll find all your Fluxbox configuration files but the one we want is '.fluxbox/init'. Open that with your text editor (as user, as this is a user-only configuration) and look for the line 'session.screen0.rootCommand:' and add 'conky &' to it, then save the file and reboot.
When your desktop reloads you should see your Conky display on your desktop.
In GNOME I did things differently: Click on System>Preferences>Sessions and, under the 'Startup Programs' option, click 'Add' and enter 'Conky' for the title and 'conky' for the command (plus a description, if you like).
Click 'OK', reboot and Conky should be sat waiting for you when GNOME boots up.
So there you go, with a little digging around, a bit of config file editing and trial and error, you too can have that cool text output on your desktop... enjoy!
FOOTNOTE: During my research for this article I found LOTS of suggested ways of autostarting Conky - some may work, some definitely don't, just do your own research and don't be afraid to try a few ways to find the right one for you. The methods I've mentioned worked for me but I'm not claiming they are the only/best way.
NB I just stumbled upon a very good article on Linux.com about Conky - well worth a read. It's here
10 comments:
Steve,
“He Stoops to Conky: A Quick Guide” is a “Great Read” and “Most Informative”.
You’ve inspired me to roll up my sleeves and tap out some fresh fun code.
Walt
Steve,
To view some more eye candy Conky style try a spin of Epidemic GNU/Linux 2.1 Live CD. If you think Famelix is a good work, or not, you will admire the progress of this Distro that is moving on the Ease of Use track of success.
A feature that is really slick, is the ease in which you can connect either your Wi- Fi or 10-100 (remember many have given up on Linux because they "Just could not get connected". Just click on the KNetworkManager in the TaskBar and watch it Just Work, this is the ease of use that will hurtle Linux Distros into the future. This may not be new to you but it is the first time I have seen this. I have focused on Small Distros for my current needs (remember I usually just run a Puppy Flash USB Stick) but since I had some time on my hands I thought I would try some of the newest developed Live CDs available.
Famelix 2.1 and Epidemic 2.1 will be in my knapsack to pass on to the "Proud to Be Linux Users" that I run into throughout my travels.
Walt Was Here 8o)
so many codes. haha. i do not understand the syntax. hehe
@ Did You Know?
"so many codes. haha. i do not understand the syntax. hehe"
Neither did I at first so I just kept changing things and restarting Conky to see what effect it had - sometimes none, sometimes dramatic!
The lines beginning with a # are what's known as 'commented out' - they contain information to help you configure Conky, but not code which appears when it's running.
Just play around and you'll soon get the hang of it - if I can do it, anyone can!
Beware http://didyouknow.blogsome.com/ is monitored by NSA (No Such Agency).
Users are not hidden. 8o)
thanks red devil!!!
http://www.designhelp4you.blogspot.com/
http://ebookhelper.blogspot.com/
http://www.softwarecomplex.blogspot.com/
* ADO.NET (1)
* AdSense E-Book (2)
* Affiliate Ebook (3)
* AJAX (6)
* ANT (1)
* Archaeology ebooks (4)
* Architecture ebooks (4)
* Autobiography (2)
* Biography (5)
* Biotechnology (1)
* Business (6)
* C++ (1) (1)
* Civil Engineering Ebooks (3)
* Clinical (2)
* Comics (2)
* Communication Technology (2)
* Computer (8)
* Computer Hacking (2)
* Computer IT ebooks (2)
* Computer Magazines (1)
* Concept of Art (3)
* CookBook (1)
* Design Interior ebooks (3)
* Education ebooks (1)
* Electrical Engineering (2)
* Engineer (2)
* Engineering ebooks (2)
* Finance ebooks (2)
* For Dummies (12)
* Graphic Design ebooks (2)
* History (4)
* HTML (1)
* Insurance ebooks (2)
* Internet Marketing ebooks (2)
* Java ebooks (2)
* Java Script (4)
* Language ebooks (2)
* Law ebooks (2)
* Magazine (2)
* Magazine for Adult (1)
* Manga Comics (1)
* Mechanical Engineering (2)
* Medical ebooks (2)
* Money (1)
* Motivation ebooks (2)
* Net (19)
* Networks (3)
* Non Fiction ebooks (1)
* Novels (3)
* Photo (2)
* Physics ebooks (1)
* Psychology ebooks (2)
* Science (8)
* Social (1)
* Software Ebook (3)
* Software Testing (19)
* Technology (2)
* Travel (2)
* Tricks (2)
* VC++.Net (1)
* Vista (5)
* Web Development (6)
* Wireless (3)
* Write and Langguage (6)
* XML (1)
Users new to Conky might benefit from reading this: http://conky.sourceforge.net/documentation.html . Also, try running "man conky" in a terminal.
I don't really see any to reason to first tell the reader to look for the conkyrc-sample on their system somewhere, and then later provide a link to the sample file. I searched the web for "conkyrc" and found nothing but forums with costum made .conkyrc files.
I'm running Xubuntu; to autostart apps go to Xubuntu Menu -> Settings -> Settings Manager and click "Autostarted apps". For some reason Conky started several processes on my machine, even though I had only added it once to the autostarted apps. To fix this I did not execute Conky simply with the command "conky", instead I used the following command:
if [[ ! $(ps axc | grep conky) ]]; then conky; fi
This way you only start Conky, if it is not already running.
Hey, nice post thanks! On the fluxbox screenshot, what did you use for the icons? Is that just a transparent panel of some sort? Cheers.
Idesk - it came with the distro. Check it out here: http://idesk.sourceforge.net/wiki/index.php/Main_Page
Post a Comment