home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Running Linux, 4th Ed.Running Linux, 4th Ed.Search this book

11.3. KDE Applications

Thousands of programs are available for KDE. They range from basic utilities (such as konsole, the terminal emulator, and OClock, the clock) to editors to programming aids to games to 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. 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 will not look as nice and integrate as well, but will still work on a KDE desktop.

Also, don't forget that there are many, many more KDE applications than the few we can list here. You will make the acquaintance of some of them, like KWord, the word processor, and KMail, the mail user agent, elsewhere in this book. But others, like the Personal Information Manager KOrganizer, haven't found space in this book, so you should search through your favorite Linux archive for more exciting KDE programs; there are hundreds of them to discover.

11.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 within the terminal. This is simply a window that contains a Unix shell. It displays a prompt, accepts commands, and scrolls like a terminal.

TIP: Traditionally, xterm was the classic Unix terminal emulator. It has been superseded by konsole in the KDE desktop environment.

Perhaps you are struck by the irony of buying a high-resolution color monitor, installing several megabytes of graphics software, and then being confronted by an emulation of an old VT100 terminal. But Linux is simply not a point-and-click operating system. There are plenty of nice graphical applications, but a lot of the time you'll want to manipulate text, and a command-line interface still offers the most powerful tools for doing that.

So let's take look at a konsole window. Figure 11-5 shows one containing a few commands.

Figure 11-5

Figure 11-5. konsole window 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 11-5. 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 11-6.

Figure 11-6

Figure 11-6. Selected text in konsole

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 11-7. Now you can type in the remainder of the directory name for_website and press the Enter key to execute the command.

Figure 11-7

Figure 11-7. konsole window after text is pasted

You can select anything you want in the window — output 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.

Be careful: if a long line wraps around, you will end up with a newline in the selection even though you didn't press the Enter key when you entered the line.

Note that if you are more used to drag-and-drop style copying of text, konsole supports that as well. 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. For this to work, you need to turn on the write daemon, which you do in the aforementioned configuration dialog on the Write Daemon page.

What is the konsole watcher good for? Imagine that you are working on a large program that takes a long time to compile. Non-programmers 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. 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.

11.3.2. Clocks

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 Panel Figure Add Figure Applet Figure 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 Preferences/Fuzzy Clock 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 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).

Finally, if you'd rather have a real big, traditional clock on the screen, you find a KDE version of the classic "OClock" in the K menu at Utilities/OClock.

11.3.3. KGhostview: Displaying PostScript

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 PDF. 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'll be describing 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 only concerned 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, while 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 www.adobe.com), or xpdf, which is probably included with your distribution.

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).[43]

[43]There is a subtle difference between the Space key and the PgDn key: the PgDn key will always take you to the next page, while the Space key will first take you to the bottom of the current page if the window is too small to display the whole page on the screen at once. A second press of the Space key will then take you to the next page.

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 you — among other things — choose 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 have marked 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.

11.3.4. Reading Documentation with Konqueror

Konqueror is not only a high-class web browser and file manager, but it also serves as a documentation reader. KDE's documentation comes in HTML format anyway, but Konqueror is capable of displaying other documentation formats like info and manpages. 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 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 like 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) 1,319,135 search results pops up. This works with many other search engines as well. See Table 11-1 for some of the most popular search engines together with their prefixes.

Table 11-1. Popular search engines and their prefixes

Search Engine












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 Enhanced Browsing. The Enable Web Shortcuts section on that configuration page contains all the preconfigured search engines and even lets you add your own.

Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.