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

Jaunty Jackalope Revisited

Click to get Jaunty Jackalope

After I installed Ubuntu 9.04 – Jaunty Jackalope, I posted a lengthy list of problems I encountered during and after the process. You can read it by clicking HERE.

I received a great reply from Rob laying out some important facts about updating a major distribution of most any variety.  I encourage you to read Rob‘s reply

It seems, however, that my experience with Jaunty was not unique.  My blog post has been ready by many other users looking for solutions.  Here is a partial list of search entries that resulted in finding and reading my post.

  • solution gdesklets jaunty

  • menu bar missing gnome ubuntu 9.04

  • jaunty jackalope install/upgrade experie

  • install kept back upgrade brasero jaunty

  • desktop effects could not be enabled

  • ubuntu 9.04 partial upgrade brasero

  • error gdesklets ubuntu 904

  • partial upgrade ubuntu 9.04

  • tracker jackalope reindex

  • ubuntu alternate install +grub boot load

  • +nvidia +drivers +jaunty +not +loaded

  • jaunty partial upgrade problem

  • jaunty jackalope partial upgrade

  • ubuntu 9.04 no menu bar

  • ubuntu 9.04 failed to open gdesklets

  • ubuntu 9.04 sansa not connecting

  • missing menu bars jaunty

  • 9.4 jackalope indexing error

  • downloading files from sansamp3 player t

  • ubuntu 9.04 tracker applet missing

  • jaunty jackalope menu bar disappear

  • ubuntu jackalope tracker reindex

  • ubuntu 9.04 missing password

  • ubuntu jaunty not detecting sansa

  • upgrading to jaunty jackalope partial up

  • gdesklets jaunty fix

  • desktop effects could not be enabled

  • ubuntu jaunty sansa

  • tracker indexing error jaunty

  • how to start the compiz gui in ubuntu 9.

  • ubuntu 9.04 recovery menu

  • menu bar missing in ubuntu 9.04

  • applet is not loading ubuntu jaunty jack

  • ubuntu update manager icon disappeared

  • jaunty jackalope recovery menu

  • “open movie editor” ubuntu 9.04 mp3

  • ubuntu 9.04 problem hp laserjet printer

  • ubuntu 9.04 sansa not connecting

  • how to install gdesklets in ubuntu 9.04

  • compiz buggy since upgrade to jaunty

  • kernel failed install when updating to 9

  • partial upgrade jaunty error open office

  • sandisk jaunty

  • nvidia picked up during live not after I

  • missing 9.04 from grub

  • jaunty install software failed

  • ubuntu 9.04 missing compiz menu

  • ubuntu 9.04 tracker “what is”

  • how do i fix a failed ubuntu 9.04 instal

  • sansa clip not working on ubuntu 9.04

  • reindex ubuntu 9.04

  • not work tracker ubuntu 9.04

  • ubuntu 9.04 gdesklets

  • tracker ubuntu 9.04 “re-index”

  • jaunty disable tracker

  • ubuntu 9.04 partial upgrade cannot resta

  • jaunty compiz startup

  • ubuntu 9.04 + update error

  • ubuntu 9.04 nvidia not detected

  • power button missing from ubuntu 9.04

  • sansa not connecting in jaunty

  • kino ubuntu 9.04

  • ubuntu partial upgrade jaunty

  • some of the menus are missing on ubuntu

  • ubuntu 9.04 reindex

  • tracker applet missing ubuntu jaunty

  • ubuntu 9.04 gdesklets

  • ubuntu jaunty auto detect sandisk sansa

  • ubuntu 9.04 vlc media player error

  • xbmc failed to detect distribution jaunt

  • upgrade ubuntu jaunty jackalope gui err

It is obvious that there were too many errors, many of the same ones I encountered, while installing Jaunty.  I (and others) would love to hear about your experience installing Jaunty.  Good or bad.

John – K7JM

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

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.

Linux in the HAM Shack – Podcast

I have recently stumbled across a new podcast that has peaked my interest.

I am a Ham Radio operator, and my computers run on Ubuntu Linux.  So, when I came across a new podcast called “Linux in the HAM Shack“, I knew I had to check it out.  So far, they have five episodes out, so it is not too late to download them and get caught up easily.

Two Hams, Richard – KB5JBV and Russ – K5TUX, produce “Linux in the HAM Shack“.  Check it out and let them know what you think.  For now, they are specifically targeting new Hams, or new Linux users who are Hams, or both.  It sounds like it is going to be a great netcast (podcast).

John. K7JM

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.

Linux HowTos and Gadget Reviews: How To Install Free42 in Ubuntu

Saturday, October 18, 2008

How To Install Free42 in Ubuntu

Free42 is a free, open source emulator of the HP42S scientific calculator. The 42S is a nice little RPN, scientific calculator that got me through my engineering education. Well, a sharp programmer by the name of Thomas Okken has written this nice emulator that runs on your PC (as well as Macs, Pocket PCs, Palm Pilots, and the Sharp Zaurus).

Click the link below to find out how to get and install this neat calculator.

Linux HowTos and Gadget Reviews: How To Install Free42 in Ubuntu.