Danau Kelimutu

BLUE CHRISTMAS

Invite Friends to MANGANESE ORE

MOVIES

Friday, 6 March 2009

LINUX TOOL

OESAO'z LINUX TOOL

1.Amazing Knoppix Toolkit.

Linux is famous as an operating system that includes almost everything a software user could ever want right out of the box — and for free. The Knoppix developers had quite a time deciding which of the thousands of packages to include, but they did their homework, made their decisions, and you're the one who benefits. This chapter can't cover everything that comes on the Knoppix disk — that would be a book in itself! — but it does take a look at important apps such as K3b and the GIMP that you'll probably find yourself using at one time or another.

i.Replacing System Fonts.

The default fonts are definitely ugly. Blech! We think the best solution is to download and install the Microsoft Web fonts, which are attractive and common. However, if you're not using the persistent home directory, you're going to have a problem. You'll be able to install the fonts, but when you restart Knoppix, you'll have to reinstall all the fonts again, because all of your work will have been blown away. With the persistent Knoppix disk image, all of your work is saved, so you can count on your newly installed fonts being there.To install the Microsoft Web fonts, use KPackage, the KDE software installation tool; it's a front end to Debian's APT (Advanced Package Tool). From the Knoppix menu, choose Utilities → Manage Software in Knoppix to start KPackage. When KPackage opens, select the All tab,Then follow these steps:

1. In KPackage, select Special → APT:Debian → Update. APT downloads a list of the software available in the APT repositories Knoppix knows about. This can take a few minutes, so just relax.
2. When the APT update completes, go to the All tab and select File → Find Package. Enter the package name, msttcorefonts, as the search term, and click Find.
3. After KPackage finds the package, close the Find Package window and click the Install button at the bottom of the right pane.
4. An Install window opens. Click the Install button at the bottom. (Yes, this is kind of silly, which is why I prefer to use the command line instead of KPackage for installing software. Using the command line is discussed later in this chapter.) Finally, KPackage begins to actually download and install the software you want onto your system.
5. When it's finished, close KPackage.Note If you're curious, the Microsoft fonts have been placed into /usr/share/fonts/truetype/ msttcorefonts.However, you can't start using your newly installed fonts just yet. You need to restart X, and fortunately that's pretty straightforward (unlike using KPackage). From the Knoppix menu, select Logout → End Current Session. After X restarts, you need to log back in, and now you can finally start making intelligent font choices!Remember that if you're not using the persistent Knoppix disk image, when you reboot, you're going to have to repeat this entire process, again and again, in a Sisyphean task that will never end. Set up and use the persistent Knoppix disk image!Now assign some nice new fonts in appropriate places on your system. Keep in mind that this chapter walks through only the major apps on Knoppix, so you're on your own to change fonts on any other apps you use that aren't covered here.
First, fix KDE itself. From the Knoppix menu, select Control Center, expand Appearance & Themes, and select Fonts. The Fonts Control Center displays,To pick something better, click Adjust All Fonts; then, in the Select Font window, check the box next to Font. Find and choose either Bitstream Vera Sans or Arial (I prefer Bitstream Vera Sans). Notice, however, that the Fixed Width font does not change. To fix that one, click Choose next to Fixed Width and then select Andale Mono, which is a great monospace font. Click Apply at the bottom of the Fonts screen, and you should immediately see your new fonts in action. Close the Control Center.Next, open the Konqueror file manager (the Personal Files icon on the panel that looks like a house), and select Settings → Configure Konqueror. The Configure window opens,Once again, Helvetica is the default. Change it to Bitstream Vera Sans or Arial or another font that you like better. Don't click OK yet; while this window is open, you also can fix the fonts Konqueror uses when it's acting as a Web browser.
Change the fonts on that screen to ones that you like better. The following are our recommendations:
Standard font: Verdana or Bitstream Vera Sans
Fixed font: Andale Mono (if you have it on your system, it's much better than anything in the Courier family)
Serif font: Bitstream Vera Serif or Times New Roman (use Times New Roman only if you must; Bitstream Vera Serif is far easier to read)
Sans serif font: Verdana or Bitstream Vera Sans
Cursive font: Lucida Calligraphy, Lucida Handwriting, and Bradley Hand ITC are great, but none of those is available, so choose Arioso.
Fantasy font: Comic Sans MS isn't bad (you're hardly ever going to need this font), but you can pick anything goofy.Click OK to make the changes and close this window. You can close Konqueror if you'd like. Now that you've changed your system fonts, move on to program fonts.

ii.Changing Application Fonts.

You'll probably find yourself using Mozilla Firefox, KMail, and OpenOffice.org often. You can change their fonts to make these programs more usable, too.
Fixing Firefox Fonts,To set up Firefox's fonts, click the Mozilla icon on the panel (yes, it should be the Firefox icon, but it isn't), and then choose Edit → references,click the General icon, and select Fonts & Colors Changing Firefox's font options
Make these changes:
Proportional: Sans Serif
Serif: Bitstream Vera Serif or Times New Roman
Sans serif: Bitstream Vera Sans or Verdana
Monospace: Andale Mono
Click OK and then OK again to close the Fonts & Colors window. Now isn't that a lot better?
Replacing KMail Fonts,Open KMail from the K menu by selecting Internet → KMail. Choose Settings → Configure KMail, and then click the Appearance icon on the left. If you check the Use Custom Fonts box, the options in the main part of the screen are "ungrayed." Choose an item from the Apply To drop-down list, and select a font for it; then choose another item from the list, make a font choice, and so on, until all of them have been changed. At that point, click OK, and your new font choices will be applied to KMail.You can choose any fonts you want, of course. We would change everything except Fixed Width font to Bitstream Vera Sans, Verdana, or Arial — basically, something that's pleasant and readable. For Fixed Width font, try Andale Mono if you have it or Bitstream Vera Sans Mono if you don't. Click OK to close KMail's configuration window, and you're good to go.Note We recommend changing Composer to Andale Mono to stick to plain text for email, which means a monospaced font.
Switching OpenOffice.org Fonts,Whatever you do, do not open OpenOffice.org (OOo) and expect to configure the fonts. Oh, no. It's not that simple. Instead, from the K menu, select OpenOffice.org 1.1.4 → OpenOffice.org.Isn't it obvious that you should configure fonts when you configure printers? No? We don't think so, either.Click the Fonts button to open the Fonts window. Then click Add, which opens the Add Fonts window. Click the button labeled "…" in the Source directory area of the window, navigate to /usr/share/fonts/truetype/msttcorefonts, and click Select. Back in the Add Fonts window, check the Create Soft Links Only box, and then click Select All, followed by OK. You are told that many new fonts were added, so click OK to close that window. Click Close to get rid of the Fonts window, and then click Close again to finally exit Printer Administration.Note If it's any consolation, this process is much improved in the OpenOffice.org 2.0 release, which is still in beta at the time of this writing. You'll see it in a future release of Knoppix.To start OOo, click on the program's icon (the one with the birdies) on the panel. After OOo opens (and it'll take a while!), select Tools → Options, click on the + next to Text Document to expand it, and finally select Basic Fonts (Western).Because you first added all of the Microsoft fonts, OOo (in an effort to achieve maximum compatibility with all the drones using Microsoft Word) changes everything except Heading to Times New Roman, and changes Heading to Arial. Now you're just like the rest of the world.

iii.Setting Up Printers

Now, that was before the advent of the Internet into popular consciousness, so his answer might be a bit different today, with network access being the new number one concern. Even so, printing would still come in a close second. People get very cranky when they can't print, with good reason: Much as we'd like to believe that we live in the age of the paperless office, experience has proved otherwise.Fortunately, Knoppix makes it pretty easy to set up printers. Of course, if your printer doesn't work under Linux (Samsung, for example), Knoppix ain't gonna fix that, but if you're trying to use a printer that's supported under Linux, then you should be able to use it with your Knoppix Live CD.To get started, from the Knoppix menu, choose Configure → Configure printer(s). Knoppix opens the KDE printer configuration tool,KDE's print system uses CUPS (the Common Unix Printing System) by default, and installs several so-called pseudo printers by default, including Print to File (PDF), Print to File (PostScript), Send to Fax, and Mail PDF File. All are very cool, and all work well (of course, to fax, you need a working modem).In addition to pseudo printers, you can add plain ol' real printers as well. To do so, choose Add → Add Printer/Class. The KDE Printer Wizard opens, and you just walk through the necessary steps to get things set up and working. For example, here's how to connect an HP LaserJet 6L to a Xandros Linux machine shared through Samba:

Introduction: Click Next.
Backend Selection: Choose SMB shared printer (Windows). Click Next.
User Identification: Choose Normal Account and enter a Login and Password for the Xandros box. Click Next.
SMB Printer Settings: Enter the SMB Workgroup name (MILTON, in this example), the SMB Server name (Cromwell, in this example), and the share name of the Printer (hplj6l, in this example). Click Next.
Printer Model Selection: Select HP as the Manufacturer and LaserJet 6L as the Model. Click Next
Driver Selection: Select HP LaserJet 6L (foomatic + hpijs) [recommended] as the best driver among six options. Click Next.
Printer Test: Skip until the process has completed because it rarely works for some reason. Click Next.
Banner Selection: Leave No Banner selected. Click Next.
Printer Quota Settings: The default (no quota) is fine. Click Next.
Users Access Settings: The default enables anyone using this Knoppix computer to print, which is fine. Click Next.
General Information: Name is required, so type in something short that identifies the printer, such as hplj6l. Fill in Location and Description if you feel like it. Click Next.
Confirmation: Look things over. Click Finish.
And now there's a new printer you can use in Knoppix! To test it, select the printer, right-click on it, choose Test Printer, and click Print Test Page. In a moment or two, a test page should appear in your printer.If the test page is borked and doesn't look right, try changing your driver: Click on the printer to select it, choose the Properties tab in the bottom half of the window, and click the Driver button. Click the Change button, and try a different driver. Lather, rinse, and repeat as needed until your printer works.If you can't find your printer in the list of supported devices, or things just aren't working, head to the Linux printing mother lode at LinuxPrinting.org, found, surprisingly enough, at http://www.linuxprinting.org. If you can't find the info you need at that Website, it's time to get a new printer.
Here's how you can improve printing in Mozilla (and Firefox, if you install that program using Klik). Open Mozilla, go to a page you'd like to print, and select File → Print. Notice that Mozilla prints only to the default printer. If you only have one printer, this isn't a big deal, but if you use a laptop that connects to several printers, this can be a pain. Conversely, look at how KDE applications print. All KDE apps pass along the print request to Kprinter, which, as you've seen, is a really nice front end for printing. You can choose any of the printers you've defined already, or print directly to Postscript or PDF, or print to PDF and have KMail email the resulting PDF, and many other neat options.
In Mozilla's Print dialog box, click the Properties button. In the Printer Properties dialog box, change the Print Command from lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_ NAME} to kprinter –stdin. Click OK to close the Printer Properties dialog box, and then click Print to close the Print dialog box. You'll see Mozilla printing, but then Mozilla passes the job along to Kprinter and the KDE Print dialog opens. Make the appropriate choices and click Print. In essence, you're telling Mozilla to pass the print job along to Kprinter, which makes things far handier.
You can pretty much use this trick with any program that doesn't use KDE's print system. Just find where you can specify the printer and enter kprinter– –stdin. Test it to make sure things work, and enjoy your slick printing system.
There's one exception (isn't there always?): Adobe Acrobat Reader. To set it up, open Acrobat Reader from the K menu by selecting Multimedia → Viewers → Acrobat Reader. Once it's running, open a PDF (you might need to download one first; to find one, search Google for "filetype:pdf knoppix", which should produce oodles of them) and click Print. In the Printer Command box, enter kprinter without the –stdin. And remember — you only need to do this for non-KDE apps.

iv.Enjoying Multimedia.

Multimedia makes computing fun, whether it's music, video, images, or any combination of these. While it's doubtful that you'll ever use Knoppix as a true multimedia box acting as the hub of your digital life, it's still really cool that this Live CD comes with software that you can use to enjoy your multimedia files. Let's walk through the highlights of the software, taking brief looks at some of the best multimedia on any OS, not just Linux.
Listening to Music with XMMS,Linux users have a huge variety of audio players from which to choose, with more coming out every day, but Knoppix includes an old standby that many people still use and rely upon: XMMS, the X Multimedia System.Open XMMS from the K menu by selecting Multimedia → XMMS. To use XMMS effectively, you need to be able to see it, and by default the interface is built for folks with perfect eyes who are also looking at the program through powerful electron microscopes. Right-click on a blank area of the program and select Options → DoubleSize. That's much better! Once you master XMMS and its interface, you can go back to the regular size, but for now, use the enlarged view.Besides the main XMMS window, you really need to display the Playlist Editor window, so click the PL button (or right-click on the program and choose Playlist Editor). The Playlist Editor window opens, docked to XMMS. Resize the playlist by grabbing the bottom right corner and dragging it so that it's bigger. That makes it easier to see the songs that you have queued. Figure 1-9 shows XMMS with a docked Playlist Editor.XMMS is simple and effective,XMMS plays tunes in a wide variety of formats, including MP3, OGG (a patent-free alternative to MP3 — and it sounds better, too!), WAV, and CD audio (in fact, XMMS plays videos in the MPEG format as well). You can add songs to the XMMS playlist by clicking on the +FILE icon, which opens a Load Files dialog box. Navigate to your music, find the files you want to hear, select them, close the dialog, and click the Play button in XMMS. Assuming that your sound card is supported, you should hear your music.Here's another way to add music to your playlist: Open the Konqueror file manager, navigate to your songs, select the ones you want to hear, and drag them onto the XMMS playlist. Much easier, especially if you always have Konqueror open to manage files.XMMS isn't a complicated program. If you've ever used any audio player on a computer, you'll probably figure out XMMS pretty quickly. If you get stuck, or you just want to learn more about XMMS, as well as download skins and plug-ins, visit the project's home page at http://www.xmms.org.
Editing Sound Files with Audacity,Audacity is a free audio recorder and editor that can import digital audio files, manipulate them in an astonishing variety of ways, and then export them. Before you can use Audacity, though, you need a sound file to edit. The sidebar "Converting MP3s to WAVs" explains how you can acquire a sound file.Once you have a sound file, open Audacity
from the K menu by selecting Multimedia → Audacity.
Converting MP3s to WAVs,At IT Conversations (http://www.itconversations.com), you can listen to streaming audio of interviews and talks by some of the leading thinkers in technology. Streaming audio is cool, but we prefer to have files on our machine for convenience; fortunately, IT Conversations also makes everything available as a download in MP3 format. You can download a bunch of MP3 files, but some of us can't listen to someone talk while we try to write and work!
You can, however, convert the MP3s into CD audio, so you can listen to the interviews and talks while you're driving around in your car (if the CD player in your car handles MP3s, you can skip this section). To convert the MP3s into WAVs, run the following script, which you can name mp32wav and place in your ~/bin directory:

for i in *.[mM][pP]3 ; do
# convert uppercase to lowercase & space to underscore
name=$(echo $i | tr '[A-Z ]' '[a-z_]')
# replace .mp3 with .wav
name=${name//.mp3/.wav}
# convert mp3 to wav
mp3-decoder $i --wav $name
done
Caution WAV files are a lot bigger than MP3 files, so make sure you have enough space on your hard drive. A rough rule of thumb is that every 1MB of an MP3 will turn into 10MB of a WAV. Knoppix uses your RAM as its "hard drive," and you may quickly use it up if you're not careful. Run df -h to see how much space you have available on your /ramdisk. If you don't have a lot of RAM, check how much is available on one of your "real" hard drives. If you see that you have space on a "real" hard drive, mount it with write access (right-click on the icon on the Knoppix desktop, select Properties, go to the Device tab, uncheck Read only, and mount the drive).At the end of the process, you should have several WAV files that you could burn to a CD-R/W to listen to in your car (to find out how to burn them, see the "Burning CDs with K3b" section later in this chapter). Keep an eye on your available space, though. When we tried to burn the WAV for Professor Clayton Christensen's "Capturing the Upside" (available from http://www.itconversations.com/shows/detail135.html), however, it was too big—in fact, at 1 hour and 48 minutes, his talk would take almost two CDs!Tip If you get an error message when you first open Audacity informing you Error Initializing Audio: There was an error initializing the audio i/o layer. You will not be able to play or record audio. Error: Host error, another program is using your sound card. Are you listening to music with XMMS? Close it! Are your system alert sounds beeping and booping? Turn them off (from the K menu, select Control Center → Sound & Multimedia → System Notifications, check the box next to Apply To All Applications, and click Turn Off All Sounds)! For more help on this issue,see
http://www.audacityteam.org/wiki/index.pl?LinuxIssues.With Audacity running, open your sound file. (We opened clayton_christensen__capturing_the_upside.wav by selecting File → Open and navigating to the file.) Audacity imports the file — slowly, because it's a big one .The entire file is visible, with the waveform showing the progress of the audio. For this example, we want to break the file roughly in half, say around the first hour mark, at a nice pause (and not just cut Prof. Christensen off in the middle of a sentence). Click somewhere near the hour mark and then click the Play button. When you hear what sounds like a good place to stop, click the Pause button, hold down the Shift key, and press and hold the left arrow key until the cursor gets all the way back to the beginning of the WAV file. (You can use the mouse, although it does have a tendency to slip and you end up cutting off the speaker in the middle of a thought.) Be sure to click the Stop button in Audacity before continuing or you won't be able to use the Edit menu. With the first hour selected, choose Edit → Cut, immediately choose File → New, and, in the new window, choose Edit → Paste.If the new waveform doesn't look like it did just a few seconds before, that's because Audacity has spread this new one out — if you scroll to the right, you can see the whole file. To return to the previous view, go to View → Fit in Window, and everything is scrunched together again.To save the new WAV file, select File → Export As WAV, navigate to the location where you want to save the file, and enter an appropriate filename; for this example, that might be clayton_christensen_-_capturing_the_upside_1.wav (remember that it was taken from the beginning of the original file, so it's now part one).Close this file and go back to the original. Once again, select File → Export As WAV, navigate, and save the file as clayton_christensen_-_capturing_the_upside_2.wav (because it's the second half of the original file). The original WAV file isn't needed any longer, so you can delete it to reclaim that disk space.Now there are two files of CD-burnable length; you can burn them both using K3b (discussed later in this chapter) and enjoy Prof. Christensen's brilliant observations in your car during those long road trips. That's just one of the many, many things possible with Audacity. To use the program to the maximum of its capabilities, you really need to investigate Audacity further. You can start with a visit to Audacity's home page at http://audacity.sourceforge.net, and then move on to a Google search for "audacity tutorial." You'll find a lot of great stuff.

v.Viewing Images

Who doesn't like importing and viewing pictures of their friends? And then using software to distort their friends' heads so they look like yumpkin-headed freaks before emailing the results to other friends? Yes, Knoppix makes it all possible. In fact, that's its new motto: "Knoppix: Making Yumpkin-Heads Possible for Years." OK, that part's a silly joke — but the rest is true. Honest!

Using Kuickshow,When it's time to view pictures, you're looking for three things: speed, wide compatibility with a variety of image formats, and the capability to automatically resize an image when it's larger than the monitor. Knoppix comes with Kuickshow (see Figure 1-12), a program that nicely meets those three goals. Open Kuickshow from the K menu by selecting Graphics → Kuickshow:Theoretically, once Kuickshow is open, you choose File → Open and navigate to the image you want to see, select it, and then view it in Kuickshow. In reality, many folks use the Konqueror file manager to navigate to the image they want, right-click it, and select Open With → Kuickshow. Kuickshow opens, displaying the image. If you want to view other images in the directory, the quickest way is to press PgDn/Page Down on your keyboard to view the next image, and PgUp/ Page Up to view the previous image.There aren't any menus visible in Kuickshow, because it's kind of a bare-bones app. You can, however, make a few changes to the image you're viewing in Kuickshow. To see your options, right-click the image and take a look at
the contextual menu.Everything is pretty self-explanatory in this menu, so it's easy to use. Don't forget that it's available at any time with a simple right-click.

Editing Images with GIMP,Think of the GIMP (the GNU Image Manipulation Program) as an attempt to create an opensource PhotoShop. Now, it's not there yet … but it's getting better all the time, and it's probably good enough for the needs of at least 90 percent of users. Certainly, if you're using Knoppix to perform some quick ‘n’ dirty work, you'll find that the GIMP is probably just right. You'll also find that it's a big, complicated program, worthy of a book on its own. There is no way to cover even a fraction of the GIMP's capabilities here, but we'll point out a couple of things to whet your interest in this fascinating addition to Knoppix.From the K menu, select Graphics → GIMP Image Editor and then open an image from within the program, right-click an image, and choose Open With. Unfortunately, KDE in Knoppix isn't set to include the GIMP by default in the list of Open With programs, so you need to add it. Here's how: Select Open With → Other. The Open With window appears. Click the + next to Graphics to expand it, and then choose GIMP Image Editor. Before you click OK, check the box next to Remember Application Association for This Type of File if you plan to use the GIMP quite a bit.Three windows are open. From left to right, they are the main toolbox, which contains the basic tools you use to work on your images; the image window, containing the picture you're manipulating; and a window containing several panels joined together, including Layers, Channels, Paths, Brushes, Patterns, and Gradients (let's call it the dialog window). Notice the menus — the main toolbox has the highest-level menus that govern the image in general, the image window contains all the goodies that enable you to change the image in an almost bewildering variety of ways, while the dialog window lacks menus, which is just fine.If you know PhotoShop or Fireworks or any other image-manipulation program, then dive into the GIMP and start discovering where it has placed the equivalents to the commands you know. Don't expect to find everything — as mentioned earlier, the GIMP isn't yet up to the capabilities of the proprietary programs, but it's gaining fast.If your experience with image manipulation is neither deep nor broad), check out the GIMP's Website (http://www.gimp.org) for documentation and just start playing. Jump in with a picture on which you can test techniques and see what happens.Although most people end up using the GIMP simply to crop and resize images, here's one cool trick that shows you how powerful the program really is. The two most fun menus are Filters and Script-Fu: Filters apply pre-made changes to your picture that alter how it looks, with effects involving light, distortion, and colors; and Script-Fu enables developers to write scripts that perform several actions on a photo, changing it in amazing ways, especially for those of us who don't really know what we're doing. You can access one of our favorites by selecting Script-Fu → Decor → Old Photo. Use the dialog box that appears to make some selections and then click OK. The result is truly cool. The changes are kind of hard to see in a book with grayscale images, so you just have to try it out for yourself. There are a lot more where that came from — enough to make it possible even for someone who isn't a graphics expert to do some cool things, thanks to a great program, clever programming, and some welcome hand-holding. Acquaint yourself at least a little bit with the GIMP: It's the open-source gold standard for image manipulation.For more information on the GIMP, check out the program's Website at http://www.gimp.org. Users have written a lot about the GIMP online; search Google and you're sure to find much more information about virtually every aspect of the app.

Manipulating Graphics via the Command Line with ImageMagick,The GIMP is a great program, but it's a GUI app. If you want speed or scriptability, turn to ImageMagick, a command-line program that is amazingly comprehensive and powerful.For more info, see the program's Website, at http://www.imagemagick.org.Let's look at a couple of ways that you can use ImageMagick. It is hoped that these will start to give you some ideas that will inspire you to do far cooler things (if you develop something, share it with us — we're always looking to add new tricks to our toolbox).Here's an example. In preparing this book, we took a lot of screenshots. We could use KDE's screen capture utility, KSnapshot (available from the K menu by selecting Graphics → More Applications → KSnapshot), but it doesn't save files in TIFF format, which is what our publishers want. So we used ImageMagick and the following six lines, inserted at the bottom of the .bashrc file in /home/knoppix:
# take screenshot of chosen window, incl. kde frame
alias window='sleep 3; import -depth 8 -frame window.tif'
# take screenshot of selected area
alias selection='sleep 3; import -depth 8 selection.tif'
# take screenshot of entire screen
alias screenshot='sleep 3; import -depth 8 -window root
screen.tif'
After adding these lines to .bashrc, don't forget to run source ~/.bashrc so you can immediately begin using your new commands.
The sleep 3 command gives you three seconds to get things set up before the screenshot is taken; if you need more (or less) time, change the number. The import command, part of ImageMagick, does the real work. It grabs an image of the window, a selection of the screen that you specify by clicking and dragging a box, or the entire screen, depending on the name of the file at the end of the command. If you don't want the image to be a TIFF, change the extension to .jpg, .gif, or whatever else you'd like.We used -depth 8 in the command because if you don't, ImageMagick takes a 16-bit TIFF image, which causes the GIMP and other image programs in Knoppix to complain. If you're not saving the image as a TIFF, remove the depth option.Here's another way you can use ImageMagick: to convert a lot of images from one format to another. If you have a folder full of TIFFs that you want to convert to JPGs, for example, cd to the directory containing the images and run the following:
for i in *.tif ; do convert "$i" "${i%.tif}.jpg" ; rm $i ; done
This is a for loop that works on every TIFF in the directory. It converts the file from a TIFF to a JPEG, and removes the original TIFF image to keep things neat and clean. Don't want the original file removed? Then get rid of rm $i ; and the original TIFF will remain.If you'll be using this command a lot, turn it into an alias. If you want the freedom to use different image formats on the fly, create an executable file, named converting or something like that, in your ~/bin directory, place the following line in the file, and save it:
for i in *.$1 ; do convert "$i" "${i%.$1}.$2" ; rm $i ; done
Notice that you're including variables now. To use your script, run the following command:
$ converting tif jpg
tif replaces $1, and jpg replaces $2 in the script. Want to convert a batch of PNGs to GIFs? Use converting png gif instead, and so on.The final ImageMagick example is one that one of us wrote one night to offer some digital photos on a Website for people to download and use as wallpaper. You can try it too: Gather 50 or so images and begin opening each one in the GIMP, saving the original image in several different common desktop dimensions, including 1024 × 768, 800 × 600, and 640 × 480. You might also want a thumbnail image of about 200 × 150 so folks could have an idea of the image before they start downloading it. You want the JPEGs to be of the highest quality, except for the thumbnails, which don't need to look as nice.Manually changing multiple images is boring and tedious, so use the following script, which you can place in a file named photoresize in the ~/bin directory:

for i in *.jpg ; do
width=$(identify "$i" | sed -re 's/^.* ([0-9]+)x[0-9]+ .
*$/\1/g' )
i="${i%.jpg}"
if test $width -eq 1600 ; then
for size in 1600x1200 1024x768 800x600 640x480 ; do
convert "$i.jpg" -resize $size -compress none -quality
100 "${i}_${size}.jpg"
done
size=200x150
convert "$i.jpg" -resize $size -compress JPEG -quality
75 "${i}_${size}.jpg"
fi
done

After making it executable with chmod 744 photoresize, the script ran perfectly. Most of our images were 1600 × 1200, but not all. We needed some way to only work with the largest images, and the identify command was it. Running identify sample.jpg gives you information about the image that looks like this: sample.jpg JPEG 1600x1200 DirectClass 8-bit 641kb 0.0u 0:01. Now you know the dimensions, but if you only care about the width, that's where sed (stream editor, an old Unix command) comes in.Basically, sed and some regular expression work get the number that corresponds to the width of the original image and write that number to the width variable.Now the script performs a test: Does the number in the width variable equal 1600? If not, nothing happens, and the image is skipped. If it does match, the oh-so-versatile convert command kicks in and changes the dimensions of each image, while also using the highest quality and no compression. Each file is renamed to include the dimensions in the filename to make things clear.Yes, convert can change more than just file types and dimensions. In fact, it can do a whole lot more. man convert should be your next stop.When the whole process is finished, you'll have a nice collection of photographs in a variety of common dimensions, ready for upload to a Website to be shared (under a Creative Commons license!) with anyone.

vi.Watching Video

Digital movies have been getting more and more popular over the last several years as the Internet pipes coming into our homes and businesses have been getting larger and faster. Although ultimately limited in a few key ways, Knoppix enables you to listen to and watch those movies and videos.

Checking Out Video with xine,xine is hardly my favorite video player, for a simple reason: Its UI is pretty bad. Don't get us wrong: The underlying xine video engine is great, but the xine interface is almost baffling in its complexity and lack of clues and feedback. Regardless, that's what Knoppix includes, and so that's what we'll peek at.You can use APT to install other video players with better UIs. In particular, check out mplayer, Kaffeine, or Totem.Open xine from the K menu by selecting Multimedia → Video → xine media player, but you'll probably use it more often by right-clicking a video file and choosing Open With → xine.To control playback, right-click the movie and use the items in the menu. Although xine is pretty simple, it's simply not very pretty to use.

Burning CDs with K3b.Open K3b from the K menu by selecting Multimedia → K3b. The first time you open it, K3b asks you to confirm your burner's write speeds. It probably defaults to 0, which is obviously of no help, so bump it up to the correct speed and click OK.This might be obvious, but K3b won't work unless you have a CD-R/RW device installed on your system, and Knoppix needs to have recognized it. To confirm that K3b sees your CD-R/W, open K3b, select Settings → Configure K3b, and choose the Devices button on the left. Your CD-R/W should be listed. If it isn't, click Add Device and help K3b try to find your burner. If you need broader help getting your CD-R/RW hardware to work, take a look at the CD-Writing HOWTO at http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html.Here's something else you need to consider: You can't burn a CD if Knoppix is taking up your only CD-R/W drive! If you have two CD drives, you're set: Boot Knoppix in one and use the other to burn. If you only have one CD-R/W drive, you may need to install Knoppix on your hard drive (see Appendix B) to free your CD drive for the burn (you can uninstall Knoppix after you've checked your new CD).K3b makes it very easy to get started by providing buttons for the four most common tasks in the project view. To burn a data CD for backup, choose New Data CD Project. The project view area changes to Current Projects, K3b is divided into two main areas: a file and folder navigation area in the top half of the window and a project view in the bottom half, Using the top half of the window, navigate to the items you want to burn and begin dragging them into the bottom half of the window. As you add items, the bar at the bottom of the window shows you how much space you've taken up on your CD and how much you have left. Gone over the limit? Just select an item in the project and press your Delete key to remove it from the burn. Once you've correctly specified the items you want to save onto a CD, click the Burn button in the bottom right of the K3b window.A new window opens up: Data Project. This is an extremely important window because it enables you to tell K3b exactly how you want to burn your CD. You have several options here, and selecting the wrong one can mean the difference between a successful backup and a shiny hunk of plastic.To lessen the chance that you'll end up with a bad burn, this section covers the key changes you need to make. There's not enough space in the book to cover everything, but K3b has informative built-in help. If you're unsure about an option, just click the What's This button (the one that looks like a question mark) in the upper-right corner of the window, and then select the option in the window about which you'd like more information.

vii.Setting Burn Speed.

The first thing to set is the speed at which you're going to burn your CD. Do this on the Data Project window's Writing tab ,If you leave Speed set to Auto, K3b tries to burn at maximum speed. This may or may not work. Experience has shown that it's a good idea to burn at a slower speed to ensure that the burn is not problematic, no matter what software you use. If you have the time and patience, 4x is slow and steady and almost always works. Granted, it takes about 15 minutes or so to burn a full 700MB disc, but if you do something else while you're burning, it's not a big deal. If you're not that patient, start out fast, test your results, and be prepared to slow things down gradually, testing after each burn until you find the optimum speed for your hardware and your media.If you leave On the Fly selected, K3b does just that: write the files directly to the CD-R/W without first creating an ISO image. If your hardware is fast enough, this should be no problem. If your hardware is slow, however, or if you're experiencing problems burning, check On the Fly; K3b will first create an ISO image of your data, and then burn that ISO image to disc, a process that takes longer but is more likely to result in a good burn. If you uncheck On the Fly, Remove Image is no longer grayed out; however, you should probably leave Remove Image checked so that K3b erases the ISO it created once it has successfully burned it to disc, thus reclaiming your storage for Knoppix.
Remember that Knoppix is using your RAM as its hard drive, so you may not be able to write an ISO image unless you have enough RAM to hold it. To find out how much space you've got, run the df -h command in Konsole and note how much free space is available on the /ramdisk row. If you don't have enough room, check how much is available on one of your mounted hard drives. If there's space, mount the hard drive with write access (right-click on the icon on the Knoppix desktop, select Properties, open the Device tab, uncheck Read Only, and mount the drive). One last step: Tell K3b that you want it to use your hard drive to hold the ISO by changing the path for Write Image File To (which is no longer grayed out once you uncheck On the Fly on the Writing tab) so that it points to your newly mounted writable hard drive. Yes, it's a lot of work, but that's what happens when you're using a Live CD.It's generally a good idea to select Verify Written Data (the final option on the Writing tab), which compares what was burned to the original data, thereby letting you know if something didn't work correctly.
Burning in Sessions,You need to change the settings on the Data Project's Settings tab (see Figure 1-20) only if you plan to add content to your CD over several different burning sessions.Most of the time, you'll probably fill a CD completely, so you want the default: No Multisession. If you're going to use several different sessions, you don't want K3b to "close" the disc until you're finished. To do this correctly, use Start Multisession for the first burn, Continue Multisession for the next burns except the last one, and then complete your CD-R/W with Finish Multisession, which tells K3b that it's all right to close the disc. You'll use the default No Multisession most often, but it's good to know how to create a multiple-session CD if you need one.

viii.Keeping Yourself Informed.

None of the information on the Volume Desc tab prevents a successful burn, but you'll probably want to spend a moment here just so things are organized and clear. In other words, this tab really isn't for the computer — it's for the human user. Fill things out as you see fit.

ix.Understanding Filesystems.

The Data Project's Filesystem tab (see Figure 1-22) is very important, especially if you want to make sure that your disc can be used on both Linux and other operating systems. For backups, this is an essential consideration. If you never have to touch a Windows machine, this tab may not be as significant to you, although there are still things here that you will probably want to set.Checking the boxes in the File Systems section is key if you're after cross-platform compatibility. There's a wide variety of standards for CDs, and in typical fashion in the computer world, they don't always agree. For instance, when you burn a CD, you can stick to ISO9660 standards, but all filenames must be in all capital letters, and they have to be a maximum of eight characters, plus the period and the extension. DOS, anyone? You can also use the Rock Ridge extensions, which enable UNIX systems (including Linux and Mac OS X) to read CDs that contain files with names of up to 255 characters, as well as support UNIX-like things such as owners, groups, permissions, and symbolic links. However, Windows does not support Rock Ridge (worth $50 billion and with 30,000 employees, Microsoft can't support Rock Ridge?), so don't use it as your only filesystem if you want to access your data on that operating system.
If you want to make sure that Windows users can read the content of your discs, enable Joliet extensions, which support up to 64 characters in filenames (although there's a way around this, as you'll shortly see). Users of Linux and Mac OS X can also read CDs that use Joliet, but Mac OS 9 and earlier will truncate filenames at 31 characters, a major limitation of pre-OS X Macs.UDF, which stands for Universal Disk Format, is used mainly for DVDs, but CD-R/Ws can also use it. It allows for 127-character filenames, including spaces. The idea is that you can write to CDs and DVDs just like you write to floppies, USB drives, or hard drives: just drag and drop. For UDF to work, though, you need very recent hardware and special drivers if you're using Windows or Mac OS (most Linux distros now include support for UDF-based discs). If you're shooting for wide compatibility, you probably should avoid UDF at this time.With an understanding of these different filesystems, the options on the Filesystem tab start to make more sense, don't they? If your disc is only going to be used on Linux machines (or Linux and Mac OS X), check Generate Rock Ridge Extensions. If you use Rock Ridge but you don't want symbolic (or "soft") links included on your burn, check Discard All Symlinks. If you are concerned about including soft links, but you want to make sure that you don't accidentally include links to files that aren't included in your burn project, make sure that you check Discard Broken Symlinks.In addition, remember that if you're using Rock Ridge, you can tell K3b to include information about file permissions along with the burn. To do this, check Preserve File Permissions (Backup). As the name implies, this creates an exact backup of your files — not just the data, but also the meta-information about who owns it and what they can do with it.If you want to include Windows machines in your burn, check both Generate Rock Ridge Extensions and Generate Joliet Extensions. Your Linux machines will see files of up to 255 characters, while Windows will see files truncated to 64 characters … unless you check a box on the next tab, which we'll get to in just a moment.The options in the Whitespace Treatment area of the window can be useful if you want to get rid of spaces in the filenames on your disc. No change does just that — files that have spaces in their names still do. Nowadays, this isn't really a problem for Linux boxes, so we just usually leave K3b set to that.Over the years, the standards for burning CDs have morphed in many different directions. Fortunately, most modern hardware and modern operating systems support most of these addons and extensions, but it's still a good policy to test all burned CDs on the various CD readers that you plan to use before you rely on those discs! It would be a shame to make backups of your vital data onto CD, intending to transfer the data to a different machine, only to find out after you've repurposed the original box that the different computer can't read your discs. Testing is always worth the time it takes.

x.Fine-Tuning CD-R/W Filesystems.

Getting beyond the 64-character limit for the Joliet extension was mentioned earlier. Here's how to do it: Check Allow 103 Character Joliet Filenames, and you almost double your allowed filename length on Windows machines. Does this break the official Joliet standard? Yup. Does it appear to work anyway in Windows? Yup, so go for it (but remember to test first). Also remember that you can get up to 255 characters in your filenames using Rock Ridge but only 103 characters using Joliet. Still, for all but the longest of filenames, 103 characters should suffice.The Allow Untranslated Filenames option has nine sub-options. Checking Allow Untranslated Filenames activates eight of those sub-options — weirdly, you must enable Allow Max Length Filenames (37 Characters) if you want it because that option isn't included by choosing the parent option.In essence, checking either Allow Untranslated Filenames or any of its sub-options breaks the ISO9660 standard. We recommend going ahead and selecting Allow Untranslated Filenames anyway; in for a penny, in for a pound, as they say. Realize that your CD will not play in MS-DOS, but how concerned about that are you? We've burned countless discs with that option on, and we've never had a problem in either Linux or Windows playing those CDs. Your mileage may vary, though.The Input Charset section enables you to specify the language character set you're using in your filenames. If you don't specify anything, K3b uses the default of ISO-8859-1, which covers Western European languages, such as the one you're using to read this book. If you're using different characters (such as Russian, Asian, or Hebrew, for example) in your filenames, specify the character set you need by checking Force Input Charset and choose from the drop-down menu. If the option you want to use isn't listed (UTF-8 isn't there, for instance), you can manually enter it.It does take some time to examine all of these options, but if you want to do your burns correctly, you have to know how to use the program.OK, it's time to burn. Click the Burn button in the upper right corner of the window. Depending on the speed of your burner and the speed you've chosen for your burn, you'll shortly be done. While K3b works, it displays a progress bar showing you what it's doing and how far it has progressed. If you get an error, take a look at the info that K3b provides because it can help diagnose the problem.You can create other kinds of CDs besides simple data disks, but that's probably what you'll use Knoppix for most of the time. The four main tasks are listed in the project area, but check out the Tools menu for other possibilities. Keep in mind that Knoppix comes with most of the software that K3b needs to work its magic, but a few things are missing for space reasons. For example, the transcode package isn't included, so you can't encode audio and video from DVD or AVI files, and you also don't have eMovix, so you won't be able to burn video CDs that will boot and automatically play. (You can add these on your own, however.) Conversely, you can create SVCDs (Super Video CDs), believe it or not.The first place to go for information about K3b is the project's home page, at http://www.k3b.org. There's not a lot there, unfortunately, but you might find something useful, such as the latest news about software releases. However, the mailing list, found at http://www.sourceforge.net/mailarchive/forum.php?forum_id=1927, is currently averaging a couple of hundred emails a month, so you might be able to find help there, maybe even from Sebastian Trueg, the creator and maintainer of K3b.If you want to learn more about burning CDs and DVDs, an excellent and up-to-date resource is Andy McFadden's CD-Recordable FAQ, which you can find at http://www.cdrfaq.org. For Linuxspecific information, see the CD-Writing HOWTO at the Linux Documentation Project, http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html. It's several years old, but still has good stuff in it.If you want to bypass K3b completely and just use the command line, IBM's developerWorks site has a great tutorial, at http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html, called Burning CDs on Linux. IBM's site requires free registration, but it's not onerous.
Using Text Editors,Linux is a testament to the continued power and relevance of plain ol' text files. Virtually all configuration information is stored in text files, and many programs are really just scripts in text files. Learn how to edit text files effectively, and you're well on your way to becoming a mighty Linux (and Knoppix) guru!

xi.Editing Configuration Files on the Command Line with vim.

Want to start a discussion that will quickly become a debate and eventually escalate into an argument? With all the innocence you can muster, ask a bunch of Linux users, "Which is better? Emacs or vi?" … and then step back and watch the fireworks. It's one of the oldest debates in the *nix world, and Knoppix comes down squarely in the middle: It includes both text editors, leaving the choice up to the user.We believe that vi (actually vim, or "vi improved") is the better of the two editors, and will explore it here. If you want to learn about emacs, there's plenty of information on the Web and in a lot of books. You should still learn vim, though, because while you can't be sure that emacs is on every single *nix machine you'll run into, you can be certain that vi (and probably vim) will be installed. Learn vi, and you increase the likelihood that you can fix a machine by changing config files.Knoppix includes both console and GUI-based versions of vim. This section covers only the console version, for a couple of reasons. First, if you learn to use vim on the console, moving to the GUI is a piece of cake. Second, the GUI may not always be available, but the console will.Suppose that you need to edit your hosts file so that you can more easily ssh to a couple of the boxes on your LAN. Open Konsole (it's the black icon on the panel) and run cp /etc/hosts to copy the file to your home directory. Now type vim hosts and press Enter, and the newly copied hosts file opens,If you've never used vim (or even emacs) before, you're probably a bit confused at this point. What do you do? Why doesn't anything appear when you start typing? How do you save? Or quit?The first thing to understand is that vim operates in one of several different modes at a time. When you first open vim, it's in command mode, in which you use your keyboard to move the cursor around, delete information, cut, copy, and paste, and run commands that affect your file (because this is a console app, you can't use your mouse). You want to position the cursor so that you can enter some data. To do so, use the arrow keys on your keyboard (because Knoppix supports them), or use the following key commands:

h: Moves the cursor one character to the left.

j: Moves the cursor one character down.

k: Moves the cursor one character up.

l: Moves the cursor one character right

To learn more about vim and all of its commands, just type vim on the command line, and then : help to enter vim's built-in help system (enter :q to get out of help, of course), or look on the Web by searching for "vim tutorial," "vim help," "vim tips," or ".vimrc" if you want to find sample vim config files that people have posted, which can teach you a lot.Position the cursor at the end of the first line and press a. You're now in the insert mode, in which you can insert characters and text into your file. The letter a (append) indicates that you want to append text after the character your cursor is on, while the letter i (for insert) means that you want to begin inserting before the character your cursor is on (again, you can use other commands to signify precisely where you want to begin placing text into the file).For this example, press Enter so you're on a new line and then enter three new lines into the hosts file, pressing Enter after each one to start the next:

192.168.0.10 dante
192.168.0.15 chaucer
192.168.1.20 virgil

You know you should save your work often, but you can't do that while you're inserting text. The solution? When you're in insert mode, press Esc to return to command mode. Now enter :w (colon, w) to write out (save) the file. To write and immediately quit (exit), use :wq (colon, w, q); to quit without saving your work, use :q! (colon, q, exclamation point).For this example, there are a couple of problems in what you just entered, and here's how to fix them. Chaucer is temporarily offline, so it doesn't need to be in the hosts file. You're still in command mode, so maneuver the cursor (using the arrow keys or key commands) until it's somewhere in the Chaucer line. To delete a line, enter dd while in command mode; the entire line disappears.The second problem is a typo in the line about Virgil: The IP address is 192.168.0.20, not 192.168.1.20. That's easy to correct: Position the cursor over the 1, press x to delete just that character, press i to enter insert mode, type a 0, press Esc to go back into command mode, and finish with :wq, which writes the file out and quits vim.Vim really isn't that difficult to work with — it just takes some getting used to. Once you're comfortable with the basics, it's easy to keep expanding your vim knowledge base, with scripts and macros and regular expressions and all sorts of other fun, powerful stuff. The sooner you can do just a little bit with vim, the sooner you're on your way to using Knoppix more effectively.

xii.Editing Configuration Files Using the GUI Editor Kate.

At last count, there were more than 7,000 text editors available for Linux. OK, that's an exaggeration … though not much of one. Knoppix includes a few text editors, and they serve their purpose. Probably the easiest-to-use-right-out-of-the-box GUI text editor on the Knoppix disk is Kate. Kate is powerful and officially targeted at developers, although anyone can use it.From the K menu, select Editors → Kate. Kate opens, If you're reading this book, you've used a text editor sometime in your life, even if it was just Notepad. Kate is very easy to use for simple tasks because it's pretty much like every other text editor in the world, but it contains a lot of special features that make it appropriate for more sophisticated work as well.There's only space to point out a few of Kate's features here. The best way to learn more about Kate is to go through all the menus, playing with the options and trying things out.Ever wanted to view different parts of the same file at the same time? Select View → Split Vertical, which enables you to do just that. To return to the single display of a file, select View → Close Current View.Need to run a command against the file you're working on, but don't want to switch to Konsole? Click the Terminal button at the bottom of the window; a resizable console frame appears, already targeted at the directory in which your file resides. Perfect for a quick wc -w file.txt (to find out the number of words in your file) or to run ifconfig to grab your machine's IP address and paste it into your file. To close the console, click the Terminal button again.Finally, do you need to directly open a file on another machine accessible only via SSH, and find that downloading, editing, and uploading it again would be too much trouble? No problem. Kate supports KDE's built-in networking transparency, so select File → Open, and in the Location box enter fish://username@other.computer.com (you can use an IP address instead of the domain name, if you want). You may have to accept the machine's SSH key if this is the first time you've connected to it (answer in the affirmative if asked). Enter a password when you're prompted, and boom! You're connected to that machine over a secure connection. Select the file you need, click Open, edit it, save it, close it, and you're done. You just remotely edited a file as though it were sitting right on your machine. Pretty cool, eh? Note Kate, like any KDE app supporting the built-in libraries providing network transparency, can work with files using a variety of protocols, including FTP, SFTP, SMB, NFS, and WebDAV. For a quick overview of KDE's network transparency, see http://www.osdir.com/Article2159.phtml.
Working with Office Software,Like Dilbert, many folks spend their days sitting in offices, working for the Man, trying to earn their daily bread. If you're among them, having Knoppix in your arsenal at least provides you with a cool operating system while you do your time in cubical prison.

xiii.Enjoying Interoperability with OpenOffice.org.

Office suites are important. In 1984, Apple introduced the first office suite — AppleWorks — a collection of integrated software that enabled users to create text documents, crunch numbers, and work with data (software to give presentations came later). Although it was underpromoted by Apple, and ran only on the Apple II instead of the new Mac, it still proved to be incredibly popular. When Microsoft released Office 95 to coincide with the release of Windows 95, there was no looking back. Now, many people spend most of their workday inside their software office suite.Microsoft may currently dominate the office suite software market, but things are slowly starting to change. A free, high-quality, open-source office suite has been a long time in coming, and one is finally here: OpenOffice.org (known as OOo to devotees). It runs on Mac OS X, Windows, and Linux; it provides a word processor, spreadsheet, and presentation program; and it exchanges documents with Microsoft's Office suite beautifully. It's an essential tool for any computer user, and it comes with Knoppix.Unlike some other office suites, OpenOffice.org is not designed to lock in users by forcing them into proprietary data formats. Because it has this philosophy, OOo supports a wide variety of formats, including some that may surprise you.Most users of OOo know that it reads and writes Microsoft Office formats pretty well. You can open Word, Excel, and PowerPoint files and templates, and it's a pretty sure thing that OOo will display them much like the original Microsoft apps would. In addition, you can save files using Microsoft's Word, Excel, or PowerPoint formats, and most users of those programs should have no problem opening and using your documents. In fact, they'll probably never know that you used something other than a Microsoft program unless you tell them.OOo actually enables you to save your work in a cornucopia of formats, including the following (listed by application):

OOo Writer gives you the options of OpenOffice.org 1.0, Microsoft Word 97/2000/XP,

Microsoft Word 95, Microsoft Word 6.0, Rich Text Format (RTF), StarWriter, text, and HTML.

OOo Calc provides OpenOffice.org 1.0, Microsoft Excel 97/2000/XP, Microsoft Excel 95, Microsoft Excel 5.0, Data Interchange Format, dBASE, StarCalc, CSV, and HTML.

OOo Impress allows for OpenOffice.org 1.0, Microsoft PowerPoint 97/2000/XP, StarDraw, StarImpress, and HTML.

The OpenOffice.org formats are good. They tend to be much smaller in size than their Microsoft counterparts (because they're really just zipped XML-formatted text files); they're open and available to anyone, rather than closed and proprietary; and they're the basis for efforts by the Organization for the Advancement of Structured Information Standards (OASIS) to standardize on a common, open, XML-based format for office suites (predictably, Microsoft has taken a "wait and see" approach to OASIS' goals). However, as with most everything in the open-source world, OOo gives you options and leaves the final decision up to you.One of the most useful file types that OOo supports is Adobe's PDF. Using OOo 1.1, create a text document and then select File → Export as PDF, or, if you prefer to use the toolbar, click the Export Directly as PDF button, The OpenOffice.org function toolbar, with the Export Directly as PDF button in the center, between the Edit and Print buttons.OOo creates excellent PDFs, readable by any Linux, Mac OS X, or Windows user. It really is a fantastic benefit and, as with so many of the really cool things about OOo, it's 100 percent free and built in to the program.In addition to PDF, OOo now supports a format that may surprise some of you: Macromedia's Flash. Yup, that's right. Macromedia Flash, the cause of so many annoying animated advertisements and useless splash pages on the Web, is now available for export by OOo users—specifically, OOo Impress users. If you create a presentation, select File → Export; from the File Format drop-down menu, choose Macromedia Flash (SWF) (.swf); and you're done.Complaints about Flash aside, the capability to export to this format is a pretty useful feature. Flash is widely supported (to the tune of more than 90 percent of Web users, according to Macromedia), and it produces small files that are completely cross-platform. An exported presentation can be placed on a company Website, and users can open it with their Web browsers to view it. If a user clicks on a slide, the next one loads.OOo is a powerful, deep program, and it's constantly getting better. If you're using Knoppix, however, you're probably not going to use OOo to write your next novel. Instead, you're more likely to recover or quickly edit a few documents. The capability to export those documents in a variety of popular formats is an essential feature of OOo that makes it a key part of your Knoppix toolkit.The first place to go for information about OOo is, not surprisingly, http://www.openoffice.org. This is the mothership for OOo users, where you can download the program, read the latest OOo news, get some aid if you need it, and contribute to the project if you're so inclined.The most active online forums for OOo can be accessed at http://www.oooforum.org, an excellent resource.Another great place to look is http://www.openoffice-support.net, which includes tutorials, descriptions, and HowTo's. The tutorials in particular are quite nice, especially for anyone desiring a lot of screenshots to help in learning the basics of OOo.

xiv.Desktop Publishing with Scribus.

Scribus is an open-source desktop publishing application that enables you to design, create, and produce documents for publication that contain complex layouts, such as newsletters, brochures, ads, fliers, and even magazines. In addition, because Scribus outputs as PDF (perfect for handing off to your local print shop), you can generate PDFs with advanced features — such as forms and passwords — hitherto only available with the purchase of Adobe's full Acrobat package (which is expensive and does not run on Linux). Scribus brings the full world of desktop publishing (DTP) to Linux and Knoppix — an amazing achievement.From the K menu, select Office → Scribus. Scribus is enormous in capabilities and features, so big that it really needs a book of its own. There's no way to cover the program in any meaningful way here, especially for those who may be new to DTP, so our advice is to just jump in. If you've ever used PageMaker or Quark, you should be right at home in Scribus; if you haven't, Scribus is an excellent program in its own right that you can use to bring yourself up to speed with the world of DTP. Consider it a tremendous bonus that Knoppix makes it easy for anyone to try out this truly amazing program, a harbinger of open source's maturity and growth.Note For some excellent overviews of Scribus' capabilities, see http://www.linuxdevcenter.com/pub/a/linux/2004/09/02/scribus.html and http://www.linuxjournal.com/article/7054.For details on Scribus, go to the program's Website, at http://www.scribus.net. There's a ton of great information there, including documentation (a lot!), tutorials, a wiki, downloads, and more.

xv.Viewing PDFs with Adobe Acrobat Reader.

Linux comes with a wide variety of PDF readers, and Knoppix itself includes KGhostView, GV (GhostView), and Xpdf, in addition to the official one, Adobe's own Acrobat Reader.You can start Acrobat Reader from the K menu by selecting Multimedia → Viewers → Acrobat Reader, but you'll more commonly click on a PDF you've downloaded, or on a link on a Web page that points to a PDF; and your PDF reader will open, already displaying the file you want to read. Knoppix comes with Adobe's Acrobat Reader as the default app to view PDFs, so you don't need to change anything.Acrobat Reader supports text selection, which can come in handy if you want to get some text out of a PDF and into another program. To turn this on, click on the text selection icon on the toolbar,Note two caveats about text selection, however: First, it won't work in every PDF, only those that have not "protected" their content (most don't, but some do), and second, sometimes text selection acts weird. For example, one of us grabbed some text out of a PDF we had created and then pasted what we'd copied into a text editor. Every instance of the letter "l" was left out! Very weird.Acrobat Reader is good if you need to quickly read or print a PDF, but if you need to do some serious work, the command line might be a better option for you. You probably know about the ps2pdf command, which converts PostScript documents into PDFs, but there are others you should know about as well, and all of them are built into Knoppix:

pdf2ps: Converts a PDF to Postscript, which can sometimes help you get around some stupid restrictions that someone put into place with his PDF. Try pdf2ps, and then turn around and immediately do ps2pdf, and you'll often have a usable PDF, sans silly DRM restrictions. Here's the syntax:

pdf2ps sample.pdf

pdftotext: Converts a PDF directly to plain text. This works very well. Of course, all formatting is lost, but you have the text, which you can now use in any imaginable way. Here's the syntax:

pdftotext sample.pdf

tiff2pdf: Converts a TIFF image into a PDF. The TIFF must be an 8-bit image, or the command won't work. Here's the syntax:

Sample: tiff2pdf sample.tiff > sample.pdf-

As you can see, there's more than one way to skin a PDF. Go ahead and use Adobe Acrobat Reader, but keep an eye on KPDF, another PDF viewer with a lot of promise, and don't forget these really useful commands — they may come in handy at times. Note Knoppix is still using the now ancient Adobe Acrobat Reader 4.0, and version 7.0 just came out. The latest is in fact the greatest, and I'm hoping that it winds up in Knoppix soon.For a good overview of several PDF readers for Linux, check out LWN's "The Grumpy Editor's Guide to PDF Viewers," available at http://www.lwn.net/Articles/113094. In particular, KPDF is going to radically improve once KDE 3.4 comes out, and a later revision of Knoppix includes that version of KDE, which is great news. KDE.News has the story at http://dot.kde.org/1102870587.

xvi.Comparing Two or More Files with Kompare.

Kompare is a GUI wrapper for the diff program, an ancient (since the 1970s!) UNIX utility that displays the differences between two text files. Here's an example that explains how Kompare — and diff — works. One of us has been working on a poem for a while (more than 12 years), and periodically it is edited. The original file is titled hoarding_our_lives.txt; after a few tentative changes, it was saved as hoarding_our_lives_2.txt. After reading the second one, it wasn't clear which one was better, but trying to compare the two files was a bit of a pain. Enter Kompare.Start Kompare from the K menu by selecting Development → Kompare. The Compare Files or Folders window opens, and you're asked to choose your files. Here's our advice: don't do it yet! Instead, choose the diff icon on the left side of the window, enter /usr/bin/diff in the Diff Program textbox, and then go back to choosing the files you want to compare by clicking the Files icon.

2.Maximizing Knoppix Internet Tools.

The Internet has been central to the growth of Linux — after all, Linus Torvalds could not have marshaled the enthusiasm and work of thousands of people all over the world without it. That's also true for Knoppix. Klaus Knopper is German, but people all over the globe have helped build Knoppix into the exciting, innovative product it is today. This chapter explores the many ways you can combine Knoppix and the Net.Before you use all the really cool Internet tools that are introduced in the second half of this chapter, you first have to get on the Internet. Most of the time, this isn't a problem: You just boot your computer with the Knoppix CD inserted, and at the end of the boot process, you're connected. Things grow complicated, however, if your hardware isn't recognized or you still can't access broadband.

i.Connecting via Your Modem.

If you're still using dial-up to access the Net, don't despair — you can still use Knoppix. However, the same caveats applicable to modems used with any Linux distro apply to Knoppix: internal modems may or may not work (if it's a WinModem, probably not), external modems are more likely to work. If you're using a laptop, the built-in modem probably is a no-go, but a PCMCIA modem is most likely OK.In other words, if Knoppix detects your modem, great. Things are looking good, and you should be able to get online. If Knoppix doesn't detect your modem, you have to decide how much time and energy you want to put into getting your modem to work. You can look around on the Knoppix forum, but don't expect very much, frankly. That's why I always keep spare PCI and PCMCIA modems around; I know they work with Linux, and especially Knoppix. Here's the hardware I rely on:

PCI: USRobotics 3CP5610

PCMCIA: USRobotics Megahertz XJ1560

To set up your modem, open the Knoppix menu and select Network/Internet → /dev/modem Connection Setup. You'll be given five options: Serial, USB, IrDA, Bluetooth, and Winmodem. Choose Serial, USB, or Winmodem — whichever matches your hardware — and see whether Knoppix can get your modem working.Let's assume that Knoppix recognizes your modem. (If it didn't, you'll have checked out PCI or PCMCIA modems and gotten one working yourself.) Now it's time to get connected.First you have to set up your dial-up account. From the Knoppix menu, choose Network/Internet → Modem Dialer. Once the Modem Dialer window opens, click Configure, which opens the KPPP Configuration window (yes, you're using KPPP, the KDE PPP tool), On the Modems tab, select your modem and click Edit. In the Modem window, select the Modem tab and click Query Modem. You should see a string of text go by indicating that Knoppix and KPPP have detected your modem and that it works. This is just an easy way to remove one big item from your troubleshooting list if you find that your modem isn't working.Return to the Accounts tab and click New. The window that opens asks whether you want to use the Wizard or Manual Setup; if you live in the U.S., don't bother with the wizard, because there's nothing in it for you. Instead, just click the Manual Setup button, which opens the New Account window,In the Connection Name field, enter something meaningful to you, such as Earthlink or Panix. Click Add to enter the phone number. Enter only the digits — no spaces, parentheses, or hyphens. That's probably all that you'll have to do in the entire window. If your ISP has given you other stuff to configure, go ahead and do it; otherwise, click OK to close the New Account window, and you're back at the KPPP Configuration window.To try out your dial-up connection, click OK to close the KPPP Configuration window so you're back at the KPPP window. Enter a Login ID and Password, check Show Log Window so you can tell what the heck is going on (more troubleshooting help), and click Connect. If all is well, the sound of two modems communicating should fill the air, and you are connected eventually. Then you can start enjoying the Internet at 56 Kbps (or worse!) speeds.

ii.Getting Broadband Working.

The category of broadband includes DSL, cable, and even ISDN, the original broadband. No matter what you use, you really must have a router/firewall sitting between your network (even if it's only one computer) and the big bad Internet. Don't agonize over this issue: Routers are cheap nowadays (you can get a good Cable/DSL router for $35 or less at Amazon, for example), they're super easy to set up and use, and they do a good job protecting your network. Therefore, no excuses — get one, set it up, and use it.You'll find that there's an additional benefit as well: virtually every SOHO router/firewall acts as a DHCP server (Dynamic Host Configuration Protocol — for more info, see http://en.wikipedia.org/wiki/DHCP), which means that booting a Knoppix machine on such a network is as smooth as silk. Basically, you start up the computer with the Knoppix disk inserted, allow Knoppix to do its automatic detection thing, and soon enough you're connected to the Internet. It's really, really easy.If you're not using a router (please go buy a router) and you have a direct ISDN connection, then from the Knoppix menu select Network/Internet → ISDN connection. Make the necessary configurations, and away you go.If you're not using a router and you have DSL with PPPoE (please go buy a router), go to the Knoppix menu and choose Network/Internet → ADSL/PPPOE configuration. Fill in the required data and you should be online. Your first stop will be some online store to buy a router, right?

iii.Cruising Wirelessly.

Wireless is wonderful when you can get it and it performs correctly, but it can sometimes be a pain to get it going. If you're using an 802.11b card, you'll probably have few problems because most B cards work with Knoppix. A laptop using Intel's Centrino technology, however, may or may not work even though it's based on 802.11b; it was only recently that Intel released the necessary info to open-source developers so they could get Centrino working with Linux. G cards are a different story. Few work natively in Linux at this time, although that's changing; in the meantime, you can try using the ndiswrapper software, which enables you to use Windows drivers to power your G cards under Linux. When ndiswrapper works, it's great; when it doesn't, forget it. Drop back to a B card if you can. Tip Earlier I noted I always keep both PCI and PCMCIA modems around because I know they work with Linux. I do the same thing with 802.11b. My card of choice is the Lucent Orinoco Gold, which has worked beautifully for me for years. If you can pick one up on eBay, you really should — and the older the card you can get, the better, because wireless card manufacturers keep messing around with their cards' chipsets.If Knoppix recognizes your card when you boot, you're in wireless heaven. By default, it uses DHCP to get an IP address and all the other needed data for accessing a network. The only hitch may be that the wireless network to which you're attempting to connect uses WEP or WPA to encrypt traffic. If so, you will not connect at first. Instead, from the Knoppix menu select Network/Internet → Wavelan configuration.A dialog box opens, informing you that you're about to change the parameters of your wireless card: eth0 or eth1, for instance. Click OK. If you want it to work with any wireless access point no matter what the ESSID is, just leave the ESSID text box blank; otherwise, enter the ESSID. Either way, click OK when you're ready to move on.Next, you're asked for the NWID, or cell identifier. If you need to set the network ID, which helps separate logical networks, enter it, but most of the time you can just leave this blank and click OK.Set the mode for your card. If you leave it blank, you're choosing Managed; otherwise, enter one of the other listed options (most likely Ad-Hoc if you're not using Managed). Here's what the different modes mean:

Managed: Also known as Infrastructure, in this mode a wireless access point (such as a SOHO wireless router, for example) is used to link a wireless network with a wired one.

Ad-Hoc: If you want to connect two or more wireless machines together without a central hub or switch, use this mode.

Master: Your machine is acting as an access point for other wireless devices.

Repeater: Your machine simply forwards wireless packets.

Secondary: Your machine is either a backup master or a backup repeater.

Auto: Knoppix makes the best choice it can determine, which most likely means Managed.

Make your choice — probably Managed or perhaps Ad-Hoc — and click OK.Most of you should just leave the Channel Number box empty, which allows Knoppix to automatically select the one it detects. If you know that you're supposed to use a specific channel number — they range from 0 to 16 — go ahead and enter it. When this dialog is correct for your network, click OK.It's best to leave the card frequency box blank, so that it's automatically entered for you, but if you really must enter something, make sure you enter the correct number:

802.11a: 5.15-5.825 GHz, entered as 5.825G, for instance

802.11b: 2.412-2.462 GHz (for the US; other countries vary), entered as 2.412G

802.11g: 2.412-2.462 GHz (for the US; other countries vary), entered as 2.412G

Note To learn more about the exact frequencies your hardware supports, read your vendor's product detail pages, available on the company's Website or included with your wireless card.Click OK. The next dialog asks for the encryption key — the WEP (Wired Equivalent Privacy) key. If your access point isn't using WEP, leave the box empty; otherwise, enter the 64-bit or 128-bit key. Click OK.Enter any additional parameters for your wireless card, if you need any (you probably won't have any). Click OK.Tip All of these dialog boxes are constructing options for the iwconfig command, so if you know that command well, you can skip the entire configuration process and just use the command line, with sudo.You're almost finished. The next dialog asks for any additional parameters for iwspy, which helps gather wireless statistics. Leave it empty (unless you really know what you're doing) and click OK. Then you're asked whether you have any additional parameters for iwpriv, which is for settings specific to your particular wireless card driver. Again, leave the text box empty, and click OK. The dialog box closes, you see several settings flash by in the open terminal window, and then — bam! — that window closes, and your wireless card should be working. Tip If you ever have problems with a working wireless card, make sure your wired connection isn't currently on (run sudo ifconfig to see your list of connections). If it is, take down the wired connection (let's say it's eth1) with this command: sudo ifconfig eth1 down.If you have a G card and you have to use ndiswrapper, you have another adventure ahead of you. ndiswrapper is undeniably cool, but it can be a bear to set up. Note For the details about ndiswrapper, check out the project's home page at http://ndiswrapper.sourceforge.net. Even more useful is the project's wiki, at http://ndiswrapper.sourceforge.net/phpwiki/index.php/.Open the Knoppix menu and select Network/Internet → ndiswrapper configuration. The dialog warns you that you're going to need the .inf and .sys files for your G card's drivers. That is where the fun often begins. If you still have the CD with the original drivers, you're probably not going to tear your hair out. If you don't have that CD, get the necessary driver from the vendor's Website, put it on a USB flash drive or burn it onto a CD, and mount the device onto your Knoppix box. If you can't find the driver, head to the ndiswrapper project's Web page that lists supported cards and drivers (http://ndiswrapper.sourceforge.net/phpwiki/index.php/List) to try to find the one you need.The ndiswrapper configuration script walks you through the process. You locate your .inf and .sys files, and set up those drivers. Unfortunately, you must now configure your wireless card by hand, not that it's a big deal. Here's how:

Enter the following on the command line:

$ sudo iwconfig

That verifies that your system recognizes that it has a working wireless NIC.

Ensure that your card sees an access point by running the following:

$ sudo iwlist eth0 scan

The results of this command tell you that your card is working and can interact with your local access point.

Assuming that Knoppix saw a wireless card at eth0, the following key commands can be used:
$ sudo iwconfig eth0 essid essidname: Sets your ESSID. Change essidname to the actual name you need to use. To connect to any ESSID, use any for essidname.

$ sudo iwconfig eth0 mode modetype: Sets your mode. Substitute modetype with Managed, Ad-Hoc, and so on.

$ sudo iwconfig eth0 key restricted wepkey: Sets your WEP encryption key. Replace wepkey with the actual key.

You can, of course, combine all of these on one line, as follows:

$ sudo iwconfig eth0 essid home mode Managed key restricted 1234-1234-1234-123

In the end, it all comes down to your time and your circumstances. If you can use a B card that you know works with Knoppix, use it. If you have to use a G card, make sure you have the drivers handy. Finally, practice using ndiswrapper before you find yourself under the gun. ndiswrapper is just a bit tricky, and it would be better for you to have some experience configuring it before you're trying to recover data on a machine that's crashed. Tip Knoppix also supports the use of cell phones and even Bluetooth devices for wireless Internet access. If you keep your expectations low, you may just be surprised and happy when it works. To set up your device as a modem, open the Knoppix menu and select Network/Internet → /dev/modem connection setup, and make the necessary choice. After that, use KNOPPIX → Network/Internet → GPRS connection.

iv.Setting a Static Address.

DHCP (Dynamic Host Configuration Protocol) is a great technology, and it certainly makes the lives of network admins a lot easier (and, yes, you too are a network admin if you have a home network, even of just two computers, and you manage them), but a dynamic address is not always desirable. For example, what if you're trying to use your Knoppix machine as a server? In cases like that, dynamic addresses are a nuisance, and a static IP address is needed. It isn't hard to set up Knoppix to use a static IP address.To begin, you need to know what your system is using currently, so enter the following simple, yet incredibly informative, command:$ ifconfig
Here are example results from a laptop using a wireless 802.11b card, and you'll probably see something similar:

eth0 Link encap:Ethernet HWaddr 00:02:2D:2B:E7:34
inet addr:192.168.1.5 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::202:2dff:fe2b:e734/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20209 errors:53 dropped:53 overruns:0 frame:53
TX packets:15684 errors:12 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18936569 (18.0 MiB) TX bytes:3570323 (3.4 MiB)
Interrupt:3 Base address:0x100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:86 errors:0 dropped:0 overruns:0 frame:0
TX packets:86 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5314 (5.1 KiB) TX bytes:5314 (5.1 KiB)

This tells you that the network's DHCP server assigned eth0, the wireless card, the IP address of 192.168.1.5. Before changing the IP to a static address, you first have to make sure that the address isn't in the DHCP pool of assignable addresses, and that requires a question to the network admin. In this example, the DHCP pool ranges from 192.168.1.2 to 192.168.1.50, so anything greater than .50 and less than .255 should be safe. To change the card's IP to a statically assigned address, you'd run the following command:

$ sudo ifconfig eth0 inet 192.168.1.100

Use the same command to change the network mask or broadcast address. Here's an example:

$ sudo ifconfig eth0 netmask 255.255.255.0 broadcast 192.168.1.255

Note Yes, you can also hardcode your IP address and other data by opening the Knoppix menu and selecting Network/Internet → Network Card Configuration, but it's faster to just use the command line, and it doesn't hurt to know what the Knoppix config dialog is really doing behind the scenes.That should get you on the network, but you may not be able to get to http://www.google.com or your email server. Why not? DNS (Domain Name Server). To configure DNS, you need to edit /etc/resolv.conf. As root, open /etc/resolv.conf with your favorite text editor and add any required DNS addresses. For instance, here's what my resolv.conf file looks like when I'm teaching at Washington University in St. Louis:

search artsci.wustl.edu
nameserver 128.252.120.1
nameserver 128.252.135.4

The search line isn't really that important, but you need at least one nameserver line, or DNS won't work for you. Ask your network admin what you're supposed to use, and you'll be up and running in no time.Working on the Internet,Is there anyone left to convince that the Internet has completely revolutionized the way humans acquire and use ICE (information, communication, and entertainment)? We're living in a wondrous time, with new technologies appearing almost daily that enable us to use the Net in exciting ways. Knoppix comes with many of the very best Internet software packages, and those that it doesn't include can easily be added with just a little effort.

v.Sharing Files with BitTorrent.

Knoppix doesn't include any file-sharing apps by default, and that's OK. Most file sharing is focused on music or movies, which isn't super-important when you're in Knoppix. Most filesharing software is slow and inefficient anyway. BitTorrent (BT for short) is a better way to download and share the ISO images and other large files that you might need to grab when you're running Knoppix.Most file-sharing software works as follows: You search for a file, and your search is run either against an index of files kept on a central server (the Napster model, which tends to get companies sued into the ground) or against the indexes generated and kept by each individual client computer (the decentralized Gnutella model, which makes it harder for the RIAA and MPAA to track and shut down so-called pirates — copyright infringers — but which also results in really slow searches). Once you've located a file, you download it from the computer that has it, a process that is usually slooooow, even on a fast connection.BitTorrent is completely different. In essence, BT breaks enormous files into hundreds or even thousands of small pieces. When you begin downloading a file using BT, you're actually downloading those pieces from everyone who has any of those pieces on their computers. As soon as you've downloaded a piece, BT shares it with anyone else trying to acquire the file. Instead of downloading an entire file all at once from one machine, you're downloading pieces of that file from several machines at the same time — and returning the favor by sharing your pieces as well. The result? The more popular the file, the faster the download, sometimes (to quote Mel Brooks' Spaceballs) at "ludicrous" speed. Note For more information about BitTorrent, read the official BT home page at http://bitconjurer.org/BitTorrent/, the Wikipedia article on BT at http://en.wikipedia.org/wiki/BitTorrent, or Brian's BitTorrent FAQ and Guide at http://www.dessent.net/btfaq,Try out BitTorrent by downloading the latest version of Knoppix using BT. Using your Web browser, head to http://torrent.unix-ag.uni-kl.de, the UNIX-AG BitTorrent Tracker, and find the latest version of Knoppix in your language (either EN for English or DE for German). Click the DL link (for download) next to the Knoppix you want, and save the torrent file (a whopping 55KB) to your desktop. And now … what? Nothing happens. Where's the ISO image? Tip To find other torrent files, use Google. You can find music (especially live "jam band" stuff), software and OS ISOs, movies, and more. Legal? Sure
Well, remember that Knoppix doesn't come with any file-sharing apps, including BitTorrent, by default. To do anything with that torrent file you just downloaded, you have to install BT. Fortunately, you have APT (discussed in Chapter 1) and the Knoppix persistent disk image, so you can restart Knoppix later and continue to use the BT software you install.Several different BT software packages are available, including the "real" BitTorrent software packages made by Bram Cohen, the inventor of BT. They're fine, but a BT client called BitTornado is more fully featured, so get that instead. To do so, enter the following on a command line:

# apt-get update && apt-get install bittornado

Once BitTornado installs, open it by going to the K menu and selecting Internet → Bittornado Client. A dialog box opens, asking you to choose a torrent file. Aha! That's where the torrent file you downloaded a while back comes in — choose that file, which should be on your desktop, and click OK. You're next asked where you want to save the actual torrent — the large file — that you're downloading. The Knoppix ISO image is around 700MB, so you do not want to save that onto your Knoppix desktop, unless you have at least 1GB of RAM. Instead, you should mount a partition of your hard drive with writing turned on (right-click on the partition icon on the desktop, choose Properties, select the Device tab, uncheck Read Only, click OK, and then click on the icon to mount it), and use that to store the download. Once you have chosen a directory on your hard drive, click OK, and BitTornado springs into action, downloading — and uploading — the Knoppix ISO.

vi.Browsing the Web with Mozilla Firefox.

Knoppix used to include the full Mozilla suite of Web browser, email program, and Web page composer, but it dropped the suite with version 3.8 and instead included Mozilla Firefox, which is a Web browser only. That was a great move. Firefox has the buzz, the extensions and other goodies, and it's a faster, more svelte program.If you're reading this, you've probably used Firefox before, and you probably know how to use a Web browser. I'm not going to conduct Web Browsing 101 here; instead, let's look at three really cool things that you can do with Firefox.
Improving Your Home Page,When I used to start Firefox, I found that I'd open the same three tabs every time: Gmail, Bloglines, and The Open Source Weblog. I finally realized that what I was doing was inefficient. So I went to Edit → Preferences, selected General, and for Home Page I entered the following, clicking OK when I finished:

gmail.google.com|www.bloglines.com/myblogs|opensource.weblogsinc.com

Now when I open Firefox, it automatically opens those three sites in tabs, ready for me to view. If I click the Home button, those sites appear. Try it out yourself: Determine which sites you return to repeatedly and enter their URLs into the Home Page text box, separating them with the pipe symbol (the | right above the Enter key on most keyboards). Changing your home page into your key home pages makes things more efficient and useful because those presumably are the sites in which you do most of your work.
Installing Extensions,One of the absolute coolest things about Firefox is the hundreds of free extensions that extend the browser in almost infinite ways. You can install new extensions by selecting Tools → Extensions and clicking Get More Extensions, which opens a new Firefox window pointing to https://addons.update.mozilla.org/extensions/. From there, find the extension you want and click Install Now. Restart Firefox to load the extension after it has been downloaded and installed.The official Mozilla Update site doesn't have every extension — you can find a lot of great ones there, but there are essential extensions on other sites as well. The only thing you need to be aware of is that you can't just install Firefox extensions from any old site. For security's sake, Firefox starts with a whitelist of safe sites from which you can install software; when you try to install extensions from nonwhitelisted sites, Firefox opens an alert bar at the top of the window warning you that the site has been blocked. To add that site to your whitelist, click the Edit Options button on the right of the alert bar, and when the Allowed Sites window opens, click Allow and then OK. Click on the link to install the extension again, and this time Firefox does it without complaint.

Recommended Extensions
I keep an updated list of my installed Firefox extensions on my Website (http://granneman.com/go/extensions/), and If you want to see what I'm using right now, check it out. For now, I recommend the following as indispensable:

Adblock: Look for this in the Miscellaneous section at Mozilla Update. Annoyed by ads on Websites? Just right-click an ad, select Adblock Image, and say bye-bye to that bothersome ad. You can also use regular expressions to block all ads from a certain domain or directory, or matching a particular pattern. You can import the Adblock lists other folks have created; search Google for "adblock import filter list" and try out the ones you find.

Jybe: http://jybe.com/download/register.aspx. Jybe enables you, and anyone else who installs Jybe (IE for Windows, or Firefox on Linux, Mac OS, or Windows), to collaboratively view Web pages in real time and text chat about what you're seeing. Perfect for demos, work sessions, troubleshooting, or long-distance tech support.

miniT: Look for this in the Tabbed Browsing section at Mozilla Update. With this extension installed, you can drag your tabs to reposition them in any order you'd like. As you drag a tab, a tiny arrow appears, making it clear where your tab is going to go.

SessionSaver: Look for this in the Tabbed Browsing section at Mozilla Update. If you've ever suffered a Firefox crash and lost all of the Websites you had loaded in your tabs, you'll want SessionSaver. Load this extension and forget about it. Firefox crash? Restart Firefox, and everything is restored: tabs, histories, cookies, everything. Close Firefox with a series of tabs open? Restart Firefox, and they reappear. Awesome.

There are, of course, many more extensions — you can see my full list at my Website and look around Mozilla Update and elsewhere. There's an amazing amount of innovation going on in the area of Firefox extensions, so you're sure to find something wonderful.

Focusing Your Searches,Firefox comes with a lot of neat search tools built in, both obvious (the search box in the upper right corner) and not so obvious (press Ctrl+F to open the search bar at the bottom of the window, or highlight a word or phrase and right-click it to search the Web using your selection). With a little extra effort, you can soup up Firefox and turn it into a lean, mean searchin' machine.First of all, install a few search toolbars. Try all of them, uninstall the ones you don't like, and keep the one or two that you find particularly useful. Take a look at the Googlebar (http://googlebar.mozdev.org), the Clusty toolbar for Firefox (http://clusty.com/toolbar/firefox), the A9 toolbar (http://toolbar.a9.com), and the Yahoo! toolbar (http://companion.yahoo.com/firefox). All have nice features, and all do a good job. Or, just install the Groowe Search toolbar (http://www.groowe.com), which has all of them and more!Next, find a Website that you search often. For example, at AllMusic (http://allmusic.com,), you can use the site's Search box to look up a band, an album, or a song. After the hundredth time, though, you'll wonder whether there's an easier way, and there is. Right-click in the Search box. From the options that appear, choose Add a Keyword for this Search, Right-click in a site's Search box to add a search keyword.A new window opens: Add Bookmark. To use this window effectively, click the little arrow button on the far right; when you do, the Bookmarks folder structure is revealed, Add the details for your new search keyword.
You're basically adding a new search to Firefox. Select Bookmarks from the list of folders, click New Folder, and give the new folder a name, such as "Search" (clever, eh?). Now you need to name the new search you're creating. Because it's going to search AllMusic, how about entering "allmusic" in the Name textbox? Finally, and this is the biggie, you need to put something in the Keyword textbox. This is the term you're actually going to use to search AllMusic in the future, so the word (and it must be a word — no spaces allowed) should be easy to remember, descriptive, and short — "music" is a good one for this example. When everything has been selected and entered, click Add.Now try the new search term. In the Location bar of Firefox — where the URL is usually displayed — type the following and then press Enter:

music clash

AllMusic loads in Firefox, displaying a Web page about the greatest rock ‘n’ roll band of all time. To try it again, with the second greatest band of all time, use this, again in the Location bar of Firefox, not the Search box on the AllMusic Web page:music rolling stones,Is that cool or what? Now it doesn't matter what Web page you're on — just clear the Firefox Location bar and enter music bandname, click Enter, and AllMusic loads with a biography, discography, and far more about that band.Try it with any Website's Search box. Pretty soon you'll have all your custom searches defined, saving you time and making it easy to find the information you want, when you want it.Firefox is a fabulous piece of software, and you'll enjoy exploring its features. It's going to be with us a long time, whether or not Knoppix includes it by default.

vii.Reading and Sending Email with KMail.

If you're an email addict like so many of us, you have little self-control when it comes to checking your email. That means that a good email program is key. You want something that's attractive, powerful, and easy to use. Fortunately, Knoppix includes KMail, a favorite opensource email app (you can also find KMail as part of the Kontact PIM, accessible from the K menu: select → Office → Kontact).To start the program, open the K menu and select → Internet → KMail. KMail is open, but you have to configure it before you can use it.
Configuring KMail,After opening KMail, you have to configure it. Select Settings → Configure Kmail to display the window ,but you'll explore the most important ones, beginning with the Manage Identities screen,You enter data here, or KMail won't work correctly. Make sure the default identity is selected, and then click Modify. On the General tab, enter the appropriate information for Your Name and Email Address. You can click OK to close the window now, but if you want, go ahead and configure the Cryptography tab .change the Reply-To address on the Advanced tab, or check Enable signature on the Signature tab, and then enter your usual sig into the box. When everything is just so, click OK to close the Manage Identity window.
Now move on to the second vitally important screen: Network. The first tab, Sending, enables you to specify your SMTP server. By default, Knoppix includes Sendmail, but the vast majority of you will never, ever need that entry (if you do need it, you'll know it, and you'll know what to do), so go ahead and select it, and then click Remove to get rid of it. Once that's done, click Add; the Add Transport window appears. Choose SMTP and click OK. The Add Transport window changes into the one,Enter your SMTP details (which are unique to every reader). If you have a Gmail account from Google (and they're free, so why don't you?), you can configure KMail to use Gmail as a powerful, free, easy SMTP server, which vastly simplifies everything. Here's how to do it:

In the Name box, use (no surprise!) gmail.

In the Host box, enter smtp.gmail.com.

Check the Server Requires Authentication option.

Enter your full Gmail address (username@gmail.com) in the Login box, and your Gmail password in the Password box.

Go to the Security tab — you must do this with Gmail, or things will not work. Under Encryption, choose SSL, and for Authentication Method, select PLAIN. Click OK.

You can now send email using Gmail. Easy, convenient, and it works perfectly.

If you don't have a Gmail account, get one at http://gmail.google.com. Accounts are free, you get a full gigabyte of storage, and it has the coolest Web mail interface.You're halfway done; you've taken care of the sending part. Now you need to receive email. Go to the Receiving tab and click the Add button. Tell KMail which kind of email account you use.You've got five options. Here's what each one means:

Local mailbox: Use this if you have local email stored in the widespread mbox format, in which each folder's messages are stored, concatenated, in a single file. mbox probably should be avoided because one damaged email message can corrupt an entire mbox file containing hundreds or even thousands of messages.

POP3: Post Office Protocol 3, which is what most people use. With POP3, you download your email from your server whenever you check it (yes, you can leave copies on your server, but this is not the correct way to use POP3, and it creates a mess, with copies of email on this machine and that machine).

IMAP: Internet Message Access Protocol, which is what more people should use, especially those who access email from more than one machine. Unlike POP3, IMAP stores email on the server. When you check your mail, only the headers are downloaded; when you view an individual message, the content is downloaded so you can see it. Delete an email, and it is deleted on the server. With IMAP, you always see the same email, no matter which machine you're using to view your mail.

Disconnected IMAP: The same as IMAP, except that a copy of each message is downloaded onto your machine so that you can view, move, and delete messages while you're offline; when you reconnect, your changes are synchronized with the email store on the server. Disconnected IMAP is faster than regular IMAP and enables you to work with email when you aren't connected to the Net.

Maildir mailbox: The successor to mbox, in which each email is stored in a separate file.

If you have local emails that have been saved using maildir, this is your choice.

The default order is a bit confusing: If you have a collection of old emails saved on your hard drive and you want to read them, choose either Local mailbox or Maildir mailbox. If you want to connect to your email server and read your mail, choose POP3, IMAP, or Disconnected IMAP. If you've set up an email account before, you should have no problems setting up one with KMail. It's all pretty standard. Click OK when everything is correct.Now move on to Appearance (select from the left panel). On the Layout tab's Message Structure Viewer section, select the radio button next to Show Never. The message structure is a waste of screen real estate, and you're just getting rid of it. On the Headers tab, check the box next to Display Message Sizes — why this box isn't checked by default is unknown. Who doesn't want to know the size of a particular email message?That's it for configuring KMail; click OK to close the Configure window. KMail immediately connects to the accounts you set up, so you can begin downloading and reading your email. If you want to, you can right-click on the Unread and Total columns in the left message list pane and remove those two columns. Some folks find them unnecessary, but you may want to leave them alone.
Getting the Most Out of KMail,Using KMail couldn't be simpler because all the main functions are on the toolbar. If you're not sure what a particular icon does, hold your mouse over it for a second or two, and a tooltip appears with the name of the icon. For even more functionality, check out the menus. This section provides you with a couple of cool tips about your address book.When you compose a new message, KMail uses auto-completion to finish names and email addresses after you type the first few letters, but only if you've populated KAddressBook (open the K menu and select Office → Address Manager). By default, KAddressBook stores those addresses in a single file — std.vcf — usually located at ~/.kde/share/apps/kabc/.If you're using Knoppix on a machine that already has an std.vcf file on it that you want to use, it's easy to do so. Open KAddressBook and look for an Address Books section in the bottom left pane of the program; if you don't see it, select Settings → Show Extension Bar → Address Books, and it will appear. Select the default address book, called resource-name in Knoppix, and click Edit. Change the name from resource-name to something a bit more informative, like hard_drive_ address_book or the like. Leave Format set to vCard, and click the Open File dialog icon button to the right of the Location text box. Navigate to /mnt/hda2/home/rsgranne/.kde/ share/apps/kabc/std.vcf (or the equivalent on your system), click OK, and your usual addresses are available. Sweet! Caution For this technique to work, you must first mount the hard drive containing your home directory using the icons on the Knoppix desktop. If you want to be able to write to, as well as read, the std.vcf file, mount the drive with Read-Only turned off. (Remember how to do that? Rightclick on the drive's icon on the desktop, choose Properties, select the Device tab, uncheck Read Only, and click OK to close the Properties window.)There's another way to auto-populate your address book, but it works only if you use IMAP for your email. (If you're an IMAP junkie, you'll prefer this method). Basically, you store your addresses in a folder on your IMAP server, and then you tell KAddressBook to use that folder as your address book. It sounds kind of crazy, but it works. Here's how to do it:

In KMail, right-click on a folder in the list on the left side of the window and choose New Subfolder. Give it a name like "groupware" or something that indicates to you that you're storing more than mail in it. Click OK to create the folder.

Select Check Mail to Synchronize Everything.

Select Settings → Configure KMail, click the Misc button on the left side of the Configure window, and select the Groupware tab. Check the box next to Enable IMAP Resource Functionality, and then take a look at Resource Folders Are Subfolders Of, which should contain a list of all the IMAP folders on your server. From the list, choose the folder you created in step 1 (groupware is the example filename).

Definitely uncheck Hide Groupware Folders because otherwise your address book will not be populated.

Open KAddressBook. In the Address Books area of the window, click Add. The Add Address Book window opens; choose IMAP and click OK. Now when you add a new contact, it's stored in the groupware/Contacts folder in your IMAP folder structure. You can access your address book from anywhere in the world, at any time!

Tip When you finish adding the IMAP resource, select Settings → Show Extension Bar and choose None so that the Address Books area disappears. There's just no reason for it to sit there taking up space.If you had contacts stored using IMAP, your address book is immediately populated with a list of all those contacts. Anytime you use Knoppix on a new machine, and it doesn't matter whose machine it is, you always have access to all of your names, numbers, and addresses. Pretty cool, eh?

viii.Instant Messaging with Buddies Using Gaim.

Instant messaging has been increasing in popularity over the last several years as it has spread from consumers to business. In fact, many now rely on IM more than email. As one of the key net apps, IM is part of Knoppix in the guise of Gaim, which is actually a GNOME IM program that runs perfectly under KDE (as the vast majority of GNOME apps do). Gaim is cool because it supports all of the major IM protocols, including AIM, ICQ, Jabber, MSN Messenger, and Yahoo!, as well as IRC (although it's a bit clumsy) and some others. That's right — with just one program you can IM all your pals, no matter what they're using.To start Gaim, open the K menu and select Internet → Gaim Internet Messenger. To use Gaim, you need to connect to your IM accounts; Gaim immediately opens the Accounts window so you can authenticate with your existing accounts.If you don't have an account with any IM service yet, visit the Websites of the major IM networks and sign up:

AOL Instant Messenger (AIM): https://my.screenname.aol.com/_cqr/registration/initRegistration.psp

Gadu-Gadu: Register from within Gaim

ICQ: http://www.icq.com/register/

Jabber: Register from within Gaim

MSN Messenger: https://register.passport.net

Yahoo! Messenger: http://edit.yahoo.com/config/eval_register?new=1

Click the Add button in the Accounts window to open the Add Account window,Use the Protocol drop-down menu to choose an IM service that you want to use. Fill in the necessary information on the screen, check Remember Password and Auto-Login if you're feeling lazy (not a bad thing!), and click Save when you're done. If you want to connect to any other services, repeat the entire process until you're set up with everything you need.Now you can start using Gaim. Connect to your registered IM services in the Accounts window by checking the box in the Online column for each IM network you want to join (if you chose Auto-Login, you won't have to do that next time you fire up Gaim). As you connect to each network, the icons representing your IM services will change from gray to color, letting you know that you're successful. Once you're connected, close the Accounts window and focus on the Buddy List window, If you already have buddies on any of your services, they should show up once you connect. To begin IMing, just right-click on a buddy and choose from the list of options, or click the IM button at the bottom of the window. Keep in mind that the options vary depending on what each service offers. Send a single message, start a chat session, or send a file — it's all possible with Gaim.To add a new buddy, select Buddies → Add Buddy. The Add Buddy window opens, and you supply just two key pieces of data: Screen Name and Account. Make sure you choose the correct account — if you say MyFriendJuan uses Yahoo!, but he actually uses Jabber, you and Juan will not be IMing any time soon.Gaim is a mature IM client that does what Internet technologies are supposed to do: make it easy to communicate while reducing the number of programs you have to run on your computer. Thanks to Gaim, you can talk to friends and associates who use Yahoo!, MSN, or AIM without having three or more different IM apps open at the same time. Now that's convenient!

No comments:

Post a Comment