Thousands of programs are available for KDE. They range from basic utilities (such as konsole, the terminal emulator, and OClock, a rudimentary clock) to editors, programming aids, games, and multimedia applications . The most we can provide here is a tiny slice of the software available for KDE. In this section, we'll present those applications that all KDE users should know how to use. These aren't necessarily the most exciting programs out there, but they should certainly be part of your toolbox.
There are many, many more KDE applications than the few we can list here. You will make the acquaintance of some of them, such as KWord, the word processor, and Kontact, the personal information manager and mail user agent (and much else), elsewhere in this book. But others haven't found space in this book, so you should search through your favorite Linux archive for more exciting KDE programs; there are thousands of them to discover.
Also remember that if there really is no KDE program for a task you have to solve, you can always resort to one of the classic X applications, if available. These do not look as nice and integrate as well, but they still work on a KDE desktop.
3.3.1. konsole: Your Home Base
Let's start our exploration of X applications with the workhorse that you might be spending a lot of your time with in the terminal. This is simply a window that contains a Unix shell. It displays a prompt, accepts commands, and scrolls like a terminal.
Perhaps you are struck by the irony of buying a high-resolution color monitor, installing many megabytes of graphics software, and then being confronted by an emulation of an old VT100 terminal. But Linux is much more than a point-and-click operating system. There are plenty of nice graphical applications, but a lot of the time you'll want to do administrative tasks, and a command-line interface still offers the most powerful tool for doing that. You'll get a glimpse of these tasks in Chapter 4.
So let's take look at a konsole window. Figure 3-4 shows one containing a few commands.
Figure 3-4. konsole window
184.108.40.206. Starting up konsole
You can start konsole in one of several ways, as with all KDE programs:
When you open a konsole window, a "Tip of the Day" window will open that gives you useful hints about using konsole. You can turn this off, but we suggest keeping it on for a while, as you will learn many useful things this way. You can also read through all the tips by clicking the Next button in that window repeatedly. Many KDE applications have such a Tip of the Day.
konsole allows you to run several sessions in one konsole window. You can simply open a new session by selecting a session type from the Session menu or by clicking the New tab button. The tab bar or the View menu lets you then switch between sessions. If you don't see any tab bar, select Settings Tab Bar (and then either Top or Bottom) from the menu to make it visible.
220.127.116.11. Cutting and pasting selections
Actually, konsole offers a good deal more than a VT100 terminal. One of its features is a powerful cut-and-paste capability.
Take another look at Figure 3-4. Let's say we didn't really want the notes directory; we wanted to look at ~/perl_example/for_web_site instead.
First, we'll choose the part of the cd command that interests us. Put the mouse just to the left of the c in cd. Press the left mouse button, and drag the mouse until it highlights the slash following example. The result is shown in Figure 3-5.
When the highlighted area covers just the right number of characters, click the middle button.[*] konsole pastes in what you've selected on the next command line. See the result in Figure 3-6. Now you can type in the remainder of the directory name for_website and press the Enter key to execute the command.
You can select anything you want in the windowoutput as well as input. To select whole words instead of characters, double-click the left mouse button. To select whole lines, triple-click it. You can select multiple lines too. Selecting multiple lines is not useful when you're entering commands but is convenient if you're using the vi editor and want to cut and paste a lot of text between windows.
Figure 3-5. Selected text in konsole
Figure 3-6. konsole window after text is pasted
Note that if you are more used to the drag-and-drop style of copying text, konsole supports that as well.
Copying and pasting of text is even integrated between konsole and the graphical KDE applications. For example, if you are viewing a directory with the Konqueror file manager/web browser, you can just drag those icons to a konsole window. konsole will either offer to paste the filenames as they are or prepend them with a cd, cp, mv, or ln command.
18.104.22.168. More konsole tricks
There are lots of things you can configure in konsole. You can select fonts, color schemes, whether the scrollbar should be shown to the left, to the right, or not at all, and so on. The most often used settings are available in the Settings menu, and if you can't find what you are looking for, go to Settings Configure Konsole. There you can select the line spacing, whether the cursor should blink, and so on.
A particularly useful feature in konsole is the ability to watch for output or silence in one of the sessions.
What is this feature good for? Imagine that you are working on a large program that takes a long time to compile. Nonprogrammers can imagine that you download a large file in a terminal window with wget or that you are computing a complex POVRAY image. While the compilation is running, you want to do something else (why do you have a multitasking operating system, after all?) and start composing an email message to a friend in your KDE mail client. Normally, you would have to check the console window every so often to see whether compilation is finished and then continue to work on your program. With the watcher, you can get a visual or audible notification when compilation completes. In order to set this up, simply switch to the session you want to watch and select View Monitor for Silence. You will get a notification as soon as your compiler doesn't output any more messages for a while and can divert your attention from your mail client back to your konsole window. Of course, you can also watch for output instead of silence, which might be useful in long-running network operations that don't show any progress indicators.
How can your screen be complete if it is unadorned by a little clock that tells you how much time you are wasting on customizing the screen's appearance? You can have a clock just the way you want it, square or round, analog or digital, big or small. You can even make it chime.
KDE contains a number of clocks , but usually you will want to run the small panel applet, as screen real estate is always at a premium, regardless of your screen resolution. The clock should appear by default at the bottom-right corner of your screen, in the confines of the panel (this is called a panel applet, or a small application that runs within the panel). If your distribution hasn't set up things this way, you can also right-click anywhere on the panel background and select Add to Panel Applet Clock from the menu, which will make the clock appear on the panel. If you'd rather have it somewhere else on the panel, you can right-click the small striped handle to the left of the clock, select Move from the context menu that appears, and move the clock with the mouse to the desired position. Other panel objects will automatically make room for the clock.
The panel clock applet has a number of different modes that you can select by right-clicking the clock itself and selecting Type as well as the desired mode from the context menu. There is a plain, a digital, an analog, and, most noteworthy, a fuzzy clock. The fuzzy clock is for everybody who doesn't like being pushed around by his clock. For example, if you run the fuzzy clock, it will show Middle of the week. If that is a bit too fuzzy for you, you can select Configure Clock Appearance from the clock's context menu and select the degree of fuzziness here. For example, I am typing this at 9:53 A.M. on a Thursday, and the four degrees of fuzziness are Five to ten, Ten o' clock, Almost noon, and the aforementioned Middle of the week.
The clock applet also lets you configure the date and time format and the time zone to be used, as well as set the system clock (you need root permissions to do that; if you are logged in as a normal user, a dialog will pop up and ask you for the root password). You can even copy the current date and time in a number of formats into the system clipboard.
3.3.3. KGhostview: Displaying PostScript and PDF
Adobe PostScript, as a standard in its own right, has become one of the most popular formats for exchanging documents in the computer world. Many academics distribute papers in PostScript format. The Linux Documentation Project offers its manuals in PostScript form, among others. This format is useful for people who lack the time to format input, or who have sufficient network bandwidth for transferring the enormous files. When you create documents of your own using groff or TEX you'll want to view them on a screen before you use up precious paper resources by printing them.
KGhostview, a KDE application, offers a pleasant environment for viewing PostScript on the X Window System that, besides PostScript files, can also view files in Adobe's Portable Document Format (PDF). However, there is another application that is specific for viewing PDF files in KDE as well, kpdf. KGhostview is really mostly a more convenient frontend to an older application, Ghostview, so you can also get the functionality described here with Ghostview. The user experience is much better with KGhostview, however, so that's what we describe here.
Using KGhostview is very simple: invoke it with the name of the file to be displayed for instance:
eggplant$ kghostview article.ps
or simply click the icon of any PostScript or PDF file anywhere in KDE.
Since we are interested only with viewing existing files here, we do not need to concern ourselves much with the benefits of PostScript and PDF. Both can be considered standards to the extent that many programs write them (and a few can read them), but both have been defined by one company, Adobe Systems. PDF is a bit more portable and self-contained, as it can even contain the fonts necessary to display the document. Also, PDF is better known on Microsoft Windows and the Macintosh, so you are more likely to come across PDF files than PostScript files on the Internet. And finally, whereas PostScript is really meant for printing, PDF has some features for interactive viewing, such as page icons, hyperlinks, and the like.
KGhostview is not a perfect PDF viewer, even though it is sufficient for most documents. If you have problems with a particular document, you may want to try either Adobe's own Acrobat Reader (which is not free software, but can be downloaded at no cost from http://www.adobe.com), or the KDE program kpdf, which comes in the same package as KGhostview.
The Ghostview window is huge; it can easily take up most of your screen. The first page of the document is displayed with scrollbars, if necessary. There is a menu bar and a toolbar, as in most KDE programs, as well as a page scroller and a page list on the left side of the window.
Like most X applications, KGhostview offers both menu options and keys (accelerators) for common functions. Thus, to view the next page, you can pull down the View menu and choose the Next Page option. Or you can just press the PgDn key (or the Space key, if you don't have a PgDn key, such as on a laptop).[*]
To go back to the previous page, choose Previous Page from the View menu. To go to any page you want, press the left mouse button on its number in the Page Number column. To exit, choose Quit from the File menu, or just press Ctrl-Q.
Documents from different countries often use different page sizes. The Ghostview default is the standard U.S. letter size (but it can be overridden by comments in the PostScript file, and this is often done by PostScript tools set up on Linux distributions that are configured for European customs). You can select a different size from the Paper Size submenu in the View menu.
Ghostview lets you enlarge or reduce the size of the page, a useful feature for checking the details of your formatting work. (But be warned that fonts on the screen are different from the fonts on a printer, and therefore the exact layout of characters in Ghostview will not be the same as that in the hard copy.) To zoom in on a small part of the page, press Ctrl-+; to zoom out, use Ctrl- -. You can also use the toolbar buttons or the Zoom In Zoom Out menu entries in the View menu.
You can also adjust the window size to exactly fit the document's page width by selecting Fit To Page Width from the View menu.
To print a page, choose Print from the File menu or press Ctrl-P anywhere in the window. The standard KDE printer dialog will appear that lets youamong other thingschoose the printer to use.
You can also print only the current page or a range of pages; just specify your selection in the printer dialog. This can also be combined with the PageMarks feature. The PageMarks menu lets you mark and unmark individual or groups of pages. Marked pages are displayed with a little red flag in the page list. If you mark some pages and select the printing functionality, the dialog will pop up with the marked pages already filled in as the selection of pages to print. Of course, you can override this setting before finally sending the document to the printer.
3.3.4. Reading Documentation with Konqueror
Konqueror is not only a high-class web browser and file manager but also serves as a documentation reader, besides the Help Center built into KDE and described previously. KDE's documentation is displayed using HTML format, but Konqueror is capable of displaying other documentation formats, such as Info and manpages, that you will learn about later in this book. For example, in order to show the manpage for the ls command, just open a mini command-line window by pressing Alt-F2 and typing the following in that window:
KDE will recognize that you want to read the manpage of the ls command, open a Konqueror window, and display the manpage. The result is also much more nicely formatted than how the original man command (or its X11 replacement, xman) would do it.
This works similarly for Info pages. For example, the documentation of the GNU C compiler, gcc, comes in info format. Just type:
either in a mini command line or in the Konqueror URL entry line, and the requested Info page will pop up (assuming it is installed, of course). If you have cursed at the really user-unfriendly command-line info program and weren't too happy with programs such as xinfo either, this feature may be a boon for you.
But Konqueror doesn't stop here when it comes to getting information. Want to use a search engine on the Internet? To find pages about Tux (the Linux mascot) on, let's say, the AltaVista search engine, simply type the following in a mini command line or the Konqueror URL entry line:
and a Konqueror window with (at the time of this writing) 3,360,000 search results pops up. This works with many other search engines as well. See Table 3-1 for some of the most popular search engines together with their prefixes.
If your favorite search engine is not configured (which is quite unlikely, actually), you can configure it yourself by opening a Konqueror window and selecting Settings, Configure Konqueror, and then Web Shortcuts. The list contains all the preconfigured search engines and even lets you add your own.
3.3.5. Burning CDs with K3b
KDE comes with a very user-friendly and popular application for burning CDs and DVDs, K3b. If you insert an empty CD-R or DVD-R, KDE will offer to start K3b automatically; otherwise, you can start it from the command line with k3b; your distribution may even have it preconfigured in the K menu.
K3b usually detects your CD and DVD drives automatically, but if it should not do so in your case, select Settings Configure K3b Devices. Here you can see a list of recognized CD and DVD drives, sorted into readers and writers. If you are missing devices here, try clicking the Refresh button first; if that does not work, click on Add Device and enter your device manually. K3b expects the device file here; many distributions use symbolic links with telling names such as /dev/cdrom or /dev/cdrecorder. If you have specified the correct device file, K3b is usually able to detect all parameters, such as read and write speeds, automatically.
The K3b screen is separated into two halves. In the upper half, you see a view of your filesystem; in the lower half, you see project icons for common tasks such as creating a new data DVD or copying a CD. Other, less common, tasks such as burning a previously created ISO image on CD can be found in the Tools and File New Project menu.
As an example, let's look into how you create a data CD with a backup of your digital pictures from your last holiday. Click on the New Data CD Project icon. You get an empty list of files and can now drag files from the filesystem view above (or from any Konqueror window) into this list. Just grab the directory that contains your holiday pictures and drag it into the list that's all you need to do. You will see a green bar at the bottom of the K3b window that tells you how much space the currently selected files will occupy on the CD so that you know whether you can add another batch.
Once you are done selecting the files, click on the Burn button that is a bit hidden in the lower-right corner. A dialog with a lot of settings pops up; you should quickly check these settings, but you can leave most of them as they are. We usually suggest to select the "Verify written data" box on the Writing page so that you can be sure that the CD was written correctly (this will double the time for creating the CD, though). You may also want to change the Volume name (the name of the CD) and add yourself as the Publisher on the Volume Desc page. If you plan to read the CD on both Windows and Linux, it is a good idea to check that both the "Generate Rock Ridge extensions" and "Generate Joliet extensions" are selected on the Filesystem page. Once you are satisfied with all your settings, hit the Burn button in the upper right, lean back, and watch the progress bar move on until your CD is finished.