How To Display A Text Document On Your Web Page

A Corner of My Web Page
The corner of my web page with a link to view my Ham Radio log file.

Being a Ham Radio operator, I’ve wanted, for some time, to display my log file on my web site. I’ve been researching it for some time, and mostly ran into methods that require java or php, or some sort of web scripting. This is beyond me and I wanted something simpler; and this is what I have come up with.

My computers run on the Ubuntu Linux Operating System.  I came across a small command line utility program called txt2html.  The name pretty much explains what it does.  It has many features that include many formatting options; one being, that I can pre-append a file to the front of another file.  I tested this feature to apply a preformatted html heading to my log page.  I made a simple sample of a text log page listing contacts, and ran it through txt2html and it attached my header to the log page and spit it all out as an html file ready to display on my web page.

My sample log page was called log.txt and looks like this:

call            QTH
k7jm            Helena, MT
wa7vxm          Butte, MT

My sample heading was called ‘log_file_heading.html’ and looks like this:

K7JM’s Log File

I put it all through txt2html with a command like this:

txt2html --append_head ./log_file_heading.html ./log.txt >./log.html

And the output file ‘log.html’ looks like this and is ready to display on your web page:

K7JM’s Log File

call            QTH
k7jm            Helena, MT
wa7vxm          Butte, MT

I wanted to automate a way to put this file on my web site without getting too complicated.  The simple ftp command would work, but it takes a bit to automate it. After a bit of research, I came across ‘kermit‘.  ‘kermit’ is a simple program that takes data from a file and performs the commands listed in the file.  Perfect.  I put the following commands in a file called ‘log.kermit’:

ftp open ftp.myhostsite.net /user:myusername /password:mypassword
put ./log.html /www/whereyou/wantit/log.html
exit

I then called kermit like this:

kermit ./log.kermit

and it is done.

To make things a bit cleaner and more automatic, I created a script file called ‘log_doit.sh’ that looks something like this:

txt2html –append_head /home/john/Desktop/log_file_heading.html /home/john/Desktop/cqrlog.html >/home/john/Desktop/log.html
kermit /home/john/Desktop/log.kermit
exit

Now, to do the whole process, I just had to update my log file, save it, and run the script ‘log_doit.sh’ and it would be on my web site.

A New Way – With cqrlog

After I put all this together, I remembered hearing about a Linux logging program called cqrlog, on the ‘Linux In The Ham Shack‘ (link updated 9/2010) podcast.  If you are a Ham Radio Operator or use Linux, I strongly suggest you give this great podcast a listen.  It is always entertaining, and they have covered some very useful stuff for the Ham that is running a Linux operating system.

Anyway, I downloaded and installed ‘cqrlog’ and started playing with it.  I was specifically looking for a way to export the log file so I could run it through ‘txt2html’.  Lo and behold, ‘cqrlog’ does one step better; it exports the log right into the ‘html’ format.  Wow! Perfect!.

I learned a lot by using txt2html, but now I can skip that step completely and just export the log file in html format and run a simpler script that runs ‘kermit’ to upload the file to my web site.  Click HERE to see the actual page on my web site.  As of when this was written, the file is a test one that was created by playing with ‘cqrlog’.  It will change once I start using ‘cqrlog’ for real.

John – K7JM

K7JM’s Log File

call            QTH
k7jm            Helena, MT
wa7vxm          Butte, MT

My Experience Installing Ubuntu 9.04 – Jaunty Jackalope

Click to get Jaunty Jackalope

Ubuntu 9.04 – code named Jaunty Jackalope, was released on April 23. I am always (maybe too) eager to upgrade to the next version of Ubuntu as new features are always added, making it an even better operating system. Yes, for the uninformed, Ubuntu is a computer operating system. Your computer may run Windows or if it is a Mac, it may run OS X. My computer, along with millions of others runs the totally free and open Linux version called Ubuntu.

Typically, version updates are made right over the Internet. It will download a zillion files and update everything, taking, possibly, several hours to do. I read an article on some web site that I could download the distribution and update it from a burned CD. Since I had two computers to update, I decided this might be a time savings way to go.

Here is my experience:

I downloaded the Alternate Install disc over night. I popped the disk into my computer and it immediately detected that the disc had a distribution upgrade on it and asked if I wanted to “upgrade”. I said yes, and off we went. It then asked if I wanted to update any files that may be newer than on the disc, by connecting to the Internet and downloading them. If I selected “NO”, I could “simply” update my system later and it would pick up the needed files. I chose to do this as I figured it would get the system up an running the quickest.

Before I go into details, I must say that I have a co-worker that also runs Ubuntu. He chose to update from over the Internet. He said that he had to restart the process several times because it kept on stopping. It was probably because there were millions of others trying to do it at the same time. Also, it downloaded over a thousand files. It took a long time, but in the end, he said everything seemed to work ok.

Back to my update. As the update progressed, it asked several times about configuration files, and whether I wanted to keep the current ones or up date them. I had no idea what to do on these. One option was to merge them, which I did several times. I have no idea if that did anything. I kept getting an error saying the latest kernel version xx-xx-xx would not start. Oh, Oh. That is very not good. It came down to one of my choices in updating the grub menu.lst. After several errors, it came back and asked that question again. I chose “update to developers version” or some such thing. Yeah, the new kernel loaded.

The process finally finished and it was time to reboot. When it did, my 3D graphics did not work. Meaning Compiz was disabled. I tried to load a new Nvidia driver with not much luck. I decided maybe I needed to do that update that was mentioned earlier. I chose “update” and boom, it decided to download several hundred files. This was the part that I though I was avoiding. Once it downloaded them, I got a message saying that all the files weren’t downloaded, and suggested a “partial upgrade”. I chose to do that. I ran “update” again and it picked up more files, but this time the update process crashed when it was time to install them. After much head scratching and searching the Internet, and many hours passed, upon boot-up, I selected “recovery mode”, and selected a sub menu that said something about repairing packages. I chose that option. It recognized that there were updates, and it loaded them successfully. After that, my “update manager” seemed to work. There were many other users out there that were looking for the same answer.

My Nvidia drivers were still not loaded. It detected a new version of the driver, but when I tried to enable it, it gave me a message back that said it was previously enabled. So did I just disable it, or was it enabled? I went into the settings, and this time I was able to turn desktop effects on. But, the Compiz GUI was missing. I re-installed Compiz and I was able to turn everything back on. What a pain.

Somewhere in all of this, my screen locked up because the screen saver came on. When I tried to log back in with my password, it said my password was “invalid”. Oh, no. I clicked the “Switch user” button, reselected myself (which said I was already logged in) and it took my password correctly. After several more hours of Internet searching, I found that many other have had this problem even before the new version of Ubuntu. I eventually came up with the fix after digging into the depths of files that have never seen the light of day.

Before I started the upgrade process, I did a complete partition clone saved to an external drive. I also separately backup the home directory of my and my family’s accounts. I also went through and did screen shots of all the menus. I did this, because I had a past experience that failed and I had to reinstall the entire operating system, and I couldn’t remember all the different programs I had installed. This was a good idea, as I was soon in for a big surprise.

It seemed that everything finally came out ok, but I noticed that an icon on my menu bar was missing. It was for the search applet. I very much needed that. It indexed all of the files in my home directory, and could search for anything in a second. I have the “open clip art” collection on my drive which consists of thousands of pieces of clip art. There is no way to search this collection without the indexed search applet. The applet also categorized its results and actually displayed thumb nails of its results. A very handy thing for searching through clip art. The problem was, I did not even know what this little program was called. I could not even search for it on the Internet. It took another hour or so of time to finally figure that it is called “Tracker”. I reinstalled it. The configuration files were in place so it came back like it should – except, it kept saying there was an error and had to re-index. Oh no, maybe this is why it disappeared. It seems to be buggy. I don’t know what I will do without it.

Since this program was missing, I though I would check around and see if anything else was missing. Oh boy, was I in for a shock. I am very glad I took those screen shots. I printed them out and started comparing new menus with old ones. Here is what came of it. Almost all the old configuration files were still present, which made setup a lot easier.

  • Tracker – missing. When reinstalled, it appeared to be buggy.
  • Gnome Do – missing. Reinstalled. Old configuration files still intact.
  • Firestarter the firewall would not activate. Reinstalled and it started up ok.
  • Dropbox would not start up. I had to go to their web site and download and install a new version.
  • Brasero disc burner. This was my favorite disc burner. It was missing. Reinstalled.
  • VLC Media Player – missing, reinstalled.
  • Gdesklets – missing, reinstalled
  • BitPim – missing. Reinstalled. This program downloads and uploads pictures and info from our cell phone. It was a real pain to get it going originally. I have not been able to get it running yet.
  • Childsplay – missing. Reinstalled. This is an educational children’s program.
  • OpenOffice Database – missing. I selected the entire suite to be reinstalled. It found the pieces that were missing and only installed them.
  • PyCrust – missing. Reinstalled. This is a Python programming language front end GUI
  • DeVeDe – missing. Reinstalled. This is a DVD menu creator which I really like.
  • Kdenlive – missing. This is a video editing program. I have been using Kino and Open Movie Editor, so I did not reinstall this one.
  • XBMC – media player – missing. I didn’t use this much either so I didn’t reinstall it.
  • todisc GUI – missing. Reinstalled. This is another DVD menu creator.
  • My Sandisk Sansa MP3 player would not work. This took hours of research to figure out. When I plugged it in, it did not come up in “mass storage” mode that it should have. It also spit out an error message and apparently thought it was a camera. After pulling the last two hairs out of my head, I found a solution and deleted a file somewhere on the system and it corrected the problem. I’m sure that file was there for something though!

SO, so far I have been able to get everything back working except Tracker, and BitPim. What a very large head ache.

I love using Ubuntu, but with this experience, I can tell you it is definitely not ready for the masses. How would mom or dad ever deal with something like this? Also, many “Gurus” will tell you that you should always do a fresh install when there is a distribution upgrade. How ridiculous is that? I finally got my computers networked, sharing printers, and files. I’ve configured it to death to how I want it. How is the normal Joe ever supposed to wipe all of that out and start over? I can’t remember what I did yesterday, it would take months to get everything back to normal.

As I said before, my co-worker’s upgrade turned out fine. It just took a long time. But— not as long as mine did.

John

The Agreeable Cat – by Anne Loucks

I find this post by Anne Loucks as hilarious.  Are you sick of those stupid agreements that you are forced to accept every time you install some bit of software?  Take back control, and have your CAT agree to the EULA, not you!

John


The Agreeable Cat

by Anne Loucks

How often have you been presented with unplesant click-through license agreements like this one from the Adobe website:

downloading

It is disturbingly common for people to click right on through such barriers without even looking at the agreement. I totally understand this attitude. Reading the EULA is generally a waste of time. “Blah blah blah… bequeathment of firstborn… Blah Blah Blah… eternal soul…“ and so on.

Of course, I have created a wonderful solution to this problem. My cat, Simba, agrees instead of me. As he is not a legal entity, I don’t really know how kitty’s agreements would stand up in court, but I like to think he would be responsible for any breaches of contract, assuming the agreement is even enforceable. After all, he is not even of legal age, at least in human years.

front back

First, we must create a way for Simba to push the button. I created a cardboard platform with a long thin protrusion for pressing the spacebar, which is sufficient to activate most onscreen buttons after you TAB to place the focus on them.

Setup shot

Next, I carefully place it over the keyboard of my computer.

Luring the cat

Finally, I lure Simba over the cardboard platform with the promise of petting.

Success!!!

Success!! He presses the button of his own free will. Admittedly, he was coerced and rewarded, but really, nobody forced my cat to step on the button and become party to a software license agreement. At the very least, we know he was not under duress.

downloading

The download begins and I have personally agreed to nothing.

This same strategy could be used with small dogs, children (preferably the neighbors’), or even a carefully crafted button presser that moves up and down as the wind sways a tree outside your window. Mother nature is responsible for the license agreement! I swear!

Who knows how well this might hold up in court, and who cares? EULAs are something of a joke to begin with, as they have no physical signature. Still, if you are worried about legal safety, maybe your cat will be as agreeable as mine.

To Anyone who does something similar on their own, I would love to post your photos here. Send them to me at anne.loucks@ohesso.com.

Also, Boing Boing and Slashdot have picked up this essay, if you want to see what other folks have to say about it.

Create USB Boot Thumb Drive With Ubuntu Live CD – Revisited

I used the method, previously described, to make a bootable USB Ubuntu thumb drive for a co-worker. The process failed for his particular thumb drive, saying “Missing Operating System” when he tried to boot with the USB thumb drive.  After some research on the subject, it seems that a lot of thumb drives have this problem with Ubuntu.  I found the solution at http://ubuntuliving.blogspot.com/2008/11/missing-operating-system-step-by-step.html .  Dominique’s step by step “How To” worked perfectly for me.  If you have problems with your Ubuntu USB boot thumb drive, give this “How To” a try and you might be pleasantly surprised.

John

Create USB Boot Thumb Drive With Ubuntu Live CD

The computers in my Radio Shack and home run on Ubuntu Linux. A great way to share this good experience with others is through the Ubuntu Live CD.  The downside of the Live CD, however, is that no changes are saved.  To get a more lifelike experience in the Ubuntu demo, a bootable Ubuntu system can be loaded onto a USB thumb drive.  With this method, any changes will be kept on the thumb drive.

With the USB bootable thumb drive, it also means that you can carry your operating system with you with all the files you like to use.  There certainly is a performance issue compared with a regular hard drive instalation, but having your e-mail, internet, audio/visual programs, ham radio programs, etc. with you all the time, available to use on any computer that can boot by USB, is an awesome thing.

Here are some detailed instructions to make a bootable USB thumb drive from the Ubuntu 8.10 live CD.

Download PDF of this page.

download

get_adobe_reader

  • Insert Live Ubuntu CD and allow it to boot up completely

  • Insert Thumb Drive into a USB port and wait for system to recognize it

  • Click “System” on the TOP menu of the Desktop

Click "System"

  • Select  “Administration” under the “System” menu.

Administration

  • Click “Create a USB startup disk” under “Administration”

Click "Create a USB startup disk"

  • The “Make USB Startup Disk” program should start

  • CD info for the Live CD should appear at the top

Make USB Startup Disk

  • USB information should appear in the middle. If the USB thumb drive is not inserted, you can do it now and the information should appear.

USB Information Field

  • Make sure “Store in reserve extra space” is selected.

  • Move slider to the right to allocated additional memory on the thumb drive for the Ubuntu system. If you want a bit unused (eg. ½ GB) for other files, do not go all the way to the right. Note – This “unused” portion, or any files on the unused portion of the thumb drive WILL NOT be accessible when Ubuntu is booted from the thumb drive.

Storage Options

  • Click “Make Startup Disk”

Do it!

  • The system will begin to copy the Ubuntu Operating system to the thumb drive.

Progress Bar

  • It may take some time for the process to complete. When it is done, close the program and unmount the USB thumb drive by right clicking on the disk icon on the Desktop, and click “Unmount Volume”

  • This completes the installation of Ubuntu onto the thumb drive. Reboot the computer with the thumb drive in place and enjoy Ubuntu.

The Post You Probably Never Saw & Linux

linux
Tux

It is very rare that I delete a post after it is published. I made this rare exception yesterday.

The post was about a school teacher that reprimanded a student after he shared Linux disks with his fellow students.

The computers at my house run under Ubuntu Linux, NOT Windows.  Many Many people believe that computers only run on Windows or Mac OS/X.  These people also believe that all software costs something and if you give it to someone, you are doing an illegal activity.  Linux operating systems are almost always FREE, and many times out perform Windows.  If you want to see a computer desktop that puts Windows Aero to shame, let me show you Ubuntu Linux with Compiz.  WOW! And VERY cool!  Most of the applications that run on Linux are free also, and the process of installing the applications is usually a matter of  a click or two.

Here is a link to the original article.

You must read this follow up article also to make a fair analysis of the whole deal; and that is why I deleted my post about the whole bit.

In short, it is PERFECTLY LEGAL to copy and share Linux Operating System disks AND ENCOURAGED.