RSS Feed


Comments RSS


Fldigi (Fast Light Digital Modem Application) is a cross-platform modem program that supports most of the digital modes used on the amateur radio bands.

Fldigi is a digital modem program for Linux, Free-BSD, OS X, Windows XP, W2K, and Vista (probably Win7).

Bill – WA5PB

ASCII Mandelbrot Fractal – as a Python CGI

Here is an example of a Python CGI that I have running on my website.  It generates a ASCII Mandelbrot Fractal and allows for the user to change and zoom in the field of view.  Granted, it is very low resolution being ASCII, but the main purpose was to demonstrate the use of Python for CGI purposes on   (FOR FURTHER EXPLORATION):   Since the server Python package (v 2.6.5) has the PIL (Python Image Library) available, I can see no reason that true binary images of Mandelbrot fractals might not be produced and displayed on as pictures on the web page.  UPDATE:  As suspected, creating true graphical Mandelbrot fractals did in fact work out well.   Here is a link to a Python CGI that uses PIL to create the images.  Graphical Mandelbrot CGI

Ubuntu+XAMPP+Python part 1

Do you have Ubuntu running on a system at home or work?  Have you ever wanted to run your own local web server or at least have one available for development work?   Have you ever wanted to craft your own web CGI scripts?  If you answer yes to these, then here is a serials of tutorials on how to get an Apache web server running quickly and easily on your Ubuntu system and how use Python to craft CGI scripts to run on it.

First, let’s get an Apache web server up and running.   Since this is targeted at people running Ubuntu desktop, rather than Ubuntu server, the very simplest way to install Apache is to do it via XAMPP.   XAMPP is a bundled, self-contained Apache web server distribution provided by Apache Friends that is complete and robust.  It includes  features here as listed from the website:

The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.

The XAMPP distribution is designed simply to be downloaded, unpacked, and run from a self-contained directory.   It does not modify your Ubuntu system at all and can be removed simply by deleting the folder that contains the installation.    Now, follow this link to the Apache Friends website and follow the directions for downloading and installing the XAMPP distribution, after reading the notes I provide here.  You will notice there are also instructions on securing the installation.  This is particularly important if you are using this for anything other than development purposes running on your personal system.  If this will be exposed to others, or the world, be sure to follow the instructions on making XAMPP secure.  Note:  Since this is being targeted for Ubuntu do not use the su command as stated in the XAMPP installations instructions.  Instead, you should install using this single line.

sudo  tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

XAMPP will be installed in the /opt/lampp folder.   To start it up, go to a shell prompt and type the following.  Again, sudo is required.

sudo /opt/lampp/lampp

Now, open you browser and give http://localhost as the address.  You will be presented with the default XAMPP webpage that is being served out by your local Apache web server.  I encourage you to play around with XAMPP for a while and explore your installation via the default page, then return here for the next installment of this series where we will look further at developing CGI scripts in Python.

It gets even worse for Microsoft

It gets even worse for Microsoft. As I mentioned in my previous blog entry, Linux is beginning to catch up with Microsoft Windows in the workplace. However it is not only Linux doing this. Windows file servers are now often replaced with NetApp filer appliances. Well, NetApp is not based on Windows and it makes one or more Windows servers go away. While the NetApp OS, Data ONTAP, it is not based on Linux, it is based on other members of the Unix family.

Linux is on the Rise for Business

This is good news for the Linux world.   As Linux becomes more adopted by business, its usage in other areas is also more likely. Linux is on the Rise for Business

A great Linux/Unix shell resource

I am a BIG fan of the old adage that says “The best things in life are free.” Of course, one of the very best FREE things is the GNU/Linux operating system. However, to take full advantage of Linux, one should learn the Linux command line . Sure, there are enough books to buy out there on the subject of Linux to fill a library and spend a not so small fortune in the process. But why spend that money and fill bookshelves with books you will likely only skim through or outright never read when one of the very, very best books on the subject is 100% free? I am referring to the book by William E. Shotts, Jr. – The Linux Command Line. This is by far the best book on the subject of the Linux command line and scripting that I have ever read. The truth is, it is one of the best books on this subject for Linux or Unix out there. While specifically targeted at the Linux operating system, much of it is applicable across the whole family of what is called Unix-like operating systems including Linux(in its many various distributions), the BSD Unix family(FreeBSD, NetBSD, OpenBSD, etc.), System V Unix systems including Solaris/OpenSolaris, HP-UX, and even Mac OS X. In truth, all of these operating systems share far more in common in their use of the command line and utilities than they differ, so The Linux Command Line is a great resource for them all. I highly recommend this book!

Useful Linux tips

This page has some very useful Linux tips.  Mainly for beginners, but some intermediate.   Good stuff!   Thanks to the author for sharing with the community.
Highly useful Linux commands & configurations


Why script writing in the Unix shell csh is considered harmful.   A classic, but useful, Usenet rant.

HOWTO – Ububtu, a customizable Compose Key System

In my previous blog entry, I introduced both Unicode character entry and Compose Key entry of special characters.  One thing that becomes apparent is that there might be some characters or symbols missing from the default GTK+ code in Gnome.   Unfortunately, this is in compiled code and cannot be changed.  One option is to use Compose Key sequences for most special character entries and Unicode character entry for the occasional odd symbol.  However, if that “odd symbol” is one you intend to use often, you might wish you had a Compose Key sequence for it.   This can be accomplished, at a small price.

Situation, say you are an electronics enthusiast and have a need to type the Ohms symbol, Ω, quite often.  This symbol is not in the default GTK+ Compose Key sequences, and there is no way to add them easily into that source.   An option is to use the <Shft><Ctrl><u>03A9 Unicode method entry to get the Ohms symbol.  Sure, this works fine, but could be tedious if done on a regular basis.  What we need is a way to get this into a nice, intuitive, Compose Key sequence.  The solution is to take advantage of the fact that there is an alternate source for the Compose Key definition table and that this can be modified to add in missing symbols that you may need to use often.   This is the .XCompose file, which I will show here how to create and edit.

The method we will use is to override the default Gnome method with the orignal Xwindow method, which is also available on your system, but must be configured and activated.  It is called the Xwindow Input Method (XIM).  The system must be told to use this method instead by setting the GTK_IM_MODULE environment variable.   This is done with the following command from the shell prompt:

export GTK_IM_MODULE="xim"

For this environment variable setting to be automatically set every time you log into the system, add this line to the .gnomerc or .Xsession file in your home directory.  If these files do not exist, then create one (.gnomerc) by entering the following text in any text editor and saving the file as .gnomerc (do not neglect to include the leading dot!):

export GTK_IM_MODULE=”xim”

Next, you want your own copy of the XIM Compose Key file to have and modify to your own liking.   We do this by copying a system copy of the file to our home directory and giving it the name .XCompose (this file name is CASE SENSITIVE!):

cp /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose

Finally, you will want to edit your .XCompose file to add in the symbols and keybindings  you are interested in.   For instance, here are the lines I added to bind the Unicode 03A9 for the Ohms symbol to <Multi_key> (AltGR in my case, whatever you have set as your Compose Key in your case) <o><m> (get it?) and <m><o>, also some other symbols I find handy.

<Multi_key> <o> <m>                   : “Ω”   U03A9 # OHM SYMBOL
<Multi_key> <p> <i>                    : “π”   U03C0 # PI SYMBOL
<Multi_key> <d> <t>                    : “Δ”   U0394 # DELTA SYMBOL

Is there a downside to overriding the default Gnome GTK+ Compose Key tables?  Yes, there is.  You loose the <Shft><Ctrl><u> keybinding to be able to do Unicode entry anywhere in the Gnome interface.  However, if your aim is to exclusively use Compose Key sequences and to update your data table to include any missing ones you might need, then it is not a bad trade off.

Finally, a tip on editing the .XCompose file.  Just how do you enter a represenation of the missing symbol into the file if you have already activated XIM which disables the <Shft><Ctrl><u> Unicode entry method?  Edit the file in an editor such as Vi that has its own Unicode entry method or use the Gnome “Character Map” utility to get a copy of the symbol into an editor that does not have a method of its own.   In Vi (or Vim), go into text insert mode and type <Ctrl><v><u>+unicode to enter Unicode symbols.

Once you have set the environment variable and created your file, log out and then back in to activate everything and you are all set to have a Compose Key system that you can customize to suit your own needs.

Much of this information was extracted from the following source and should be referred to for further information on the subject:

HOWTO – Ubuntu special characters

In Ubuntu, if you want to type any Unicode character, do so my holding down Shift+Ctrl+U then the unicode for the needed character.  Shift+Ctrl+U gives you an underlined u and you type the code and hit <enter>.  Works in every application I have tried.


Shift+Ctrl+U 00f4 results in ô
Shift+Ctrl+U 00e1 results in á

Of course, you have to know the Unicodes.  This chart will help

Also, you can use the COMPOSE KEY!

Addition information on configuring a compose key sequence and its use can be found here:

I defined my compose key to be the Right-Alt key on Ubuntu 10.04 like this:

System>Preferences>Keyboard>Layouts>Options>Compose key position>Right Alt

Good list of compose key combinations to get all the weird, odd and desperately needed characters you want:

Wikipedia entry on Compose key:

Another blogger’s nice short write up on using compose keys:

Finally, for Windows users who would like to have Unix/Linux style compose key functionality this program works well and is free:  AllChars

Ubuntu, when things go badly – Synaptic HOWTO

This is good information for anyone who is going to be managing an Ubuntu system.

also good documentation on using the shell interface for Apt

I had a 9.10 to 10.04 upgrade break due to an internet failure during the process.   The following is from the SynapticHowto.  The upgrade was so broken that it was leaving me at a shell prompt to login, the Gnome desktop was not loading automatically and the Update Manager would not finish the upgrade.  I did the following and it saved my upgrade and got everything working properly.

Broken Upgrade or Installation

  • What to do if an installation process fails and you find it is no longer possible to install or remove packages:
  • Open a Terminal and type the following commands, pressing the Return or Enter key after each (you may have to type in your password):
     sudo dpkg --configure -a
     sudo apt-get install -f

a neat trick via Ghostscript

I have found a neat trick.  Not original, found it here:

PostScript and PDF

  • To concatenate PostScript or PDF files into a single PDF file:

    gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
    -sOutputFile=<outfile> <infile> <infile> …

  • To concatenate PostScript or PDF files into a single PostScript file:

    gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite \
    -sOutputFile=<outfile> <infile> <infile> …

  • This trick used in combination with the fact that in Ubuntu you can print not only to a printer, but also to either a postscript or PDF file directly, means that if a book is presented in html on the web, say with each chapter being an individual HTML page, you can easily print each of these to a file and then use the trick to concatenate the ps or pdf files together to reassemble the entire book.  For instance, I am doing that with this book that is online:

    I do not know how many other books that I have run across on the web that were HTML like this and I wanted to reassemble them for a good print out.  This is a way to do it.

    By the way, “gs” is the command line program for Ghostscript, which should be already installed on your Ubuntu system by default.  If you install Ghostscript on a Window system, the same trick should work there too so long as you print the HTML to a PDF printer driver.  Ghostscript can be downloaded from here:

    Oh, yes, this is also cool…:

    Why Desktop Linux (still) Sucks…


    This is not a slam against Linux.  It is all about making our favourite OS more viable and available to more people.

    Ubuntu 10.04 LTS is released

    The new Unbuntu, 10.04 LTS, has been released. It is great!
    Go get Ubuntu 10.04.
    A good review from another blogger: Ubuntu 10.04 – Perfect

    The Magic SysRq key

    The Magic SysRq key!   If you use a GNU/Linux OS, discover what the SysRq key on your keyboard can do for you.

    Revolution OS Movie

    Richard Stallman, I love his software but hate his politics!

    40 years since the beginning of time(2)!

    I was reading bboard on SDF this morning and discovered that user kickmule had posted a link to a blog pointing out that this January 1, 2010 is the 4oth anniversary of the Unix system call time(2) which has been faithfully counting the seconds for all of us since January 1, 1970.  So, Happy B-Day to time(2)!
    Happy Birthday time(2)!

    Also, here is a link to kickmule’s blog on SDF, very nice!

    HOWTO – PHP simple webpage hit counter

    This is a snippet of PHP code designed to give you a working hit counter for a website.

    To set it up create a file called hitcounter.txt, and save it to your webspace. This will be the storage for the hit count data. It will need to have both read and write permissions.

    Next, on any web page you want to hit count, add the following code: (this assumes a .php file or .html file that will be processed for PHP)

    < ?php include ("counter.php"); ?>

    Finally, type or copy the following to a text file and save it as counter.php to your webspace. You will want to adjust the location shown to hitcounter.txt in the code to match your own file structure. Also, you may want to change the text on the echo line, between the quotes, to suit your needs. There is no error checking on the file open or close since one would presume you will have full control over location and state of the hitcounter.txt file.

    < ?php $count_my_page = ("/my_web/hitcounter.txt"); $hits = file($count_my_page); $a = $hits[0]; $b = $a + 1; $hits[0] = $b; $fp = fopen($count_my_page,"w"); fputs($fp,"$hits[0]"); fclose($fp); echo $hits[0] . " visits to this website since Dec. 21, 2009"; ?>

    HOWTO – PHP page last modified code

    This is a little snippet of PHP code that makes a webpage self-aware of when it was last modified and prints out an appropriately formatted message. (assumes that webpage is .php or that .htaccess is configured for .html to be processed as PHP)

    // outputs e.g. This file was last modified: December 29 2002 22:16:23 UTC.

    $currentFile = $_SERVER[“PHP_SELF”];
    $parts = Explode(‘/’, $currentFile);

    $filename = $parts[count($parts) – 1];
    if (file_exists($filename)) {
    echo “This file was last modified: ” . date (“F d Y H:i:s”, filemtime($filename)) . ” UTC.”;

    Advice on surviving in the corporate IT jungle

    Stuff I’ve learned at Microsoft. A very insightful article by Sriram Krishnan about how to survive in the corporate IT jungle. Lots of good advice!