Conky - System Monitor

See Whats Happening

Here's the blurb:

Conky is a light-weight system monitor to display system activity. It runs on X-11, is very light on system resources, and very easy to set up. The configuration is done through ~/.conkyrc file.

In KDE to get Conky to autostart at boot, create a symlink in your .KDE autostart directory:

$ cd /home/myname/.kde/Autostart
$ ln -s /usr/bin/conky conky

$ ls

$ ls -l
total 12
drwx------ 2 user 16 2008-07-11 01:10 ./
drwx------ 5 user 48 2008-10-13 22:15 ../
lrwxrwxrwx 1 user 14 2008-11-06 00:37 conky -> /usr/bin/conky*
-rw-r--r-- 1 user 1950 2008-07-05 10:48 .directory

Have a look at the Conky site:

Have a look at the faq file:

And have a look at the screenshots for ideas:

There's a good howto on Gentoo's Website:

Conky is designed to display on the root desktop (ie the first) but that's easily changed by editing .conkyrc. You can run it in its own window if you don't want it stuck to the deskop:

conky -o

Its fairly basic, but here's a copy of my .conkyrc:

# Create own window instead of using desktop (required in nautilus)
own_window true
own_window_hints undecorated,below,skip_taskbar
background false
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer true
# fiddle with window
use_spacer right
use_xft true
# Update interval in seconds
update_interval 3.0
# Minimum size of text area
minimum_size 400 5
# Draw shades?
draw_shades true
# Text stuff
draw_outline false # amplifies text if yes
draw_borders false
uppercase false # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent true
# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
override_utf8_locale no
xftfont Terminus:size=8
xftalpha 0.8
${offset 0}${color slate grey}${time %a, } ${color }${time %e %B %G}
${offset 0}${color slate grey}${time %Z, }${color }${time %H:%M:%S}
${offset 0}${color slate grey}UpTime: ${color }$uptime
${offset 0}${color slate grey}Kern:${color }$kernel
${offset 0}${color slate grey}CPU:${color } $cpu% ${acpitemp}C
${offset 0}${cpugraph 20,130 000000 ffffff}
${offset 0}${color slate grey}Load: ${color }$loadavg
${offset 0}${color slate grey}Processes: ${color }$processes
${offset 0}${color slate grey}Running: ${color }$running_processes
${offset 0}${color slate grey}Highest CPU:
${offset 0}${color #ddaa00} ${top name 1}${top_mem cpu 1}
${offset 0}${color lightgrey} ${top name 2}${top cpu 2}
${offset 0}${color lightgrey} ${top name 3}${top cpu 3}
${offset 0}${color lightgrey} ${top name 4}${top cpu 4}
${offset 0}${color slate grey}Highest MEM:
${offset 0}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
${offset 0}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
${offset 0}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
${offset 0}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
${offset 0}${color slate grey}MEM: ${color } $memperc% $mem/$memmax
${offset 0}${membar 3,100}
${offset 0}${color slate grey}SWAP: ${color }$swapperc% $swap/$swapmax
${offset 0}${swapbar 3,100}
${offset 0}${color slate grey}ROOT: ${color }${fs_free /}/${fs_size /}
${offset 0}${fs_bar 3,100 /}
${offset 0}${color slate grey}HOME: ${color }${fs_free /home}/${fs_size /home}
${offset 0}${fs_bar 3,100 /home}
${offset 0}${color slate grey}NET:
${offset 0}${color}Up: ${color }${upspeed eth0} k/s
${offset 0}${upspeedgraph eth0 20,130 000000 ffffff}
${offset 0}${color}Down: ${color }${downspeed eth0}k/s${color}
${offset 0}${downspeedgraph eth0 20,130 000000 ffffff}

KDE - How To AutoStart Programs

I read a few posts on how to automate the launching of programs or applications when you log into your system. Many were confusing, some where misleading and will not work. Some suggest putting an entry in .bashrc. Fine, but what happens if you don't start your X system? I sometimes run with no GUI, just working on the console. If its an X app it will try to launch.

Admittedly it will work once X is running but you hit another problem. Each time you start an XTerm, you launch another instance of the program.

Another suggestion was to add the entry to .profile. Again this is fine if your running X. If not, same problem as above.

To get an X11 application to launch when you start KDE, go to your home directory. Find the hidden KDE autostart directory .kde/Autostart:

cd /home/myname/.kde/Autostart

Find the location of the program you want to start. If you want to start Emacs, type:

which emacs

The system will respond with the location of emacs. (or whatever program you choose). Create a symbolic link to the binary (program) location:

ln -s emacs /usr/bin/emacs

Check the directory and you'll see the link you've created:


Do a long listing:

ls -l
emacs -> /usr/bin/emacs

Log out of KDE and log back in. Emacs should launch when the desktop loads.

XTerm - Display Path In Title Bar

I keep a short prompt that displays my current directory and the system I'm currently working on. Something like this:

[comanche etc] $

Its nice to have a display of the full path, saves having to 'pwd' to get it.

Here's how to do it:

cp .profile
vim .profile

Add the following to .profile in /home directory

case $TERM in
PROMPT_COMMAND='echo -ne "\033]0;${USER} ${HOSTNAME}: ${PWD}\007"'

Save the file. Log out and log back into the system.

XTerm will display full path to your current directory.

XTerm and Fortune Cookies

I love the wisdom dispensed in fortune cookies each time I launch an XTerm. With the minimal clean install of Debian, I had to setup fortune cookies manually. Here's the steps.

Install the package using aptitude:

    aptitude install fortune

Change settings to ~/.profile in my home directory so fortune starts when I login. Make a copy of the original file before editing starts:

    cp .profile .profile.orig
    vim .profile

Check the location of fortune on the system. Its normally /usr/games/fortune.

    which fortune

Add the following to .profile:

    if [ -x /usr/games/fortune ] ; then

Log out and log back into the system. Launch XTerm and enjoy fortune.

This only install the "clean" version of fortune. If you want the whole hog, install fortunes-off as well, but be warned, this is NOT for those easily offended.

    aptitude install fortunes-off

You can also install the BOFH excuses file, for more laughs:

    aptitude install fortunes-bofh-excuses

That's about it.

Debian Minimal Install - 4

Debian Minimal Install cont...

To complete...

Firefox Speedup

Faster Fox

Use the following to speedup Firefox.

1) Type “about:config” into the address bar and hit return. Type “network.http” in the filter field, and change the following settings (double-click on them to change them)

2) Set “network.http.pipelining” to “true”

3) Set “network.http.proxy.pipelining” to “true”

4) Set “network.http.pipelining.maxrequests” to 8 (recommended by Firefox devs)

5) Right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0″. This value is the amount of time the browser waits before it acts on information it receives. With it set to zero the page just pops up, it’s a dramatic change.

See how ya go.

Debian Minimal Install - 3

Samba, Printing, and NTFS

Talking to the enemy!!!

Printing is essential on any computer system, so lets set up our printer. Plug in the printer and switch it on. If the printer has a USB connection it should be quickly recognised. If it has a parallel or serial connection it may need a reboot.

Install the CUPS printing system:

# aptitude install cups

To complete...

Debian Minimal Install - 2

The minimal install is complete, now we need applications to make the system usable. We have Firefox (iceweasel) installed, I also use Konqueror for browsing the Web. Konqueror has an inbuilt AdBlock, but no filters. Go over to the Filterset-G website and pull-down the latest filter:

Its named something like: 2008-01-01-MERGED.txt

Download the file to your home directory. Then click on:

Settings > Configure Konqueror > AdBlock Filters > Import.

Highlight the filter file you downloaded and click on:

Open > Enable Filters > Apply > OK.

Your done. Refresh your browser page if its open and AdBlock will do its thing.

We need a movie player, MPlayer is the best Linux movie player around. Lets install it:

# aptitude install mplayer

Amarok is great for playing sounds:

# aptitude install amarok

OpenOffice has a nice set of apps, if a little on the heavy side.

# aptitude install OpenOffice

If you don't need anything so comprehensive or heavy as OpenOffice, KOffice will do the job, so:

# aptitude install KOffice

I've used KOffice, its nice though a little buggy. You choose.

We need a PDF reader. I use KPDF which is nicely integrated into KDE, but others are available. There's XPDF, Evince, GhostView, ViewPDF, and others.

# aptitude install KPDF


# aptitude search "PDF"

to select a different PDF reader. Search through the list and download the one you like.

Adobe offers a Linux version of their PDF Reader. It comes in .rpm format, which means you'll need to convert it to .deb if you want to use it. Its available for download from Adobe's website.

That's about it.

Fastest Debian Servers

Serve Me!

If your doing a net install of Debian, you need a fast net connection. You also need to use the fastest server to feed your downloads. Particularly if you have a lot of stuff to pull down or a large update you need to run. Fast servers are an absolute must.

Meet netselect-apt. It eliminates the guesswork and its dead easy to use with a few options.

netselect-apt identifies the fastest Debian servers available for download.

netselect-apt pings available Debian servers and compiles a list of the fastest for you to select from. First, we install netselect-apt:

aptitude install netselect-apt

Then get some results:


It takes a couple of minutes to poll available servers and write a sources.list containing the winners in your current directory.

The available options include:

-n to include non-free
-f to use ftp

You can also stable, testing, unstable, experimental, etch, lenny, woody, sarge, and sid as other options.

netselect-apt -n -f lenny


netselect-apt -n -f testing

Run netselect-apt before a major update or upgrade, as you'll notice server speeds change depending on connection speed and workload.

XTerm Font Settings

XTerm uses a default font unless you enter a selection in .XDefaults in your home directory. The default font doesn't always look great.

I selected an alternative font for XTerm. I opted for lucidatypewriter, monospace font. Here's the setting I used.

XTerm*font: -*-lucidatypewriter-medium-*-*-*-12-*-*-*-*-*-*-*

At this size, the font renders well and looks clean. I found using anti-aliasing at these sizes, the fonts look "dirty".

The rest of the .Xdefault looks like this:

XTerm*background: white
XTerm*foreground: black
XTerm*pointerColor: black
XTerm*pointerColorBackground: white
XTerm*cursorColor: blue
XTerm*internalBorder: 2
XTerm*loginShell: true
XTerm*ScrollBar: true
XTerm*scrollBar.width: 10
XTerm*ScrollKey: true
XTerm*SaveLines: 1000
XTerm*multiClickTime: 250
XTerm*VT100.geometry: 80x20
XTerm*rightScrollBar: true
XTerm*title: XTerm

One point to note is the XTerm geometry setting specifies VT100. This prevents XTerm menus from displaying in a ridiculously small size.

Debian KDE Minimal Install - 1

Cut Down KDE Install in Debian

I did a minimal install of Debian Testing (Lenny) with a minimal KDE. Its surprising how fast, snappy and responsive the whole system was after running Fedora 9 for two months. I ran Fedora 9 with both Gnome and KDE 4. KDE 4 is great although still a little buggy, so I'm sticking with KDE 3.5 for now. Its stable and it works.

Back to the HowTo. You'll need a fast connection to the net. If your on dial-up, don't bother followint this HowTo, install from CD or DVD instead.

To start the install, download a netinstall CD from Debian's website and burn it to disk:

Select the file that matches your CPU type (probably i386 or AMD64).

Burn the image to disk. Reboot your machine using the CD. If your machine won't boot off the CD you'll need to go into your BIOS and change the boot settings to make the CD/DVD the first boot device.

After booting, hit enter to load Debian and start the install.

1. Select you language
2. Select country
3. Select keyboard
4. Enter machine hostname
5. Enter domain name
6. Partition disk/s
7. Enter root password
8. Create user account
9. Enter user password
10. Select base install. Deselect desktop option. We don't want it
11. Select country mirror
12. Say yes to participate in popularity contest
13. Select GRUB boot loader
14. Install finished. Remove CD and reboot
15. Log in as root
16. Edit /etc/apt/sources.list
17. Add: deb lenny main contrib non-free
18. Add: deb-src lenny main contrib non-free
19. Update Debian by typing: aptitude update
20. Upgrade Debian by typing: aptitude upgrade
21. Install X: aptitude install xserver-xorg-core xorg
22. Install KDE: aptitude install kde-core
23. Install some decent fonts: aptitude install msttcorefonts
24. Install Emacs: aptitude install emacs
25. Install pdf reader: aptitude install kpdf
26. Reboot

You'll be the proud owner of a brand new minimal install of Debian with a cut down KDE.

You'll probably need to install few things such as openoffice, mail client, and so on. As you've seen above, using Debian's powerful installer, its kids play.

If you can't find the item your looking for or don't have the correct package-name, try "aptitude search package-name". You can search for packages at Debian's website or try "google package-name debian" and see what you get.