NetHogs: Bandwidth Stats by Process
January 23rd, 2010
Have you ever been messing around on your Ubuntu box, only to notice some sluggishness or some suspicious spikes in your internet connection, and wondered, “What the hell is using up all that bandwidth?” Or worse, “Have I been hacked?” If so, then NetHogs might be the program for you.
NetHogs is a lightweight Linux terminal-based tool that monitors bandwidth usage, then groups it by process, so you can see which PIDs are using the most bandwidth, and if necessary, kill them with System Monitor.
To install NetHogs on Ubuntu (tested on 9.10 Karmic), you can either use Synaptic or simply apt-get, like so:
sudo apt-get install nethogs
To run NetHogs, simply feed it the internet connection you wish to examine, and sit back.
sudo nethogs eth0
For more information and the full list of options, visit the NetHogs man page.
man nethogs
Bootsplash Resolution in Kubuntu
January 26th, 2009
One of the annoying little setup items on my list of things to do every time I reinstall Kubuntu is changing the bootsplash screen resolution from 800×600 to something more appropriate for my monitor, specifically, 1280×1024. Here’s how it’s done:
sudo nano /etc/usplash.conf
The file should be altered to read:
# Usplash configuration file
# These parameters will only apply after running update-initramfs.
xres=1280
yres=1024
The final step is to update initramfs, the initial RAM disk used by the kernel when Linux first boots up:
sudo update-initramfs -u
If you skip the last step, you will probably only see your new usplash resolution during shutdown and not when your computer boots up.
That’s it!
Python Web Search Agent
August 15th, 2008
So there was this web page, nothing more than a text file in fact, which I was compelled to check regularly. I had ordered something online from a company whose web-store design was still in the dark ages, and their “method” of letting customers know whether or not their products had shipped was to periodically update a web-viewable text file with a public list of all the order numbers that had recently shipped. Very private and secure, I know.
No, no, they couldn’t possibly email this information to you — you had to check the page manually. And if your products were backordered, as mine were, you’d be checking often.
Well, that’s just stupid, I thought, and since I had a computer sitting right in front of me, I thought it might be a good idea to automate the process.
So I cobbled together a little Python script on my Ubuntu box, which uses the pycURL interface to grab the URL in question, parse it, search it for my order number, and then fire me off an email (using sendmail) if and when it finds anything.
I automated the script to run hourly using cron, like so:
crontab -e
and then included the following line in my crontab file:
# m h dom mon dow command
7 * * * * /path/to/searchagent.py
Seven minutes after the hour (for luck), every hour, every day.
On the hunch that this script might be useful to somebody else, I decided to post it here. Fair warning to all: this is a huge hack, and I’m sure it needs work. Also, there’s probably a better method that I’ve completely overlooked. Comments, corrections, and suggestions are welcome, as always.
Here’s the script:
Beginning SSH on Ubuntu
May 29th, 2008
So let’s say you have a private LAN running in your secret underground lab. Maybe you’ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.
What you need is SSH, the Secure Shell. SSH is a powerful tool which allows secure remote login over insecure networks. It provides an encrypted terminal session with strong authentication of both the server and client using public-key cryptography. This tutorial will cover the basics of SSH’s most useful features:
- Logging into a remote computer over a secure connection.
- Transferring files and directories between computers over a secure connection.
- Enabling public-key authentication.
- Passwordless authentication for use with scripts and cron jobs.
The following assumptions are made about the reader:
- You know what a terminal/command line/shell is and how to start a session.
- You have at least a basic familiarity with Linux/Mac command-line syntax.
- You’re on a private LAN with access to at least two Linux/Mac computers (or, you have a user account on a remote server that accepts SSH connections).
As always, comments, corrections, and suggestions for improvement are appreciated.
Installing OpenSSH
The Ubuntu (and MacOS X) flavor of SSH is called OpenSSH, a free, open-source implementation of the ssh protocol. It consists of two basic components, an openssh-client and an openssh-server. SSH clients communicate with SSH servers over encrypted network connections.
LightScribe on Ubuntu
May 17th, 2008
LightScribe is an innovative technology that uses a special disc drive, special media, and label-making software to burn labels directly onto CDs and DVDs. The labels are laser-etched, not printed, so there’s no ink, no smudging, and no peeling.
LightScribe lets you create one-of-a-kind designs with your own photos, text, and artwork. The days of hand-labeling or printing stickers for your CDs and DVDs are over.

This short tutorial will describe how to install and run LightScribe software on Ubuntu. These instructions are tailored specifically for Ku/Xu/Ubuntu 64-bit users, since the LightScribe software is designed for the 32-bit architecture. Where necessary, alterations for 32-bit users are included.
What You Need
Before downloading anything, make sure you have the necessary hardware and materials at hand, or you may have to make an emergency trip to your local big-box electronics store.
LightScribe hardware
LightScribe-enabled disc drives do double duty. The same laser that burns your data will also laser-etch your customized CD/DVD labels. LightScribe-enabled CD/DVD burners are ubiquitous these days. You may already have one.
Hulu: TV and Movies on the Web
March 12th, 2008
Hulu.com is a brand-new, free, ad-supported streaming video service which combines content from more than fifty providers including FOX, NBC, MGM, Sony Pictures Television, Warner Bros., Lionsgate, and more. Although Hulu has been live since October, the site just emerged today from its private beta-testing phase and is now open to everyone–as long as you live in the United States.
Hulu lets you watch full-length feature films like The Big Lebowski or The Usual Suspects, or recent television episodes of Family Guy or The Office. Plus there’s a fair number of canceled cult classics like Firefly.
Both shows and movies are interrupted with brief commercial breaks, but these can be –ahem– suppressed, and they are definitely less intrusive than those on regular commercial television. Content on Hulu is certainly limited, but they’re just getting started, and I must say, with respect to the movie selection, I’d be inclined to browse Hulu for decent flicks before I’ll suffer the crap from the Netflix “Watch Instantly” archive.
Running Arduino on Ubuntu
November 24th, 2007
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use microcontroller hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
This short tutorial will guide you through the installation of the Arduino development environment on Ubuntu. These instructions reference arduino-0010 and have been tested on Feisty and Gutsy, both 32-bit and 64-bit installations. Thanks to this post on the Ubuntu Forums for the basic setup.
arduino-0011Get Rid of the Bouncing Busy Cursor in Kubuntu
November 16th, 2007
Here’s how to get rid of that annoying “Busy Cursor” bouncing icon next to the mouse pointer in Kubuntu.
(1) Press Alt+F2 to bring up the Run Command dialog box.
(2) Type kcontrol and click Run.
(3) Select “Appearance & Themes” from the left sidebar menu.
(4) Select “Launch Feedback” from the sub-menu.
(5) In the “Busy Cursor” box, select “No Busy Cursor” from the drop down menu.
That’s it! Banished for good!
Installing Skype 2.0 on Kubuntu Gutsy 64
November 15th, 2007
Skype is a free text/audio/video chat and softphone client for PCs. Version 2.0 for Linux finally includes support for webcam video. It’s still in beta, and it’s designed for a 32-bit OS, so AMD64 users have to do a little creative tweaking to get it to work.
Thanks to this tutorial on the Ubuntu Forums, getting the latest Skype up and running is a snap. Just paste the following code into a terminal. This snippet works on 64-bit Gusty (7.10), Feisty (7.04), and Edgy (6.10) installations.
Setting Up Kubuntu "Gutsy"
October 23rd, 2007
After a fresh install of Kubuntu 7.10 “Gutsy Gibbon,” there are a few extra tasks necessary to get everything set up and running smoothly, especially when it comes to multimedia support and internet tools. This short tutorial will allow you to quickly enable some of the features missing in a vanilla installation.
The goal of this process is speed of setup, so I’ll use terminal commands rather than the more-familiar graphical menu, however I will make an effort to keep things simple and straightforward. Comments are welcome. (You might want to read all the way to the end before jumping into the commands.)


