BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?


Knoppix Hacks
Knoppix Hacks 100 Industrial-Strength Tips and Tools

By Kyle Rankin

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: Boot Knoppix
Throughout this book, Knoppix is ascribed as the system administrator's Swiss Army knife. Like a Swiss Army knife, Knoppix has many handy tools, both general-purpose (like a knife or a screwdriver) and special-purpose (like a corkscrew). Some of these tools are used for specific repairs, while others are used for routine maintenance.
You should not use a Swiss Army knife for the first time when you are locked in a room with a bomb that is just seconds away from exploding—we can't all be MacGyver. Likewise, you should familiarize yourself with Knoppix before you use it to attempt to rescue the company's failed accounting server. This chapter starts you on the path to Knoppix mastery by beginning at the beginning: booting Knoppix. By using the cheat codes and boot time options covered in this chapter, you should be able to get Knoppix to boot on almost any x86 computer.
The first hacks in this chapter highlight the basics for obtaining the latest version of Knoppix and getting to the boot: prompt. All new computers should support booting from the CD-ROM drive, and most computers attempt to boot directly from a CD rather than from the hard drives on the system. In case your computer doesn't support booting directly from a CD, I have included instructions for booting Knoppix from a floppy disk.
The second part of this chapter covers cheat codes—options you pass at the boot: prompt in Knoppix to change its behavior. When talking about cheat codes, I'm really talking about ways in which Knoppix's hardware detection and support might fail and how to work around such failures. By the end of this chapter, you should be comfortable with booting Knoppix on a variety of computers and be ready to use the desktop environment.
I remember introducing a friend of mine to Knoppix on a laptop. We were at the university library, and he couldn't get his wireless card to connect to the library's wireless network with his current Linux distribution. We decided to give Knoppix a chance. Without using any cheat codes, we found that Knoppix booted with full video and sound support, and his wireless card was not only detected, but Knoppix automatically connected it to the wireless network!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Introduction: Hacks #1-9
Throughout this book, Knoppix is ascribed as the system administrator's Swiss Army knife. Like a Swiss Army knife, Knoppix has many handy tools, both general-purpose (like a knife or a screwdriver) and special-purpose (like a corkscrew). Some of these tools are used for specific repairs, while others are used for routine maintenance.
You should not use a Swiss Army knife for the first time when you are locked in a room with a bomb that is just seconds away from exploding—we can't all be MacGyver. Likewise, you should familiarize yourself with Knoppix before you use it to attempt to rescue the company's failed accounting server. This chapter starts you on the path to Knoppix mastery by beginning at the beginning: booting Knoppix. By using the cheat codes and boot time options covered in this chapter, you should be able to get Knoppix to boot on almost any x86 computer.
The first hacks in this chapter highlight the basics for obtaining the latest version of Knoppix and getting to the boot: prompt. All new computers should support booting from the CD-ROM drive, and most computers attempt to boot directly from a CD rather than from the hard drives on the system. In case your computer doesn't support booting directly from a CD, I have included instructions for booting Knoppix from a floppy disk.
The second part of this chapter covers cheat codes—options you pass at the boot: prompt in Knoppix to change its behavior. When talking about cheat codes, I'm really talking about ways in which Knoppix's hardware detection and support might fail and how to work around such failures. By the end of this chapter, you should be comfortable with booting Knoppix on a variety of computers and be ready to use the desktop environment.
I remember introducing a friend of mine to Knoppix on a laptop. We were at the university library, and he couldn't get his wireless card to connect to the library's wireless network with his current Linux distribution. We decided to give Knoppix a chance. Without using any cheat codes, we found that Knoppix booted with full video and sound support, and his wireless card was not only detected, but Knoppix automatically connected it to the wireless network!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Boot Knoppix on a Desktop
The common PC desktop is a great place to begin experimenting with Knoppix.
For computers purchased in 2000 and after, booting Knoppix is as simple as putting the CD in the CD-ROM drive and restarting the computer. For some computers, however, booting Knoppix might require changing the boot order in the BIOS. The BIOS is the screen that appears when you first boot a machine, and it usually lists the amount of RAM and the hard drives it detects. Older systems that don't support booting from a CD require that you boot from a floppy.
If your computer supports booting from a CD-ROM, but won't boot the Knoppix CD by default, your problem is probably the system boot order setting in the BIOS. To change the boot order and save it, you must enter the BIOS setup, which you can do at boot time by pressing a special key. Some BIOSes tell you at boot time the key to press to change BIOS settings; the common ones are Esc, F2, and Del.
Once in the BIOS, find the section that changes boot device order. On some BIOSes this setting is changed by selecting a tab along the top labeled Boot, while on others the option may be named "Boot device order" or something similar. Once you have found this setting, move the CD-ROM device so that it is listed before any hard drives. If you can't find or change this option, or you need other information specific to you system, refer to the BIOS manual that should have come with your computer or motherboard. Once you have changed the boot device order, save your settings, which should reboot the computer, and after detecting the Knoppix CD, you should be placed at the Knoppix boot prompt.
Some older computers do not support booting directly from a CD-ROM. For these computers, you must first create a boot floppy that enables the system to boot off of the Knoppix CD-ROM. Fortunately, Knoppix has made this process easy. The boot floppy process has changed between Knoppix 3.3 and 3.4. Knoppix 3.4 uses a new boot process that requires two floppy disks. To create these floppies, first boot Knoppix from a machine with a floppy drive that is capable of booting from a CD-ROM. Once the machine has booted, insert a blank floppy into the drive and click K Menu
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get Knoppix
Knoppix can be downloaded from the Knoppix mirrors or purchased from an online site.
This book includes a copy of Knoppix 3.4 from 2004-05-17 (KNOPPIX_V3.4-2004-05-17-EN), which was the last release in the 3.4 series. All of the hacks have been tested and written in terms of this release, but most hacks should work fine across the new releases. At the time of this writing, the first version of 3.6 has been released; however, I felt it would be better to keep with 3.4 because it has had time to work out major bugs.
Even though new, major versions of Knoppix are released every year or so, new, incremental releases occur as often as twice a month. These incremental CDs have the latest updates to all the software on the CD, the latest Linux kernels, and sometimes, new features. New software updates offer bug fixes and new-and-improved features. New kernel updates often mean better hardware support; if an older version of Knoppix doesn't boot on your computer, the latest release of Knoppix might give you better results. Sometimes new features are added in incremental releases in the form of improved hardware detection, extra Knoppix configuration tools, or new cheat codes. See [Hack #3] for more information. In general, if you need to address a problem on your Knoppix CD, the latest release might fix it.
To obtain the latest version of Knoppix, download the CD image from one of Knoppix's mirrors or send away for a CD. If you have an unmetered broadband Internet connection and a CDR/RW drive, simply download the CD image; it's the best way to get Knoppix. A collection of mirrors listed at http://www.knopper.net/knoppix-mirrors/index-en.html provides CD images in ISO form over http, ftp, or rsync. If you use Bittorrent (a peer-to-peer file-sharing application designed for sharing large files), you can use the Knoppix torrent link on this page. When you click on a mirror you are taken to a licensing agreement page. Have your lawyer read through the software license (your lawyer reviews all of your software licenses before you accept, right?), click Accept to proceed, and then choose a file from the list that is presented. In addition to the latest version of Knoppix, most mirrors host a few past CD images with their MD5sum.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Knoppix Cheat Codes
Cheat codes are extra instructions you type at boot time that change many of Knoppix's settings. On some hardware, use of these codes may be necessary to get the most out of Knoppix.
Knoppix is good at automating many of the tasks that Linux users often conduct manually, such as hardware configuration, setting up the network, and logging into a desktop. If you want to customize options or change what Knoppix automatically runs, you can enter special commands at the boot prompt, which Knoppix refers to as cheat codes. Cheat codes are a reference to the secret passwords or key sequences entered in video games to get unlimited lives or other special items. Fortunately, cheat codes in Knoppix are simple words you type at the boot prompt, and not complicated joystick sequences like up, down, up, down, left, right, left, right, B, A. The cheat codes aren't secret either. Open the Knoppix CD under your current OS and browse to the KNOPPIX directory. The cheat codes file is called knoppix-cheatcodex.txt. You can also reference a list of the most frequently used cheat codes by pressing F2 at the boot prompt.
To use cheat codes at the boot prompt, type knoppix to select the default kernel, followed by the cheat codes you wish to use. For example, if your Knoppix CD doesn't work the way you expect, test for any physical errors on the disc; at the boot: prompt, type the following command:
            knoppix testcd
         
The following table lists many of the settings and options you can change from the boot: prompt using cheat codes:
Cheat code
Purpose
                           knoppix testcd
                        
Check CD data integrity and MD5sums
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Speak Different Languages
One of the advantages of Linux is its native language support. Knoppix is provided in English and German versions, but other languages are supported.
Knoppix's popularity has spanned the globe, and as a result, it comes bundled with support for many different languages. While versions exist that default to German or English, Knoppix can easily boot into many different languages through the use of cheat codes. This hack covers the following language cheat codes:
Cheat code
Purpose
                           knoppix lang=cn|de|da|es|fr|it|nl| pl|ru|sk|tr|tw|us
                        
Specify language/keyboard
                           knoppix keyboard=us
                        
Use different console keyboard
                           Knoppix xkeyboard=us
                        
Use a different X keyboard
When changing language options, the lang cheat code is the main cheat code to use. To change the default language to Spanish, for instance, simply pass the cheat code at the boot: prompt:
            lang=es
         
This cheat code takes care of all of the locale options, so that all menus, prompts, the desktop environment, and the keyboard are set to the specified language.
Many beta Knoppix CDs come only in German versions. The differences in the German and English keyboard layouts make themselves apparent when you try to enter the lang=us cheat code. The = key on the German keyboard can be entered with Shift-0, the / key is located at Shift-7, and the _ key can be typed with Shift-/. If you want to enter the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Free Your CD to Make Knoppix Run Faster
Make Knoppix run faster by loading the Knoppix image to RAM or saving it to the hard drive. This also frees your CD-ROM drive for other uses.
Compared to other live-CD distributions, Knoppix runs surprisingly quickly, considering that it downloads data from a compressed image on the CD. If you want to speed things up, but aren't ready to install Knoppix on your hard drive just yet, there are cheat codes that allow you to copy the complete Knoppix CD image to either RAM or a partition on your hard drive, and run it completely from there. These cheat codes give you the added benefit of freeing up the CD-ROM drive for other uses—particularly handy if you have only a single CD-ROM drive in a system; you can play music or burn other CDs simultaneously while using Knoppix.
The toram cheat code instructs Knoppix, before it does anything else, to create a large ramdisk and copy the complete CD there. A ramdisk is a virtual hard disk that your operating system creates by setting aside a certain amount of your RAM. When you boot with this cheat code, Knoppix warns you that it might take some time to copy the full image and provides a progress bar while the image is copying. The Knoppix CD image is approximately 700 MB by itself, so this option is only for those of you with 1 GB or more RAM in your system, because even after copying the CD to RAM, Knoppix still needs a good portion of the RAM for loading applications and writing temporary files. If Knoppix runs out of space to copy, it alerts you that it ran out of space and cannot complete the copy and drops back to loading directly from the CD-ROM.
If you don't happen to have over a gigabyte of RAM in your system, you can still free up your CD-ROM drive by using the tohd cheat code. Similar to the toram cheat code, this cheat code copies the complete CD image to a partition on your hard drive. This partition can be almost any filesystem that the Knoppix supports, including Windows filesystems such as FAT and FAT32. NTFS (the default filesystem for Windows 2000 and Windows XP) cannot be written to directly, and it will not work with the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Straighten Out Your X Settings
Finely tune X to get the most out of your video hardware, and work around hardware detection mistakes.
Knoppix detects video card and monitor settings pretty well. If it can't detect any better settings, it tries to at least set up a generic environment for X. Even with its excellent hardware detection, sometimes Knoppix is unable to detect everything it needs to set up X the way you would like. If X won't start up correctly or at all, you might be able to get things working with the variety of cheat codes Knoppix provides for X:
Cheat code
Purpose
                           knoppix screen=1280x1024
                        
Use specified screen resolution for X
                           16
                        
Use specified color depth for X
                           60
                           60
                           )
                        
Use 60 Hz vertical refresh rate for X
                           80
                           80
                           )
                        
Use 80 kHz horizontal refresh rate for X
                           XFree86
                           XF86_SVGA
                        
Use specified X-Server
                           ati
                           fbdev
                           mga|nv
                           radeon
                           savage|s3
                           
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Advanced Knoppix Cheat Codes
Choose advanced options for system tweaking and booting on exotic systems.
Knoppix's cheat codes let you change many of its default behaviors from which desktop environment to use to whether or not to eject the CD at shutdown. While many of the cheat codes have been merely enhancements to the defaults, there is also a full set of advanced options. Many of these advanced cheat codes can help you work around bugs in your hardware or in Linux's support of your hardware, or disable default options that could prevent Knoppix from booting. Some of the more advanced cheat codes for Knoppix are listed here:
Cheat code
Purpose
                           knoppix26
                        
Boot with the 2.6 Linux kernel
                           knoppix atapicd
                        
Do not use SCSI emulation for IDE CD-ROMs
                           es1938
                           )
                        
Use ALSA sound driver
                           knoppix no{acpi,apic,agp,apm,audio,ddc, firewire,isapnpbios,pcmcia,scsi,swap,usb}
                        
Skip parts of hardware detection
                           failsafe
                        
Boot with (almost) no hardware detection
                           knoppix pci=bios
                        
Workaround for bad PCI controllers
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Run Knoppix on a Laptop
With laptops sales on the rise, it is increasingly common that your desktop machine is actually a laptop. Knoppix provides cheat codes and other options so it can boot on laptop hardware.
If any type of hardware will make you resort to cheat codes and kernel-parameter voodoo to boot Knoppix, laptops will. Laptop manufacturers often resort to using special proprietary hardware that often has little to no support in the Linux kernel. Some laptops don't even include an internal IDE CD-ROM drive, and instead have an external PCMCIA, USB, or IEE1394 CD-ROM. On Knoppix, support for the CD-ROM after the BIOS boots is pretty important! Laptops also rely on power management features that can be iffy at times. None of these issues should scare you away from trying Knoppix on a laptop. Many of these problems can be solved or at least worked around using cheat codes.
Knoppix is one of the best distributions when it comes to getting laptops working out of the box. I recommend taking a Knoppix CD with you when shopping for laptops; it is one of the best ways to see how well Linux will run on that machine. Convincing the clerk at Best Buy to let you boot with Knoppix will be your real challenge.
The specifics of tweaking display settings have been covered already in [Hack #6] . Some of those cheat codes are particularly useful when setting up a laptop or desktop LCD display. Laptops use LCDs that have an ideal resolution even if they can display other resolutions. The fb cheat code is useful in these cases, because on some displays, running the console below the maximum resolution results in the text still being displayed with black bands around it. To display a framebuffer console on a laptop that has an ideal resolution of 1024 768, boot Knoppix with:
               fb1024x768
            
In some cases, Knoppix may not detect the laptop's video card or may detect it incorrectly. If forcing Knoppix to use a particular module with the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Explore Expert Mode
Do-it-yourself types may not like all of the automatic configuration and hardware detection that Knoppix does. For people trying to troubleshoot and for the just plain curious, Knoppix provides an expert mode.
The goal of the Knoppix expert mode is to provide the user with complete control over the different steps that Knoppix performs when booting a system. Each step that Knoppix normally performs automatically behind the scenes is presented to the user with a prompt allowing you to configure exactly what Knoppix will do or won't do. This can be particularly useful if you have a system that gets halfway through the boot process, and then mysteriously restarts. With the expert mode, you can see exactly which step in the Knoppix boot process has caused the boot to fail so you can bypass that step next time.
To start into the Knoppix expert mode, simply type this cheat code at the boot: prompt, along with any other cheat codes you might want to use:
               expert
            
A new feature in Knoppix 3.4 is the expert26 cheat code that, like the knoppix26 cheat code, lets you boot with a 2.6 kernel. When booting in expert mode, Knoppix appears to boot normally—you should see a picture of Tux in the corner of the screen and the Linux kernel starting to detect hardware. Once the kernel loads, however, Knoppix begins to ask you questions.
Knoppix starts by listing all of the SCSI modules available on the system followed by the question "Load SCSI Modules?" At the prompt you have the option of typing in the names of any SCSI modules you wish to load, or n for none. If you just hit Enter, Knoppix probes for which SCSI modules to load just like it does by default. After making your choice, you should notice that, in expert mode, Knoppix gives much more output, telling you which particular devices it is probing for and if modules load successfully or not.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Use Your Knoppix Desktop
Every Swiss Army knife comes with a diagram that lists the different tools of the knife and explains their function. At first, everything may seem clear, and you may believe you understand everything necessary about your new knife. But, as you use it, you realize that you don't really know why it has three different sized knife blades or what the different saws should be used for, and you find yourself wishing you had paid more attention to that diagram.
This chapter is that diagram for your Knoppix CD. The start of this chapter is particularly geared toward people who are new to the Linux desktop. This chapter explains some basics, such as what a KDE panel is and how to find applications to run. If you are already experienced with using a Linux desktop and programs, such as OpenOffice.org and Mozilla, you might want to skip ahead to the end of the chapter where I talk about connecting to the Internet [Hacks 17 and 19].
The first few hacks introduce you to the default Knoppix desktop environment and get you comfortable with the purpose of the different desktop items and the location of available programs.
Later in the chapter, hacks are devoted to different application categories—from office programs to Internet programs to games. These hacks cover the desktop tools Knoppix includes for these different categories and get you started using them.
Once you finish this chapter, you should be able to comfortably navigate through the Knoppix desktop, use all of the desktop applications Knoppix has, and connect to the Internet. At that point, you will be ready for the next few chapters, which cover specialized tools included with Knoppix and their more advanced uses. But for now, on to the desktop!
After you have booted Knoppix, figure out what these windows, icons, and strange panels are for.
If you have successfully booted Knoppix, as mentioned in Chapter 1, you should now be looking at the default Knoppix desktop, as shown in Figure 2-1.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Introduction: Hacks #10-20
Every Swiss Army knife comes with a diagram that lists the different tools of the knife and explains their function. At first, everything may seem clear, and you may believe you understand everything necessary about your new knife. But, as you use it, you realize that you don't really know why it has three different sized knife blades or what the different saws should be used for, and you find yourself wishing you had paid more attention to that diagram.
This chapter is that diagram for your Knoppix CD. The start of this chapter is particularly geared toward people who are new to the Linux desktop. This chapter explains some basics, such as what a KDE panel is and how to find applications to run. If you are already experienced with using a Linux desktop and programs, such as OpenOffice.org and Mozilla, you might want to skip ahead to the end of the chapter where I talk about connecting to the Internet [Hacks 17 and 19].
The first few hacks introduce you to the default Knoppix desktop environment and get you comfortable with the purpose of the different desktop items and the location of available programs.
Later in the chapter, hacks are devoted to different application categories—from office programs to Internet programs to games. These hacks cover the desktop tools Knoppix includes for these different categories and get you started using them.
Once you finish this chapter, you should be able to comfortably navigate through the Knoppix desktop, use all of the desktop applications Knoppix has, and connect to the Internet. At that point, you will be ready for the next few chapters, which cover specialized tools included with Knoppix and their more advanced uses. But for now, on to the desktop!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Explore the Desktop
After you have booted Knoppix, figure out what these windows, icons, and strange panels are for.
If you have successfully booted Knoppix, as mentioned in Chapter 1, you should now be looking at the default Knoppix desktop, as shown in Figure 2-1.
Figure 2-1: The default Knoppix desktop
Probably the first element that grabs your attention is the Konqueror web browser window that opens when K Desktop Environment (KDE) is started. KDE is one of the two most popular desktop environments for Linux (Gnome being the other). KDE's job is to manage your complete desktop environment. It draws your wallpaper, provides you with access to your programs through the menus and icons on the desktop, and manages the windows that appear once you launch an application. Once KDE starts, the first thing you see is the Knoppix help page. This web page contains information and help for Knoppix in many different languages, and includes links to sites to purchase Knoppix CDs, as well as get additional information. The help is available offline, which makes it very useful even when your network connection isn't working.
The desktop itself contains shortcuts to the hard drives, CD-ROMs, and floppy drives on your system (Figure 2-2). Click on any of the drive icons to automatically mount the drive as read-only and open up the mounted filesystem in Konqueror. Under KDE, the default is set to open a directory or launch a file with a single click, which might take some adjustment if you are used to double-clicking icons on the desktop. As Knoppix defaults to mounting these filesystems read-only, you can view and open the files you see, but you can't edit, delete, or move any of the files on these filesystems. You can, however, copy the files to your desktop and edit them from there. To make these filesystems writable, right-click on the drive icon and select ActionsChange read/write mode . . . . The right-click menu also gives you options to unmount and, if the device is a CD-ROM, to eject the media.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Customize the Desktop Look
The look of Knoppix's default desktop doesn't appeal to everyone. KDE has many tools to change the look and feel of the desktop.
Let's face it. People have different tastes. The themes, window borders, fonts, and colors that Klaus Knopper has chosen for himself might not appeal to you. If you don't like how Knoppix looks by default, you'll be pleased to find that Knoppix's flexibility extends to changing how it looks.
Probably all of the changes you want to make in how the desktop looks and feels can be made from within the KDE Control Center. To start this program, click K MenuSettingsControl Center. The KDE Control Center presents a listing of different configuration categories that let you change many different settings on the desktop. For our purposes, let's stick to the first category, "Appearance and Themes." Click on that category to expand the listing and display all of the different choices for changing the appearance. There are a number of different settings you can change:
Background
Change the wallpaper that appears on the desktop. You can choose many different images (look under /usr/share/wallpapers), pick a number of color gradients, or even configure a slide show.
Colors
Customize the color scheme for all of the buttons, menus, and text.
Fonts
Pick your favorite fonts to be used in the toolbar, the desktop, menus, etc.
Icons
Knoppix includes only a single icon theme, but you can download new icon themes from sites such as http://www.kdelook.org.
Launch Feedback
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get Office Work Done
You can't get much work done in an office these days without an office suite. Use OpenOffice.org and Kontact to turn any computer into your office workstation.
The inclusion of a complete suite of office tools, including all of OpenOffice.org, into Knoppix means that not only can you try out Linux with a full-featured desktop, but you can also get your work done while you're at it. This hack discusses how to use Knoppix to create and edit documents, spreadsheets, and presentations, as well as manage your contacts and appointments.
Microsoft Office has in many ways defined how people get work done in an office environment. To many people, there is no word processor other than Word, no spreadsheet program other than Excel, and no email client other than Outlook. For any new office suite to get any user interest at all these days, it must tout compatibility with the file formats Microsoft Office uses, and the office suites available under Linux are no exception. Knoppix provides the OpenOffice.org suite and the Kontact personal information manager. While these programs do take some getting used to if you are accustomed to Office, after a bit of adjustment you should find you can still get your office work done under Knoppix.
When I introduce Linux to a Windows user, one question that often comes up is "Can I open all of my Word documents?" As a system administrator friend of mine (who likely dealt with the famous Word 95 and Word 97 compatibility issues) quipped, "OpenOffice.org's compatibility with Word is at least as good as Word's compatibility with Word."
OpenOffice.org is an open source office productivity suite that touts compatibility with many of the popular office file formats, including Microsoft Word, Excel, and PowerPoint, and runs on a variety of platforms, including Linux, Windows, and Solaris. The OpenOffice.org tools I discuss are the word processor Writer, the spreadsheet Calc, and the presentation software Impress.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Configure Your Printer
Even in an increasingly digital world, sometimes you still need a hardcopy of your files. The KDE printer manager has a lot of options, and this hack guides you through them.
If you have taken advantage of any of the office applications from [Hack #12] , you might find yourself wanting to print out some of the work that you have done. Knoppix's excellent hardware support extends to printers, and Knoppix provides a simple graphical configuration tool for setting up any printers you may need to use.
Click K MenuKNOPPIXConfigureConfigure printer(s) to launch the KDE printer manager. In this application, you should find that a few special printers for faxing and printing PDFs have already been created for you. These default printers are provided by the Common Unix Printing System (CUPS) that is running on the Knoppix CD. CUPS is the standard printing system on most Linux distributions and is even the underlying print technology behind Apple's OS X operating system. To launch the new printer wizard to add a new local printer, click AddAdd Printer/Class . . . .
The printer wizard has support for many types of printer connections, and this hack describes some of the more common ones. After the first few questions, the configuration is the same for both local and network printers; the first question the wizard asks is where the printer is located.
For printers that are physically connected to the computer with a parallel, serial, or USB cable, select Local Printer. You will be presented with a list of local devices your printer is connected to. If you use a parallel port, you most likely need to select Parallel Port #1, and if you use a USB connection, you should probably select USB Printer #1. These selections mean that the printer is connected to your first parallel or USB port.
For printers that are shared on the network with Windows printer sharing, select "SMB shared printer" instead of Local Printer. If this printer requires a special username or password to access it, the next window allows you to set those options. You are then asked to enter the workgroup, server name, and printer name to use (Figure 2-7). If you aren't sure what the correct printer name is, click Scan and the wizard scans the network for open printer shares.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Peripheral Devices
Knoppix includes support for many popular scanners, cameras, PDAs, and other peripherals—often with little to no extra configuration.
There is a common misconception that Linux has poor hardware support, especially when it comes to peripherals. Actually, you might be surprised at just how much hardware Linux supports out of the box without requiring that you download any extra drivers. Knoppix goes a step further and automatically configures a lot of the peripherals you might use—just plug them in.
Knoppix supports many popular scanners with little to no tweaking. I have both SCSI and USB scanners, and Knoppix recognized and configured them with no extra effort on my part. To start using your scanner, click K Menu Graphics Kooka to start Koka, KDE's scanning application.
When Kooka starts, it lists all of the scanners that Knoppix has detected and prompts you to choose one. After you select your scanner, Kooka's main window appears.
Kooka works like most other scanning applications. Click Preview Scan to perform a quick scan, then crop out the section of your scan you wish to use and click Final Scan to scan at full resolution. After completing a scan, Kooka will prompt you for the file format to save the image as.
Kooka can also perform some basic image manipulation, such as image rotation and mirroring, although for more advanced features you should probably use a complete image-editing program such as the Graphical Image Manipulation Program (GIMP), which is described in this section.
Be aware of the image size when scanning at high resolutions, because the scanned image can easily become larger than your available ramdisk space, leaving you with an incomplete image file and a desktop with no extra free space (which might cause weird behavior or crashes in any applications that must write to the ramdisk afterwards).
Kooka includes Optical Character Recognition (OCR) capabilities as well, so you can convert a scanned document to text. To OCR scan an image, select it from the list of images in the top left of the main window and click Image
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Have Fun and Play Some Games
While you can get a lot of work done with Knoppix, you can also have a lot of fun. Windows gives you Solitaire, Freecell, and Minesweeper. Knoppix gives you a virtual arcade full of games.
Primarily, you should use Knoppix to complete work, but sometimes it's good to have some fun too. Knoppix has something for everyone with its broad selection of games. Here's an overview of the game categories and descriptions of some of the games.
All of the games included in Knoppix are organized in the K Menu under Games. This submenu lists the different game categories, such as adventure, arcade, board games, card games, puzzles, strategy, and a special category for Tetris-like games.
You will find a lone title, Falcon's Eye, in the adventure category. This role-playing game is a graphical frontend to the console adventure game nethack. Nethack is a classic dungeon game that focuses on exploring the depths of the dungeon rather than simply killing everything in sight. Falcon's Eye takes the nethack engine and replaces the monotone ASCII symbols with colorized characters, monsters, and walls. To play the game, create a character, complete with attributes like strength and intelligence, just like in Dungeons & Dragons. Game play begins with your character in a dungeon with a trusty sidekick—a pet dog or cat. Use the mouse to move your character, attack monsters, and open doors. Icons along the bottom of the screen allow you to select items to use, spells to cast, or extended commands to perform. For nethack veterans, you'll find the key bindings familiar. Novices can click the question mark at the bottom righthand corner of the screen for help. Once you are done exploring the dungeons, quit by selecting [q] quit from the list of extended commands.
Many of the games in the arcade category revive classic arcade games from the 1980s, and most fall into two categories: games with spaceships and games with bouncing balls. Don't laugh; sometimes the simplest games are the most addictive. Galaga, Chromium, and KAsteroids are all space shoot-em-ups. Galaga is a Linux remake of the famous arcade game with more power-ups and a faster pace, KAsteroids provides all of the fun of the original Asteroids game but with three-dimensional asteroids, and Chromium is a fast-paced top-scrolling shooter with excellent graphics.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Rock Out with Knoppix Multimedia
Knoppix comes with a full suite of tools to perform common multimedia tasks, such as listening to CDs or MP3s, editing audio, and burning CDs.
More people seem to be using their computers for multimedia applications, whether for listening to CDs, MP3s, or streaming radio and video. Combine Knoppix's excellent sound card support with its complete set of audio and video applications, and you get a platform for your multimedia needs that you can take anywhere. All of Knoppix's multimedia applications can be found under K MenuMultimedia. This hack gives an overview of all the different programs you can use for your audio and video needs.
Before using any of the multimedia tools, make sure that Knoppix has identified your sound card. The first clue that Knoppix has detected your sound card is the "Initiating startup sequence" sound played by Knoppix as it loads your desktop. Another clue is the presence of a blue speaker icon near the bottom righthand corner of the screen near the clock. This icon belongs to KMixer and lets you adjust the volume just by clicking on the speaker. If the icon has a red slash through it, then Knoppix was not able to detect your sound card.
Use the sndconfig program to configure your sound card. Sndconfig is a fairly straightforward configuration tool that scans your system for any available sound cards and prompts you with any it detects. To load the sndconfig application, click K MenuKNOPPIXConfigureSound card configuration. Other than selecting OK, the only interactive part of this tool is to listen for a sample sound once sndconfig configures your card and to answer "Yes" or "No," depending on whether you hear the sound. If your sound card still isn't working, there is a chance that there is no OSS sound module for your hardware. If this happens to you, try booting with the alsa cheat code [Hack #7] to use the ALSA drivers instead. Once your sound card is working, you are ready to try the multimedia applications.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Connect to the Internet
Knoppix comes with many different options to connect it to a network with dial-up, Ethernet, wireless, PPPoE, and other types of connections.
Before you can take advantage of the many Internet applications Knoppix has, you need to actually connect to the Internet. Knoppix comes with support for many different types of Internet and network connections, including dial-up, standard network connections you might find with DSL or Cable Internet services, ADSL/PPPOE connections, GPRS cell phone connections, ISDN, and wireless network connections. To configure these connection types, click K MenuKNOPPIXNetwork/Internet.
The most common type of Internet connection for broadband Internet users or computers inside a corporate network is through a standard network card. If this is the type of connection you use then you will find that when Knoppix boots, it automatically brings up the network and attempts to grab an IP address with DHCP.
If you do not automatically get an IP via DHCP, you must click K MenuKNOPPIXNetwork/InternetNetwork card configuration to launch a program that will ask you questions about your network connection. This configuration program will also let you enter a static IP address and other network information if your network does not use DHCP.
If your ISP assigned a username and password to use when you connect to your broadband Internet connection, then you must set up PPPoE before you can connect to the Internet. Click K MenuKNOPPIXNetwork/Internet ADSL/PPPOE configuration. This application will attempt to detect PPPoE use on your network, and then enter your username and password to connect to the ISP. Once you finish the configuration application, you will be connected to the Internet.
If you have an 802.11b wireless card connected to your computer, Knoppix will attempt to automatically configure the wireless card and connect to the first wireless access point it sees when you boot. This will not work if you need to enter special settings, such as a WEP key, to connect to your wireless network. To get around this, click K Menu
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Connect to the Internet with GPRS Bluetooth
Attempt to get the impossible to happen: a GPRS data connection over Bluetooth with Knoppix.
Bluetooth is a Personal Area Networking (PAN) protocol with a very limited range (the most powerful consumer devices, Class 1, have a range of 100 meters). Bluetooth allows you to connect devices together into "pairs." GPRS, or General Packet Radio Service, is a packet-switched protocol that's layered on top of the circuit-switched GSM (or IS-136 TDMA) network. This permits the use of a packet-based data service (like TCP/IP). This hack pairs your cell phone with your computer's Bluetooth adapter and uses your cell phone as a pseudo-modem device. It's not your father's modem, that's for sure. No wires needed.
GPRS connections require either a terminal or cellular connection to your given provider. GPRS dynamically allocates bandwidth by the number of available timeslots (time period allocated to one call). In turn, it allocates timeslots based on need, and therefore, you will get extra timeslots only when it's necessary. This provides a very efficient use of the spectrum and has a major benefit over Circuit Switched Data, because it doesn't need to allocate a circuit for constant use. The theoretical bandwidth limit for GPRS is 172.2 Kbps; however, this is assuming that you are able to use all eight timeslots for a given cell. In reality, most providers only let you have two to four timeslots. For instance, T-Mobile gives four RX timeslots and two TX timeslots.
You need more than just a Knoppix disc and a computer to get this connection to work. You must use the following parts:
A Bluetooth adapter
I have the Belkin USB Class 1 Bluetooth adapter. I choose this because of its lack of an antenna (it's harder to break), its small form factor, and its range (advertised at 100 meters).
A cell phone
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Explore the Internet
Browse the web, check your email, and chat with your friends with Knoppix's Internet applications.
While Knoppix contains plenty of useful tools that don't require a network connection, with connectivity you can use Knoppix to browse the Web, check your email, send instant messages to friends, chat, and even set up a video conference. This hack covers many of the utilities located under the K MenuInternet menu.
Chances are the one thing you want to do most on the Internet is browse the web. Knoppix includes two web browsers, Konqueror and Mozilla, which should be adequate for all your web-browsing needs.
Konqueror is KDE's default web browser and is actually the web browser that greets you as you start the Knoppix desktop. If you want to immediately browse the Web, simply type the URL into the location bar at the top of the Konqueror window. Konqueror supports tabbed browsing. To open a new tab, hit Ctrl-Shift-N or middle-click on a link in the browser window. Konqueror is configured to support Java© and JavaScript, but Flash support requires using Knoppix's live installer to install the Flash plug-in [Hack #27] .
If you hate web pop-up ads, you're in luck; Konqueror supports blocking pop-up windows. To enable blocking, click SettingsConfigure Konqueror . . . , select Java/JavaScript in the settings window that appears, select the JavaScript tab, and next to "Open new windows," check "Deny to block all pop-up windows" or "Smart" to intelligently block unrequested pop-up windows. If you really want to be annoyed, check "Ask," and your Internet browsing will be constantly interrupted by a dialog asking you if you want to allow a new pop-up. That's almost as annoying as using Internet Explorer.
Knoppix also comes with the complete Mozilla suite comprised of a web browser, mail and news clients, an HTML composer, and an address book. As a browser, Mozilla touts excellent standards compliance and supports tabbed browsing if you press Ctrl-T or middle-click a link. Mozilla also supports pop-up blocking. To configure this, click Edit
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get Help
When you are lost or stuck, or you just have a question on Knoppix, there are a number of places you can go to get help.
Knoppix definitely makes it easy for a new user to get started on Linux, but even with all of the automated configuration tools and the easy-to-use desktop environment, you are bound to need help. Knoppix has a vibrant and multilingual community and a number of support outlets. Every Knoppix user is basically using the same exact software; if you are having a problem, someone else is probably having that problem too.
First of all, the Knoppix CD itself provides a good first line of support for any questions you might have. The Knoppix help page is actually the first page you see when the desktop environment loads. If you have closed your browser and want to get back to that page, click the icon labeled KNOPPIX on your desktop. Select your language along the bottom of the web page (for English, click EN) to see a basic help page that introduces Knoppix and provides some introductory information on the Knoppix project, and some links for getting further help.
If you need help with your desktop environment more than with Knoppix itself, click K MenuHelp to access KDE's full user manual. This help program also includes documentation for all of the main KDE applications, so you can use this resource if you have a question about the Konqueror web browser, for instance.
There are a number of resources for getting help with Knoppix on the Internet. First of all, there is the official Knoppix site at http://www.knoppix.org, which maintains a FAQ you can view at http://www.linuxtag.org/2005/index.php. Corporate users of Knoppix might be interested in official commercial support provided by ed-media's Knoppix hotline located at http://www.ed-media.org/knoppix/en/index.html.
If you need more help, there are active online forums at http://www.linuxtag.org/2005/index.php
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: Tweak Your Desktop
After you have become comfortable with the desktop and the different desktop applications that Knoppix includes, you might want to save documents or settings that you have worked on. This chapter contains hacks that cover methods to save your settings and documents so you can access them the next time you boot, along with how to utilize settings you might already have on the Linux or Windows system installed on your hard drive.
The next few hacks cover some specialized desktop uses for Knoppix, including using it as a kiosk or terminal server. With these hacks, you can turn a regular computer into a specialized kiosk for your business, and then use the terminal server to boot multiple computers all from the same Knoppix CD over the network. The final hacks cover different methods Knoppix includes so that you can install software "live" on the booted CD. You can use this to get that extra bit of software that Knoppix didn't happen to include without resorting to remastering the CD.
The ability to make your Knoppix settings persistent opens a whole world of possibilities for Knoppix as a portable desktop solution. With a USB key drive and a Knoppix CD, you can boot Knoppix on any machine available to you; load your settings from the USB drive and your desktop so your work can follow you wherever you go.
Knoppix has the capability of saving changes you have made during your session to floppies, USB drives, or other removable media. Use this ability to create a Knoppix setup that you can take to any computer.
One of the great things about Knoppix is that it all resides on a single CD, so you can take the same desktop environment and programs with you to any accessible computer. One problem, however, is that a CD is read-only media, so any configuration changes you make or any special settings you might change to get Knoppix to work on your hardware are lost the moment you shut down the computer. If you have a USB drive, a floppy drive, or some other writable media, Knoppix has automated the process of keeping changes you make to Knoppix persistent across reboots. You even have the option of saving your entire
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Introduction: Hacks #21-31
After you have become comfortable with the desktop and the different desktop applications that Knoppix includes, you might want to save documents or settings that you have worked on. This chapter contains hacks that cover methods to save your settings and documents so you can access them the next time you boot, along with how to utilize settings you might already have on the Linux or Windows system installed on your hard drive.
The next few hacks cover some specialized desktop uses for Knoppix, including using it as a kiosk or terminal server. With these hacks, you can turn a regular computer into a specialized kiosk for your business, and then use the terminal server to boot multiple computers all from the same Knoppix CD over the network. The final hacks cover different methods Knoppix includes so that you can install software "live" on the booted CD. You can use this to get that extra bit of software that Knoppix didn't happen to include without resorting to remastering the CD.
The ability to make your Knoppix settings persistent opens a whole world of possibilities for Knoppix as a portable desktop solution. With a USB key drive and a Knoppix CD, you can boot Knoppix on any machine available to you; load your settings from the USB drive and your desktop so your work can follow you wherever you go.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Create Persistent Knoppix Settings
Knoppix has the capability of saving changes you have made during your session to floppies, USB drives, or other removable media. Use this ability to create a Knoppix setup that you can take to any computer.
One of the great things about Knoppix is that it all resides on a single CD, so you can take the same desktop environment and programs with you to any accessible computer. One problem, however, is that a CD is read-only media, so any configuration changes you make or any special settings you might change to get Knoppix to work on your hardware are lost the moment you shut down the computer. If you have a USB drive, a floppy drive, or some other writable media, Knoppix has automated the process of keeping changes you make to Knoppix persistent across reboots. You even have the option of saving your entire /home directory if you want, which means you can take your data with you too.
To save all of your changes, click K MenuKNOPPIXConfigureSave Knoppix configuration or run /usr/sbin/saveconfig in a console. There are a number of settings that Knoppix can save. The different types of settings you can choose from are:
Personal configuration (desktop, programs)
Select this option to save the configuration files in your home directory. KDE and other Linux programs have standardized the saving of user settings in hidden files and directories, which begin with a period and are commonly referred to as dot files. So this option saves any theme or color changes you have made for your desktop, any settings changes made for any program (so, for instance, this would save your web browser bookmarks and your email settings), and any other configuration settings that are stored in these hidden files.
All files on the desktop
This option doesn't save settings per se but instead backs up the full
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Your Linux Desktop Settings
When you boot Knoppix on top of an existing Linux desktop, it is relatively easy for Knoppix to use files and settings on the system underneath.
If you've been a Linux user for some time and have your desktop application settings just right, you might be annoyed that the changes that you've already configured once (i.e., your bookmarks and email settings) must be redone under Knoppix. Trying to remember and recreate all your original tweaks and other se