« October 2011 | Main | December 2011 »

November 20, 2011

Hidden Linux : Divide and Conky


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

November 2, 2011

Infringement notices on the way


Here they come. The first copyright infringement notices under the two-month old Copyright Amendment Act are currently winging their way to unlucky downloaders. Telecom have fired off 42, Orcon eight and TelstraClear -- whose Chief Executive Allan Freeth at least spoke out against this ridiculous law -- are in the process of validating "a few dozen allegations".

So far, all appear to involve music downloads, with 40 of the 50 sent to Telecom and Orcon involving tracks by Rhianna, and another six for downloaders of Lady Gaga. Great to see the Recording Industry Association of New Zealand -- which issued the notices -- looking after New Zealand artists ...

Let me know if you get one of these notices. I'm very interested in seeing how this process works -- particularly if you challenge it.


Footnote
Here's the concluding paragraphs of Freeth's opinion piece "What's wrong with copyright":

Instead of bringing in a law that we believe will not and cannot work, our government should be breaking monopolies, allowing personal choice and letting New Zealanders experience information and entertainment when the rest of the world does.

Instead, it has chosen to introduce a law that could turn ordinary Kiwis into law-breakers.

Follow Geoff Palmer on Twitter
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.