Creating a Bootable USB Pen Drive - UNetbootin

Technically this is not about Linux exactly since I ran this program from my husband’s Windows computer but it is an “easy” way to get running on Linux when a tragedy befalls your main computer.

I bought a new USB thumb drive expressly for this purpose and found a program, UNetbootin, on Sourceforge.net. Install on Windows was a breeze and now I have an .exe in my downloads folder for each time I want to run a different live Linux distribution.

There are a couple of options for obtaining files to extract to the USB pen drive. The first is to allow the program to download the distribution you select from the drop down box. In theory UNetbootin downloads the ISO from an FTP site and then extracts the files to the drive. I attempted this a couple of times with two different distributions and the download failed each and every time. In the end, I downloaded the ISOs myself and used the second option where I selected the ISO myself from the hard drive. This was fairly straightforward and went off without a hitch so it is the method I’d recommend.

But which distribution to choose? Such a hard decision. Distrowatch has a list of Linux distributions that is searchable. For a live Linux distro, choose Live Media and Active on the search page and then look over the descriptions.

My first choice was Zenwalk, a distro based on Slackware. I’ve always wanted to try Slackware but never got around to it so Zenwalk was appealing on that front. After downloading the ISO and using UNetbootin (successfully) to extract the files to the thumb drive. With my fingers crossed, I rebooted and… X failed to start correctly. I was given the option to try and correct the error but this is where the sheer beauty of the live Linux distribution comes in. Since I hadn’t invested too much time installing a new Linux operating system, I had no problem switching distributions. I am fickle that way. So I went back to the trusty Ubuntu. Now I have Lucid Lynx running on a small pen drive with a bright orange light. Awesome.

There was one small issue with Ubuntu. Right out of the box so to speak, the correct wireless drivers weren’t installed. Speculating wildly, I’d guess it is because they are proprietary drivers. Going to System > Administration > Hardware Drivers allowed me to activate the necessary drivers and get Ubuntu running.

As far as Linux issues, this was a pretty painless and successful operation.

My 5 Year Old Broke My Laptop – Tale of Woe

Kids and computers can be an awesome combination, except when they are not. My beautiful, sweet, smart daughter had an accidental run-in with my laptop and the poor computer lost. Such is life I suppose.

Until I decide what to replace my laptop with, I am using my husband’s computer. Now this will not do at all. Sharing computers is not the key to household harmony. My task for today is to decide on a distribution that will run off a USB key. Oh and buy a thumb drive to dedicate for this purpose.

What Odd Things Full HDs Do

This morning I wanted to upload some photos from my camera to my personal blog. So I pull out my camera, plug it in via USB and nothing. A bunch of cursing later and I had no idea why my camera wasn’t automounting. It should have but it didn’t. I decided to save this project for after the kids were asleep so I put the camera aside and went to upgrade my kernel and Firefox.

After upgrading, I started Firefox and tried to access Gmail and my favorite message boards and I found that I couldn’t even click on a button and my bookmarks had disappeared. More cursing under my breath. So I set out to rebuild my Firefox profile, which should have been easy enough but I saw a ton of files with the word corrupt in the filename. This was making things personal. The files were 0 bytes so I went to delete them and half of them deleted and then I got an error message saying that my hard drive didn’t have enough space to delete them. M’kay, that was a lightbulb moment. I knew I had some large files in the trash so I manually deleted them from the command line and voila, Firefox started working and so did my camera.

To check the amount of disk space from the command line: (the -h option makes the output human readable)

df -h

To delete the trash from the command line:

rm -rf ~/.local/share/Trash


Warning:

You have to be very careful when using rm -rf because it can permanently delete pretty much anything. This is one of those “measure twice, cut once” situations where you double check what you are deleting before you hit Enter.

Note: There are two subdirectories of Trash, files and info. It is OK to delete these because when you want to throw something new away, they will be rebuilt.

Fourteen Years of Linux Journal

And it is all on one CD!

Linux Journal is offering their archive CD of all copies of Linux Journal from 1994 to 2008 for just under $35.

I love Linux Journal but it would be handy to have e-copies instead of stacks and stacks of paper copies. Wonder when they’ll add 2009.

KompoZer - A WYSIWYG HTML Editor for Linux

Today I decided to create my own start page with all the websites I visit daily. The problem? I’ve hand written enough HTML pages to know I never want to hand code one again. It is incredibly boring and mind numbing. If I was a Windows user, I suppose I’d create my page in Word, save it to my hard drive and go from there. Fortunately I am not a Windows user. I am enough of a purist to be offended by the code added to web pages created in Microsoft Word.

If I wanted to hand code a webpage, which I do not, I’d probably use XEmacs, a slightly fancier version of Emacs that gives HTML help. Since I am not a masochist, I will instead use a WYSIWYG (What You See Is What You Get) HTML editor for Linux.

After looking around, I settled on KompoZer. First to install. Since I am running Ubuntu (and lazy), I decided to use apt-get so at the command line I typed:

sudo apt-get install kompozer

After being prompted for the sudo password, it installed.

KompoZer is available under the Applications > Internet menu.

A simple web page created in 5 minutes using KompoZer

A simple web page created in 5 minutes using KompoZer

Features of KompoZer:

Easy add PHP code option
Easy mode switch: Normal, HTML Tags, Source or Preview by switching tabs
No added proprietary code that I saw
Takes longer to install via apt-get than to create a page (is this a feature?!?)
Able to save projects, not just solo pages

There is probably much more but this is what I see from some playing around with the program this evening. All around, this seems like a good program.

Sending a Signed Document Without a Scanner

Today I needed to send a signed document to someone in the United States. This was a bit of a problem because I currently don’t have a scanner and I didn’t feel like going anywhere or paying anyone to fax a document. So here is what I did.

Programs:
Open Office
GIMP
tiff2pdf

First I typed up my document in Open Office’s word processor and exported it to PDF.

File > Export as PDF

Next I opened GIMP, imported the PDF, and changed the zoom so it was 1:1. To open the PDF, choose File > Open and select the file. Then hit Import and wait. The easy way to change the zoom in GIMP is to make the pdf the active window and then hit the number 1.

Choose the pencil tool and the smallest brush Circle (01). Now comes the hard part. Using your mouse, sign your name.

Save the file as a .tiff file.

File > Save As

Remove the pdf-pages ending from the filename, add .tiff as the file ending, and change the type to tiff. This will create an image with your typed stuff and your signature.

Creating a pdf is easy with tiff2pdf. from the command line:

tiff2pdf input_file.tiff -o output_file.pdf

When I was done with this I used a free fax service to fax the file where I wanted it to go. Then I called them to double check it arrived safely because I am suspicious like that. There might be a more elegant solution to this problem but this is what I came up with in 20 minutes today.

Here is a handy list of email to fax services. I especially approve of this site because it is written like old skool web pages and reminds me of good times. I bet it is even lynx compatible.

Tux Paint

My kid loves bugging me to play with Tux Paint, an open source version of Windows’ Paint program and sometimes I will even give up my computer to allow her to play with it.

Tux Paint allows kids to play with colors, shapes, letters and lines on the computer. For a little extra fun, there are drawing tools that allow kids to add special effects. There is an animated Tux penguin at the bottom of the window that gives hints and suggestions.

Drawing done with Tux Paint

Released Under: Gnu Public License (GPL)
Cost: Free (as in beer)
Runs On: many versions of Linux, Mac OS X, Windows, BeOS, BSD and more.

Free Linux DVDs

Get a free copy of Ubuntu Karmic Koala sent to your home for free. Shipping can take up to 10 weeks according to their website, so if you can download and burn an ISO, that might be a better solution. Request your free DVD through ShipIt.

https://shipit.ubuntu.com/

The Linux Store had a free Linux Disk promotion going but due to lack of funds had to close it down.

http://free.thelinuxstore.ca/news.php

Not Free but Still Cheap

Way back in the day, I used to get my Linux CDs from Cheap Bytes. They are still in business and still sending out lost cost Linux DVDs.

Changing Shells - What Did Bash Do To You?

Some people just don’t like bash. I don’t know why, bash has always seemed perfectly fine to me, but suppose you want to change which shell you are using. This is how you do it.

First verify which shell you are using by typing into a terminal window:

echo $0

On my system, I get the answer:

bash

Now, if you want to know all the difference and history of all the shells, you won’t find it here. But. Faqs.org has a page with a handy chart of all the shell differences and some of the history behind them.

To see what shells are valid on your system:

cat /etc/shells

To change to the csh shell, open a terminal window and type:

csh

Note: this changes the shell for that terminal window for the current session only. It is a good idea to test the change before you go and mess up the shell for your account that only root can fix.

If you are absolutely, positively, 100% sure you want to change your shell, you can use the program chsh.

whereis csh
chsh (followed by a prompt for the password)
<path to csh found using whereis, on my system it is /bin/csh>

And there you go, you are using a new shell.

Creating a Favicon

First order of business when creating a new blog is to create a favicon, a small icon, that is used on browser tabs. There are online tools to do this but it is also pretty easy on Linux.

Tools:

  1. GIMP
  2. ppmtowinicon – a command line program

GIMP (The Gnu Image Manipulation Program) is pretty standard and can be found under graphics or started by typing gimp into a terminal window.

ppmtowinicon converts a PPM image to a Windows .ico file, hence the ‘ppm’, ‘win’, and ‘ico’ in the program name. This program is available in the netpbm package for Ubuntu or on its website for the source package.

To see if ppmtowinicon is installed on your machine, open a terminal window and type ppmtowinicon. If the program isn’t installed, it should complain.

To install netpbm the easy way, type sudo apt-get install netpbm and your sudo password after being prompted for it.

Now that everything is installed, open your image in GIMP. Is your image a square? In other words, is the width (in pixels) identical to the height (in pixels)? If not, crop it to size. Either use the crop tool until the length and the width are equal or change the canvas size.

Image > Canvas Size

To change the canvas size so it is square, click the icon that looks like a chain. It should now appear broken. This will make the width and length (in pixels) so they are not dependant on eachother. Now change the either the width or the height until you have a square image. The image might look a little strange so you should change the offset until the image is how you would like it.

Click Resize and you have a new, square image.

To save the image, click File > Save As and change the ‘Select File Type’ box to ‘PPM image’.

With the heavy lifting done, go back to your terminal window, move to the directory that contains your images and type:

ppmtowinico -output favicon.ico myimage.ppm

where myimage.ppm is the name of your image and favicon.ico is the output image.

And there you go. The most long-winded explanation of how to create an .ico file anywhere.