Disclaimers and such.
----------------------
UPDATE: Conky 1.4.5 is now in the feisty repos. If you run feisty, it would probably be better to install using apt-get or synaptic
This is my first how to and it's really just a compilation of information I found on these forums. There are a number of good how-tos but it seemed I was looking here and there for everything. Hopefully this will simplify the situation. I also hope there isn't something like this already - I did try to find one. With any luck this might save others some time so here goes.
In case you are unaware, conky is a lightweight system monitor that displays on your desktop. See the screenshots below.
There could very well be some mistakes here or steps I gloss over and shouldn't so if anyone has suggestions for improvement please post and I'll amend.
These instructions are for installing the newest (at the time of writing) conky 1.4.5 from source on Ubuntu-Edgy. This is a simple program so it should work on other versions as well. This was much easier than I thought so don't be afraid.
There is an excellent how to for conky 1.4.2 here so you might try that first. That version of conky works very nicely but 1.4.5 seems a bit faster and has some features for formatting that I found particullary useful for what I wanted (particularly the goto option for layout). The rest of the info came primarily from here. Thanks crimesaucer.
In order for CPU temps and other hardware sensing to work you will probably need to configure lm-sensors. Here is a good how-to for that. It's a slightly confusing process but I eventually got it to work.
----------------------
Okay, lets get started.
Install dependencies
There are some needed packages to do the compile and for conky...
Code:
sudo apt-get install libxext-dev lm-sensors build-essential checkinstall wmctrl
I'm not sure about the wmctrl package or what, exactly, it does. Some how tos have a line in the .conkyrc for it. I deleted that line from my .conkyrc and it is not included below. There are some suggestions that it doesn't work with beryl.
These files are also apparently needed (thanks eXisor)
Code:
sudo apt-get install libglib2.0-dev libxft-dev libx11-dev libxdamage-dev
Download Source
Now you need to download and untar the source.
Visit http://conky.sourceforge.net/ and follow the links to the download file. I'm not direct linking in case something changes. There are a couple option. I used the one entitled "conky-1.4.5.tar.gz (Platform-Independent Source .gz)". Others may work too.
Save it where you want and untar. I just saved to the desktop and then right clicked and said extract here. Change directory to the untared folder.
Begin the Install
Code:
cd Desktop
cd conky-1.4.5
Now comes the fun part...
Do each of these one at a time. If you get any errors it's probably because of dependencies. I hope the above named packages are all that is needed but if you have problems post back and I'll see if I can figure it out.
A lot of stuff probably went flying by but you can safely ignore it. If you didn't receive any errors you are now ready to install. There are two ways to finish the install that I am aware of - a "traditional" method and potentially better method. Most source packages you download will give you traditional instructions. If you want to be able to uninstall the package later or easily reinstall it, use the second method.
Traditional
Type the following into the terminal after the "make" process finished
To clean up...
Conky is now installed and ready to use. See below for configuring instructions.
Alternative "checkinstall" method
This process will create a .deb file. A .deb is the standard format for a Debian based Linux distro. It is somewhat akin to a .exe in Windows. In Ubuntu (I don't know about other distros) double clicking a .deb will open a gui to do the install. This process will not only make the .deb but do the install as well. When it finishes you will have conky installed and a .deb file in the folder. You might want to save the .deb in case you need to reinstall later.
Answer the questions. After you type in a description and press enter you have to press enter a second time to get it to continue. It then shows you a list of options you can change. I have no idea what any of them are for. Just press enter again and it will finish. When this finishes you are done. Save the .deb and trash the folder if you want.
If you want to remove conky at some time in a terminal type
Edit xorg.conf
You also need to make a slight modification to your xorg.conf file to help the display. I did not make this modification at first and I had no problems until I started to use beryl. It may not be necessary if you don't use beryl. This change does not seem to cause any problems.
Code:
sudo gedit /etc/X11/xorg.conf
Find the section called "Module" and add
Save and close. You may need to reboot or restart X (ctrl-alt-backspace) for that change to take effect.
Create and Save conky config file
If all that went well, conky is now installed but not yet ready to use. You need to create a config file in your /home/username called .conkyrc. The above mentioned 1.4.2 how to has great directions on how to do this. Here is a quick and dirty run through.
Here is a sample .conkyrc. It is a slightly modified version from the 1.4.2 how to for dual core cpu and a bit less output on the screen. You can copy this to start with and modify to your hearts content later. For more info on what variables and options are available go to the conky homepage and read the documentation.
Code:
# Conky sample configuration
#
# 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 no
# Set conky on the bottom of all other applications
own_window_hints below
# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=9
# 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 3.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
own_window_type override
# Use pseudo transparency with own_window?
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# If own_window_transparent is set to no, you can set the background colour here
#own_window_colour #C0C8CD
# 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 no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 3
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white
# 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 35
# 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 yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer no
# mldonkey_hostname Hostname for mldonkey stuff, defaults to localhost
# mldonkey_port Mldonkey port, 4001 default
# mldonkey_login Mldonkey login, default none
# mldonkey_password Mldonkey password, default none
# boinc (seti) dir
# seti_dir /opt/seti
# 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
${color black}$nodename $sysname $kernel on $machine
${color #C0C8CD}UpTime: ${uptime} Load: ${loadavg}
${color black}$stippled_hr
${color black}CPU Usage: $cpu % CPU: ${freq}mhz ${alignr}Temp: ${acpitemp}
${color black}${cpugraph cpu0 000000 C0C8CD}
${color black} CPU0: ${cpu cpu1}%
${color #C0C8CD}${cpubar cpu1}
${color black} CPU1: ${cpu cpu2}%
${color #C0C8CD}${cpubar cpu2}
${color black}Processes:${color #C0C8CD} $processes ${color black} Running:${color #C0C8CD} $running_processes
${color black}Name PID CPU% MEM%
${color blue} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #C0C8CD} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #C0C8CD} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color #C0C8CD} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color black}Mem usage
${color blue} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #C0C8CD} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #C0C8CD} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color black}$stippled_hr
${color black}RAM: ${color #C0C8CD}$memperc% ${membar}
${color black}Swap: ${color #C0C8CD}$swapperc% ${swapbar}
${color black}Root: ${color #C0C8CD}${fs_size /} - ${fs_free_perc /}% free ${fs_bar /}
${color black}Home: ${color #C0C8CD}${fs_size /home} - ${fs_free_perc /home}% free ${fs_bar /home}
${color black}$stippled_hr
${color black}Networking: ${color #C0C8CD}(${addr eth1})
${color black} Down:${color #C0C8CD} ${downspeed eth1} k/s${color black} ${alignr}Up:${color #C0C8CD} ${upspeed eth1} k/s
${color black}${downspeedgraph eth1 32,125 C0C8CD 0000ff} ${alignr}${color black}${upspeedgraph eth1 32,125 C0C8CD ff0000}
${color black}$stippled_hr
Code:
gedit /home/username/.conkyrc
Paste the above into the file modifying as you wish. Save and close.
To run, press alt-F2 and type "conky" (no quotes).
You should now see conky on your screen.
To have conky autostart on login create a small bash script called .conky_start.sh and save it to your /home.
Code:
gedit .conky_start.sh
copy the code below and past into the file. Save and close
Code:
#!/bin/bash
sleep 10 && conky;
This would start conky after 10 seconds after you login. The delay can be changed. Some sort of delay is desirable if you autostart beryl as well since conky works best if started after beryl. Make sure the script is executable:
Code:
chmod a+x .conky_start.sh
Now, add it to your startup programs (menu: system->preferences->session->startup programs).
Congrats. You are now the proud owner of your very own conky 1.4.5.
Bookmarks