Tải bản đầy đủ - 0 (trang)
KDE (Linux in a Nutshell, 3rd Edition)

KDE (Linux in a Nutshell, 3rd Edition)

Tải bản đầy đủ - 0trang

KDE (Linux in a Nutshell, 3rd Edition)

To set KDE as your desktop environment, look for the X initialization files in your home

directory. Depending on your distribution, look for either .xinitrc, .xsession, or .Xclients in

your home directory. If none of these files exist, create a new .xinitrc file. Edit the file to

remove any window manager references that may exist and add startkde on a line at the end

of the file. Make sure to put the KDE directories in your path. The default package installation

is /opt/kde. Note that some distributions will use a different KDE path, but it will be

configured by the default setup.

16.1. Desktop Overview

Figure 16-1 shows a typical KDE desktop. The bar across the top edge of the screen is the

taskbar. It is used to keep track of application windows running on the desktop. The panel is at

the bottom of the screen. The panel contains buttons for the main menu, the window list, and

the desktop pager as well as other buttons used to launch applications.

Figure 16-1. The KDE desktop

The desktop displays open application windows and contains icons that can be used to launch

applications with a single click. A number of icons are placed on the desktop by default.

There are two folder icons. One opens the Templates folder, which contains a set of generic

files used to create desktop links. The Autostart folder contains links to applications that are

started automatically every time you log in. The Trash icon is a link to a special desktop

folder to which you can drag files that you want to delete. There are also icons that link to

mounted CD-ROM and floppy drives.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (2 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

16.1.1. Application Windows

Each KDE window has a titlebar with common buttons on the right for minimize, maximize,

and close. On the left side of the titlebar, there is a small icon (or a dash, if an icon isn't

specified by the application) and a button that looks like a pushpin. The icon opens the

window menu that contains a number of different functions you can apply to the window,

such as sending it to another desktop. The push pin button is used to stick or unstick the

window to the screen. If you click on the pushpin, the window will be sticky and appear on all

of the virtual desktops. The button appears pushed in when a window is sticky. Click the

button again to unstick a window.

The window menu contains standard window commands: Maximize, Iconify, Move, Resize,

Sticky, and Close. There is also a command that lets you send the window to another virtual


16.1.2. kfm -- the KDE File Manager

One of the most important KDE applications is kfm. kfm is a graphical file manager and

Internet browser and also controls the workings of the KDE desktop and the icons it contains.

Anytime you click a folder icon, such as the Home folder button on the panel or the Autostart

icon on the desktop, a kfm window opens displaying the contents of the directory. Figure 16-2

shows a kfm window displaying a home directory. Files and directories are shown as icons by

default, but you can use the View menu to view contents with more detail.

Figure 16-2. kfm, the KDE file manager

The kfm interface has its roots in web browsers. The toolbar contains back and forward

buttons for stepping through your selection history, a home button, reload, and stop. The

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (3 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

Location bar uses URL addressing for both network addresses and local filesystems. HTML

rendering is well-supported in kfm, although not as robust as commercial browsers. If you

don't like the bells and whistles of advanced features such as Java applets and scripting, kfm

makes a perfect, simple web browser. You can even save addresses as bookmarks and use

HTTP cookies.

In addition to file management, kfm is responsible for the functioning of the desktop. When

you log into a KDE session, kfm reads the contents of the Desktop directory. Any files or

folders will be represented as icon links on the desktop. Items contained in the Autostart

folder will be launched as well. kfm uses text files ending in .kdelnk to configure desktop

links. These files are described later.

16.1.3. Adding a Link to the Desktop

There are a couple of ways to add a desktop link. The simplest way is to right-click on the

background and select the New submenu in the pop-up menu. The New menu offers a number

of choices for the type of link to create: Folder, File System Device, FTP URL, Mime Type,

Application, Internet Address, and WWW URL. When you make a selection, a default icon

for that type will appear on the desktop, and the properties window will appear for the link.

The properties window varies slightly for the type of link, but for all links you need to specify

a name for the link file, the label for the icon, and the executable command or file location.

You can also set the permissions for the link file and select a new icon.

The following example shows how to create an application desktop link that opens the Kedit

text editor. First right-click on the desktop and select New Application. A new icon appears

on the screen with the default KDE "gear" graphic and labeled "Application," and the

properties window opens.

The General tab, shown in Figure 16-3, shows the default name of the kdelnk file and other

file information. Change the name of the file to reflect the purpose of the link; in this example,

it is Kedit.kdelnk.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (4 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

Figure 16-3. General tab of desktop link properties

Since you created the link file, the permissions allow you to use it. If you want to adjust the

permissions, go to the Permissions tab. The next step is to supply the command used to open

the application. On the Execute tab (Figure 16-4), type in the command, or click the Browse

button to locate the file. Here you can change the icon for the link by clicking the button

showing the current icon. This opens a window that displays a set of default KDE icons found

on your system. Pick the one you like and click OK.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (5 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

Figure 16-4. Execute tab of desktop link properties

The final step is to supply the name for the link and a tooltip comment. Fill in the Comment

box on the Application tab (Figure 16-5) with a description of the application. Supply the

name of the link (the label that appears under the icon on the desktop) in the Name box. Click

the OK button to finish the configuration.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (6 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

Figure 16-5. Application tab of desktop link properties

For URL or Internet address settings, the properties windows are all the same except for the

default names and icons. These type of links require you to supply the URL address on the

URL tab (Figure 16-6).

Figure 16-6. URL tab of desktop link properties

For a new device link, set the link name and permissions if needed. On the Device tab, supply

the location of the device, such as /dev/fd3 and the mount point. Specify the filesystem type in

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (7 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

the Filesystems box (e.g., default, msdos, etc.).

You can also add a link to the desktop by dragging an item from a file manager window. You

can do this with any file or directory. After you drag the item to the desktop, a small pop-up

window asks you whether you want to copy, move, or link the item. Copy simply makes a

copy of the item in the Desktop directory. Move will remove the item from its original

location and place it in the Desktop directory. If you choose link, the desktop icon will contain

a symbolic link that points to the item's current location.

16.1.4. The Desktop Folder and kdelnk Files

Everything that is shown on the desktop exists in the ~/Desktop folder. If you open this folder

in the file manager, you will see directories for Templates and Autostart, as well as .kdelnk

files for the CD-ROM and floppy drive and any other links you have set. When KDE starts, it

scans the contents of the Desktop directory and creates icons for each item.

Desktop links that launch applications, URLs, or files are configured in the background by

.kdelnk files. These are simple text files that contain all the information that you set for a link

in the link properties dialog boxes. Although all the configuration of desktop links is handled

thoroughly by the configuration pop-up windows, the content of .kdelnk files may be of

interest to advanced users. The following example shows the .kdelnk file for a link to the

Kedit text editor:

# KDE Config File

[KDE Desktop Entry]




Comment[]=Text editor











Name[sl]=Uporabniki program



As you can see, the syntax is simple and straightforward. The items filled in on the properties

windows are listed on each line of the file. The Type line identifies the kind of link file. In this

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (8 of 9) [15/05/2002 18:13:18]

KDE (Linux in a Nutshell, 3rd Edition)

example, Kedit is an application. Type=URL would indicate an Internet address link file. The

Name line lists the name of the application, Exec lists the command, Icon identifies the

icon image file, and so on. Unspecified options have empty values. The additional Names

lines are set in the template files and provide alternate names for other languages should you

switch the default language setting for your environment.

15.4. The GNOME Control


16.2. The Panel and Taskbar

Copyright © 2001 O'Reilly & QKFIN. All rights reserved.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_01.htm (9 of 9) [15/05/2002 18:13:18]

The Panel and Taskbar (Linux in a Nutshell, 3rd Edition)

Linux in a Nutshell, 3rd


16.2. The Panel and Taskbar

The kpanel program runs the panel and the taskbar. The panel is the control bar across the

bottom of the screen. The panel is used to find and launch applications and navigate among

windows and desktops. It contains the menu, which organizes the installed KDE applications

into submenus; the disk navigator, which provides a menu-driven display of filesystem

contents; and the desktop pager. Additional buttons that open applications, directories, and

URLs can be added to the panel.

16.2.1. The Desktop Pager and Window List

Like most window managers, kwm (KDE's window manager) can divide your workspace into

multiple desktops. Different application windows can be open on each desktop, reducing the

amount of clutter on your screen. You can switch among desktops by using the desktop

buttons on the panel or by using the window list. The panel displays a grid of buttons, one for

each virtual desktop, and their names (One, Two, Three, etc., by default). Clicking on a button

will switch your screen to the corresponding desktop.

If you click the window list icon, it displays a menu divided into sections for each desktop and

items for each window they contain. (The window list is also accessible by middle-clicking on

the desktop background.) For example, if desktop two contains an open file manager window,

you can click on it in the window list, and you will switch to desktop two and activate the file

manager window.

You can configure the number of virtual desktops and their names in the Desktops section of

the Panel configuration module in the Control Center.

16.2.2. The Taskbar

The taskbar runs across the top of your screen and helps you keep track of running

applications. The taskbar contains buttons to identify each open application window. If the

button for an application is clicked, it is the current active window. When you iconify a

window, you can raise it again by clicking its button on the toolbar. If a window has been

iconified, its taskbar button contains a parenthesized text label.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_02.htm (1 of 2) [15/05/2002 18:13:21]

The Panel and Taskbar (Linux in a Nutshell, 3rd Edition)

Whenever you use the arrow buttons to hide the panel, the toolbar displays buttons to access

the main menu, the disk navigator, and the window list. These buttons will disappear when

you show the panel again.

In the panel settings module of the Control Center, you can adjust the positioning of the

taskbar on the screen or choose not to display it at all. You can also set it to autohide so that it

reduces when you aren't using it.

16.2.3. Adding an Application Link to the Panel

The simplest way to add an application button to the panel is by dragging an icon from the

desktop to the panel. This will copy the link from the desktop. Any application listed on the

main menu can be easily added to the panel. From the main menu, choose Panel Add

Application, then select from submenus or items that are listed. The choices you have are the

same items that appear on the main menu.

If you don't want to display some of the default panel buttons, you can use the Panel menu to

turn them off (or on again). The window list and the disk navigator items on the Panel menu

toggle the display of the buttons on the panel. If the item's menu icon appears clicked, the

Panel buttons are enabled. Select it again from the menu to disable the Panel buttons.

16.2.4. Running an Application on the Panel

A swallowed application is a program that you run on the panel instead of in a desktop

window. A swallowed application can be a small utility that monitors network activity or

provides mail notification, for example. In the Execute tab of the properties window, type in

the Swallowing on Panel section with the command to execute and the title that appears in the

titlebar of the application's window. The panel identifies the application to "swallow" by its

window title.

16. KDE

16.3. The KDE Control


Copyright © 2001 O'Reilly & QKFIN. All rights reserved.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_02.htm (2 of 2) [15/05/2002 18:13:21]

The KDE Control Center (Linux in a Nutshell, 3rd Edition)

Linux in a Nutshell, 3rd


16.3. The KDE Control Center

The KDE Control Center contains a number of configuration tools, called modules, that allow

you to configure and view information about your system. You can configure the desktop, the

window manager, input devices, and any other important part of your system here. The

Control Center is split into two windows: the left window shows a hierarchical list of installed

modules, and the right window displays them when they are selected. (You also have the

option to display each module in its own window. Go to the Options menu and click the

Swallow Modules entry, which is checked by default, to unselect it.)

16.3.1. Applications

The Applications modules set preferences for important KDE components, such as the login

manager, kfm, and the panel. Login manager (root only)

The KDE login manager is the program that controls the graphical login screen. This module

lets you configure the graphical style of the login screen, as well as set some default display

options, such as prelisted users and available session environments.

The Appearance tab lets you edit the greeting string displayed on the login screen and choose a

logo. A drop-down box offers you a choice of the GUI style of the login screen: either

Windows or a Motif style. The Language option on this tab lets you select the default character

encoding for the login manager.

The Fonts tab lets you choose the font style and size for the Greeting, Fail, and Standard

screen messages. Select which type you want to configure from the drop-down list and click

the Change Font button. The pop-up window shows a list of available fonts and lets you set the

point size. Click the OK button to close the pop-up window. The font you have chosen is

displayed in the Example area of the tab.

The Background tab lets you select the background for the login screen. Like the desktop

background, you can choose a color or wallpaper to use.

file:///E|/O'Reilly/O'Reilly%20-%20Linux%20in%20a%20Nutshell,%203rd%20Edition/Pages/ch16_03.htm (1 of 19) [15/05/2002 18:13:26]

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

KDE (Linux in a Nutshell, 3rd Edition)

Tải bản đầy đủ ngay(0 tr)