Corel Word Perfect Office

Although it doesn't have near the market share of Microsoft Office, Corel WordPerfect Office is still the second most popular productivity suite on the market. It has all the same functions as Microsoft Office, including word processing (WordPerfect), a spreadsheet (Quatro Pro), presentation (Presentations), calendaring (CorelCENTRAL), and Web publishing (Trellix). The deluxe version also comes with a database (Paradox), more fonts, more clip art, the game Railroad Tycoon, and a bean-filled...

Ls dir vdir

Ls, dir, vdir List contents of directories ls abcdfgiklmnpqrstuxABCFGLNQRSUXI w cols T cols I pattern --all escape --directory --inode --kilobytes --numeric-uid-gid no-group hide-control-chars --reverse --size --width cols --tabsize cols almost-all --ignore-backups --classify --file-type --full-time ignore pattern --dereference --literal --quote-name --recursive -sort none, time, size, extension --format long, verbose, commas, across, vertical, single-column --time atime, access, use, ctime,...

Segmentation in Linux

Global Descriptor Table 80386

Segmentation has been included in 80 x 86 microprocessors to encourage programmers to split their applications into logically related entities, such as subroutines or global and local data areas. However, Linux uses segmentation in a very limited way. In fact, segmentation and paging are somewhat redundant since both can be used to separate the physical address spaces of processes segmentation can assign a different linear address space to each process, while paging can map the same linear...

Running Microsoft Office on Linux Crossover

One of the primary concerns for new Linux users is what kind of access they will have to their Microsoft Office files, particularly Word files. The Linux operating system and many applications for it are designed to provide seamless access to MS Office files. The major Linux Office suites, including KOffice, OpenOffice, and StarOffice, all read and manage any Microsoft Office files. In addition, these office suites are fast approaching the same level of features and support for office tasks as...

Process Life Cycle

A process is not always ready to run. Occasionally, it has to wait for events from external sources beyond its control for keyboard input in a text editor, for example. Until the event occurs, the process cannot run. The scheduler must know the status of every process in the system when switching between tasks it obviously doesn't make sense to assign CPU time to processes that have nothing to do. Of equal importance are the transitions between individual process states. For example, if a...

Mirror Configuration

There are two basic methods to synchronize a local client to a remote repository. The rsync command is the traditional method associated with synchronizing local and remote groups of files. The apt-mirror command is more focused, and in my opinion, a better choice at least for the initial mirroring of the remote repository. The focus of this section is on apt-mirror you could subsequently use the rsync command to keep the repository created up-to-date. As the apt-mirror package is rarely...

Differences Between IPFW and Netfilter Firewall Mechanisms

Firewakk Mechnism

Because iptables is so different from the previous ipchains, this book won't attempt to cover the older implementation. The next section is written for the reader who is familiar with or is currently using ipchains. If iptables is your first introduction to Linux firewalling, you can skip ahead to the section Netfilter Packet Traversal. If you are converting from ipchains, you'll notice several minor differences in the iptables syntax, most notably that the input and output network interfaces...

Busy Box init

Among the commands it supports by default, BusyBox provides init-like capabilities. As with the original mainstream init, BusyBox can handle the system's startup. BusyBox init is particularly well adapted to embedded systems, because it provides most of the init functionality an embedded system typically needs without dragging the weight of the extra features found in System V init. Also, because BusyBox is a single package, there is no need to keep track of an additional software package when...

Memory Regions

Modified Folfirinox

Linux implements a memory region by means of an object of type vm_area_struct its fields are shown in Table 8-3. Table 8-3. The fields of the memory region object Table 8-3. The fields of the memory region object Pointer to the memory descriptor that owns the region First linear address inside the region First linear address after the region Access permissions for the page frames of the region Data for the red-black tree (see later in this chapter) Pointer to the next element in the file memory...

Squid High Availability Design Considerations

For a server that works with a large number of configuration files that need to be the same on all cluster nodes, shared storage is an important issue. If a traditional Linux service such as Squid is clustered, it would make sense to use an ext3 or Reiser file system for shared storage. If, however, the customer does not care about the availability of the cache files because they can always be built up anew when a server fails, we can configure the cluster solution without shared storage for...

Choosing the Right FTP Server

FTP is an old protocol, and numerous implementations of it have sprung up over the years. These servers vary in many details however, they all serve the same protocol, and they all look very much alike to their users. FTP server options for Linux include ProFTPd This server, headquartered at http proftpd.org, is one of the more popular of the very complex FTP servers. It ships with most major Linux distributions. Its configuration file is modeled after that of Apache, and the server supports...

The Migration Thread

Linux Thread Construct Diagram

The migration thread serves two purposes It must fulfill migration requests originating from the scheduler, and it is used to implement active balancing. This is handled in a kernel thread that executes migration_thread. The code flow diagram for the function is shown in Figure 2-27. Figure 2-27 Code flow diagram for migration_thread. Figure 2-27 Code flow diagram for migration_thread. migration_thread runs an infinite loop and sleeps when there is nothing to do. First of all, the function...

Page Cache Readahead

Linux Page Cache

Predicting the future is generally accepted to be a rather hard problem, but from time to time, the kernel cannot resist making a try nevertheless. Actually, there are situations where it is not too hard to say what will happen next, namely, when a process is reading data from a file. Usually pages are read sequentially this is also an assumption made by most filesystems. Recall from Chapter 9 that the extended filesystem family makes great effort to allocate adjacent blocks for a file such...

Disk Controller Types

The disk controller is the adapter card that acts as an intermediary between your PC's motherboard and one or more hard disk drives. Typically, you can connect up to two hard drives and two floppy drives to a single disk controller. The Small Computer System Interface (SCSI) controller is an exception to this norm you can connect as many as 7 or 15 SCSI devices (anything that has a SCSI interface, such as a disk drive, CD-ROM drive, tape drive, or scanner) in a series. Over the years, several...

Using the r commands rlogin rcp and rsh

The rlogin, rcp, and rsh commands all use the same underlying security mechanism to enable remote login, remote file copy, and remote execution, respectively, among computers. If you use these commands, you will find that they are a quick and convenient way of exchanging information among a group of trusted computers. Caution The default security mechanism used by the r commands is not very secure. Don't use these commands if your computers protect national secrets. I recommend using these...

Installing sendmail

Sendmail App Linux

As mentioned previously, sendmail is never installed by default on a SUSE system. To install sendmail, you will need to remove Postfix, the default MTA on SUSE Linux systems, or any other MTA that you may previously have installed. SUSE's use of RPM as a core database for tracking installed packages and associated files simplifies adding and removing entire packages, but YaST makes the process even easier. To install sendmail on your SUSE Linux system, do the following 1. Start YaST, select...

The Buddy System Algorithm

Buddy Algorithm Linux Diagram

The kernel must establish a robust and efficient strategy for allocating groups of contiguous page frames. In doing so, it must deal with a well-known memory management problem called external fragmentation frequent requests and releases of groups of contiguous page frames of different sizes may lead to a situation in which several small blocks of free page frames are scattered inside blocks of allocated page frames. As a result, it may become impossible to allocate a large block of contiguous...

Remastering PCLinuxOS

Offering tools for remastering PCLinuxOS has encouraged users to create their own custom versions of PCLinuxOS. In many cases, those users have made their remasters available to others. That gives you the opportunity to try out versions of PCLinuxOS that include different desktop environments or special sets of applications. The DVD that comes with this book includes the official PCLinuxOS live CD, which offers a KDE desktop by default. That and other official remasters are available from...

Office Formats

The .rtf (Rich Text Format) format is often mentioned as an open text-based format for interchanging documents. This file format was developed by Microsoft. It is a plain text format with markup, and there is an openly published specification for it, unlike the binary .doc files. An RTF file is actually not so nice when you look inside it user bible > less afile.rtf rtf1 ansi deff0 adeflang1025 fonttbl f0 froman fprq2 fcharset0 Nimbus Roman No9 L * falt Times New Roman f1 froman fprq2...

Reclaiming Page Frame

The virtual memory subsystem of Linux is, without any doubt, the most complex and performance-critical component of the whole kernel. In previous chapters, we explained how the kernel handles dynamic memory by keeping track of free and busy page frames. We have also discussed how every process in User Mode has its own linear address space so that page frames can be assigned to the process at the very last possible moment. Finally, we have also described how dynamic memory is used to cache the...

Real Audio Real Video and Quick Time TCP Ports 554 and 7070

This document is created with trial version of CHM2PDF Pilot 2.15.72. RealAudio, RealVideo, and QuickTime use the same ports. The control connection to the server is built on top of the Real-Time Streaming Protocol (RTSP). See RFC 2326, Real Time Streaming Protocol (RTSP), for more information on the protocol. The incoming data stream is built on top of the Real-Time Transport Protocol (RTP). See RFC 3550, RTP A Transport Protocol for Real-Time Applications, for more information on the RTP...

Copy on Write

The kernel uses the copy-on-write technique (COW) to prevent all data of the parent process from being copied when fork is executed. This technique exploits the fact that processes normally use only a fraction of their pages in memory.8 When fork is called, the kernel would usually create an identical copy of each memory page of the parent process for the child process. This has two very negative effects 1. A large amount of RAM, a scarce resource, is used. 2. The copy operation takes a long...

Using fstab to Mount NFS Directories

A mount command with the -a flag set causes Linux to mount all filesystems listed in etc fstab. Linux systems often include a mount -a command in the startup. Adding the -t nfs argument to the mount -a command limits the mount to all filesystems in fstab that have a filesystem type of NFS. The Red Hat netfs script uses the -t nfs argument to remount the NFS filesystems after a system boot. The filesystem table, etc fstab, defines the devices, partitions, and remote filesystems that make up a...

Ripping Audio CDs Using Rhythmbox on Ubuntu

Ripping CDs in Rhythmbox is almost exactly like playing them (as shown in Figure 19-25), with the exception of the fact that you click the Extract button rather than the Play button to start the process. While Rhythmbox is extracting the contents of an audio CD and converting each track to a file, it displays progress information in the lower-left corner of the Rhythmbox dialog. Before ripping a CD, however, you may want to specify the format of the audio files that Rhythmbox creates, the...

Dead Code Elimination

On first reading, the term ''dead code elimination'' sounds quite violent. On second reading, it seems to be somewhat contradictory. After all, how can code that is already dead be eliminated Only when the term is examined for a third time does it become apparent that it refers to an optimization feature in which program sections that can never execute are eliminated from code generation to reduce the size of the assembler code. How does dead code accumulate in a program It would be normal to...

Configuring Remote Printers with systemconfigprinters

You can also use system-config-printer to set up a remote printer on Linux, Unix, or Windows networks. Access system-config-printers by choosing System Administration Printing. When you add a new printer or edit a printer settings, the New Printer Select Connection dialog will list possible remote connection types (Figure 29-7). When you select a remote connection entry, a panel will be displayed, where you can enter configuration information. For a remote Linux or UNIX printer, select either...

The Very Secure FTP Service

Before configuring the vsFTP server, you need to install it. One method is with the following command A multi-threaded TFTP server for multiple connections An FTP server with an SSL option other FTP servers are preferred in the Ubuntu documentation An FTP server that uses Kerberos for authentication A complex FTP server with support for chroot directories, quotas, and more The standard TFTP server, sometimes used for terminal servers A two-part FTP server, including an authenticating front-end...

Install Xfce

To install Xfce from the command line interface, you could install any or all of the Xfce packages available from the Hardy Heron repositories. But the implicit objective is not to install a standard GUI desktop, but to install a GUI with a fairly minimal number of packages. The apt-cache search xfce command reveals 108 packages. As Xfce is built from the same toolkit as GNOME, GNOME-based GUI administrative tools can also be installed on that desktop environment. Be aware, several described...

NFS disadvantages

NFS has its shortcomings, of course, primarily in terms of performance and security. As a distributed, network-based file system, NFS is sensitive to network congestion. Heavy network traffic slows down NFS performance. Similarly, heavy disk activity on the NFS server adversely affects NFS's performance. In both cases, NFS clients seem to be running slowly because disk reads and writes take longer. If an exported file system is not available when a client attempts to mount it, the client system...

Xview Programming Reference

XView (X Window-System-based Visual Integrated Environment for Workstations) is a user-interface toolkit to support interactive, graphics-based applications running under the X Window System. This toolkit, developed by Sun Microsystems, Inc., is derived from earlier toolkits for the SunView windowing system. With over 2000 SunView applications in the workstation market, there are many programmers already familiar with the SunView application programmer's interface (API). XView has many...

Nonroutable IP addresses

192 Addressing Non Routable

Every machine that is directly connected to the Internet must have a public IP address, commonly known as a routable address. A routable address is one that a connection can be made to from anywhere on the TCP IP network, in this case, the Internet. For example, any web site you visit that is on the Internet has a routable address. If it were non-routable, packets would not be able to be routed to it. Each IP address class has its own non-routable address, which can be used in a private IP...

E17 System Requirements

Since 1994 The Original Monthly Magazine of the Linux Community Subscribe today at www.linuxjournal.com Enlightenment the Next Generation of Linux Desktops The soon-to-be-released version of Enlightenment, E17, offers a lightweight, yet stunning, alternative to KDE and GNOME. jay kruizenga Do you remember the first time you saw the phenomenally successful Get a Mac ad campaign The American ads feature actor Justin Long as the friendly, calm and casual Mac, paired with funny-man John Hodgman as...

The Physical Address Extension PAE Paging Mechanism

The amount of RAM supported by a processor is limited by the number of address pins connected to the address bus. Older Intel processors from the 80386 to the Pentium used 32bit physical addresses. In theory, up to 4 GB of RAM could be installed on such systems in practice, due to the linear address space requirements of User Mode processes, the kernel cannot directly address more than 1 GB of RAM, as we shall see in the later section Section 2.5. However, some demanding applications running on...

Using the Red Hat Printer Configuration Window

If you are using Fedora, RHEL, or other Red Hat-sponsored systems, you can use the Printer Configuration window to set up your printers. In fact, I recommend that you use it instead of CUPS Web administration because the resulting printer configuration files are tailored to work with Red Hat systems. To install a printer from your GNOME desktop in Fedora, open the Printer Configuration window by selecting System C Administration C Printing (with Fedora 8, select System C Printing) or as root...

Global Interrupt Disabling

Some critical kernel functions can execute on a CPU only if no interrupt handler or deferrable function is running on any other CPU. This synchronization requirement is satisfied by global interrupt disabling. A typical scenario consists of a driver that needs to reset the hardware device. Before fiddling with I O ports, the driver performs global interrupt disabling, ensuring that no other driver will access the same ports. As we shall see in this section, global interrupt disabling...

Local Interrupt Disabling

Interrupt disabling is one of the key mechanisms used to ensure that a sequence of kernel statements is treated as a critical section. It allows a kernel control path to continue executing even when hardware devices issue IRQ signals, thus providing an effective way to protect data structures that are also accessed by interrupt handlers. By itself, however, local interrupt disabling does not protect against concurrent accesses to data structures by interrupt handlers running on other CPUs, so...

Buffer Pages

Although the page cache and the buffer cache are different disk caches, in Version 2.4 of Linux, they are somewhat intertwined. In fact, for reasons of efficiency, buffers are not allocated as single memory objects instead, buffers are stored in dedicated pages called buffer pages. All the buffers within a single buffer page must have the same size hence, on the 80 x 86 architecture, a buffer page can include from one to eight buffers, depending on the block size. A stronger constraint,...

The dentry Cache

Since reading a directory entry from disk and constructing the corresponding dentry object requires considerable time, it makes sense to keep in memory dentry objects that you've finished with but might need later. For instance, people often edit a file and then compile it, or edit and print it, or copy it and then edit the copy. In such cases, the same file needs to be repeatedly accessed. To maximize efficiency in handling dentries, Linux uses a dentry cache, which consists of two kinds of...

Managing Samba Users smbasswd and pdbedit

The easiest way to manage Samba users is to use the system-config-samba tool. Click Preferences to select Samba Users. In this window you can then add, edit, or remove Samba users. In the SWAT tool you would use the Password panel. To manage users you can either use the smbpasswd command or the pdbedit tool. The smbpasswd command with the -a option will add a user and the -x option will remove one. To enable or disable users you would use the -e and -d options. The smbpasswd command will...

NetBIOS Name Service

Even though installing the Samba software has not yet been discussed, this is a good place to discuss the NetBIOS Name Server daemon (nmbd) and how it is configured. nmbd is the part of the basic Samba software distribution that turns a Linux server into an NBNS server. nmbd can handle queries from Windows 95 98 ME NT 2000 and LanManager clients, and it can be configured to act as a WINS server. Note The Microsoft implementation of NetBIOS name service is Windows Internet Name Service (WINS)....

Installing Firestarter

Let's get started by downloading and installing Firestarter. Follow these steps 1. Select System Administration Synaptic Package Manager. You'll need to enter your password when prompted. Click the Search button, and enter firestarter as a search term. In the list of results, locate the program, and click the check box. Then choose to install the package, and click Apply on the Synaptic toolbar. 2. Once the desktop is back up and running, select System Administration Firestarter. When you run...

Copying Data between Kernel and Userspace

The kernel often needs to copy data from userspace to kernel space for example, when lengthy data structures are passed indirectly in system calls by means of pointers. There is a similar need to write data in the reverse direction from kernel space to userspace. This cannot be done simply by passing and de-referencing pointers for two reasons. First, userspace programs must not access kernel addresses and second, there is no guarantee that a virtual page belonging to a pointer from userspace...

NASM f elf g F stabs

The name of the source code file to be assembled. Specifies that debug information is to be generated in the stabs format. Specifies that debug information is to be included in the .o file. Specifies that the .o file will be generated in the elf format. Figure 5-11 The anatomy of a NASM command line -f elf There are a fair number of useful object file formats, and each one is generated differently. The NASM assembler is capable of generating most of them, including other formats, such as bin,...

Writing Dirty Buffers to Disk

Unix systems allow the deferred writes of dirty buffers into block devices, since this noticeably improves system performance. Several write operations on a buffer could be satisfied by just one slow physical update of the corresponding disk block. Moreover, write operations are less critical than read operations, since a process is usually not suspended because of delayed writings, while it is most often suspended because of delayed reads. Thanks to deferred writes, each physical block device...

The Registry vs Text Files

I think of the Windows Registry as the ultimate configuration database thousands upon thousands of entries, very few of which are completely documented, some located on servers and some located on clients. While it is possible to edit Registry entries manually, the fact that one does so using a graphical tool doesn't make the process intuitive. Consider this Windows .NET Server Registry setting In HKEY_LOCAL_MACHINE Management PrefetchParameters, set EnablePrefetcher to 0x00000003 to enable...

Layout of the Process Address Space

The virtual address space is populated by a number of regions. How they are distributed is architecture-specific, but all approaches have the following elements in common The binary code of the code currently running. This code is normally referred to as text and the area of virtual memory in which it is located as a text segment.1 The code of dynamic libraries used by the program. 1 This is not the same as a hardware segment, which is featured in some architectures and acts as a separate...

Adding Swap Space on the

In rare situations, you may find that you are running out of swap space. If that happens, it is useful to know how to add a swap file by hand. Using swap files is not an ideal solution, because swap files are slower than swap partitions. Since it is better than running out of memory completely, though, it is better than doing nothing. To add swap space by hand, proceed as follows 1. Use the dd command to create a file that can be used for swapping. Specify the size of the file you want to...

Installing the Lotus Notes client on Linux

Once CrossOver Office is configured, you can then install the Domino Administration Client. By default, the CrossOver Office setup has line items for Microsoft Office, Lotus Notes and Other. Select Lotus Notes, then click the ADD button. The application installation dialog is presented (Figure 5-6 on page 261). Figure 5-6 CrossOver Office - Add Application Figure 5-6 CrossOver Office - Add Application Choose your method of installation either CDROM, or an executable file. Since we downloaded...

Professional Linux Kernel Architecture

10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright 2008 by Wolfgang Mauerer Published by Wiley Publishing, Inc., Indianapolis, Indiana Manufactured in the United States of America 10 987654321 Library of Congress Cataloging-in-Publication Data Professional Linux kernel architecture Wolfgang Mauerer. p. cm. Includes index. ISBN 978-0-470-34343-2 (pbk.) 1. Linux. 2. Computer architecture. 3. Application software. I. Title. QA76.9.A73M38 2008 005.4'32--dc22 No part of this...

Running Microsoft Office in Linux with Cross Over Office

You probably have Windows and Microsoft Office installed on your PC. When you decide to install Linux on the PC, you can, for a price, continue to run the key Microsoft Office applications from the GNOME or KDE desktop. The convenience of running Microsoft Office in Linux comes in the form of a commercial product called CrossOver Office. CrossOver Office, from CodeWeavers, is a software package that enables you to install your Microsoft Office applications (all versions of Office, including...

ToPDC or Not to PDC

A domain controller is a server that supplies authentication information for a Windows domain. If you want your Samba server to join an existing Windows domain, you probably do not want it to act as a primary domain controller because a primary domain controller will already exist (probably in the form of a Windows server). Starting a second primary domain controller on an existing Windows domain will certainly confuse any Windows systems that are already members of that domain and will...

Memory Mapping Data Structures

Linux Memory Mapping Files

A memory mapping is represented by a combination of the following data structures The inode object associated with the mapped file The address_space object of the mapped file A file object for each different mapping performed on the file by different processes A vm_area_struct descriptor for each different mapping on the file A page descriptor for each page frame assigned to a memory region that maps the file Figure 15-4 illustrates how the data structures are linked. In the upper-left corner,...

Mounting the Root Filesystem

Mounting the root filesystem is a crucial part of system initialization. It is a fairly complex procedure because the Linux kernel allows the root filesystem to be stored in many different places, such as a hard disk partition, a floppy disk, a remote filesystem shared via NFS, or even a fictitious block device kept in RAM. To keep the description simple, let's assume that the root filesystem is stored in a partition of a hard disk (the most common case, after all). While the system boots, the...

Appendix B Unix Error Messages

Errors generated by the failure of a system call or library function, can be displayed using the perror or strerror library function calls (see Managing Failures Section 1.5, Managing System Call Failures). For example, the error messages returned by strerror on a Linux system can be displayed in their entirety using Program B.1. Program B.1 Displaying strerror messages. for (int err 0 err < sys_nerr ++err) cout err ' t' strerror(err) endl As the output of the program will fill more than one...

The Message of a Failed ping

A failed ping test can also tell you a lot. Listing 13.10 shows a ping test failure. Listing 13.10 A Failed ping Test PING 172.16.2.2 (172.16.2.2) 56 data bytes ping sendto Network is unreachable ping wrote 172.16.2.2 64 chars, ret -1 ping sendto Network is unreachable AC 3 packets transmitted, 0 packets received, 100 packet loss Again, the test directs you to focus your troubleshooting efforts on certain layers of the network. A failure indicates you should focus on the network hardware,...

Creating an AIDE Configuration File

After AIDE has been installed, the first thing you'll want to do is create a configuration file. Unlike most other software in Linux, AIDE doesn't include a default configuration file from which you can build a customized version. There is a sample configuration file in the < AiDE-source> doc directory, but it explicitly states that you shouldn't use it as a system-wide configuration file. Therefore, you'll have to build one of your own. Don't worry, I'm here to help. The AIDE configuration...

Exploring the Desktop Components

After logging in to KDE for the first time, you see the KDE desktop. It consists of the following basic elements Desktop Icons and Desktop Folder Desktop icons represent files, directories, applications, functions, and removable media, like CDs or DVDs. Click an icon on the desktop to access its associated program or application. By default, your desktop icons are shown in a Desktop Folder, a transparent region of the screen showing the contents of the Desktop folder in your home directory. If...

Verifying Installed Packages with debsums

There are times when you will question the behavior of a binary or package installed on the system. It may not perform correctly, or may not even start at all. Problems with corrupt packages from unstable network connections or power outages do happen. In addition, malicious users may attempt to replace powerful commands with their own versions to cause further harm. It becomes useful to check the files on the file system against the information stored in the package. The debsums program is a...

High Resolution Timers in High Resolution Mode

Hrtimer Interrupt

Let us first assume that a high-resolution clock is up and running, and that the transition to highresolution mode is completely finished. The general situation is depicted in Figure 15-13. When the clock event device responsible for high-resolution timers raises an interrupt, hrtimer_interrupt is called as event handler. The function is responsible to select all timers that have expired and either move them to the expiration list (if they may be processed in softIRQ context) or call the...

D21 Subsystem Initialization

Linux Subsystem Diagram

Figure D-1 shows a code flow diagram to briefly illustrate the function's tasks and goals. The first step is to output the version message. The message text is held in the linux_banner global variable defined in init version.c. This is followed by a further architecture-specific initialization step, which no longer deals with lower-level processor details but is written in C and which, on most systems, has the primary task of setting the framework for initialization of high-level memory...

Destination Cache Utility Functions

There are a few important utility functions associated with the destination cache. Several of these functions are called directly by users of the destination cache, and some of them are generic functions for manipulating entries that are initialized in the destination cache entry when it is created. The functions are defined in file linux net core dst. c. Destination cache entries are allocated with dst_alloc. void * dst alloc(struct dst ops * ops) In this function, we allocate an instance of a...

Civilization Call to Power

You can build online civilizations with Civilization Call to Power (CCP). Like earlier versions and public spin-offs (such as the Freeciv described earlier in this chapter), Civilization Call to Power for Linux lets you explore the world, build cities, and manage your empire. This latest version offers multiplayer network competition and extensions that let you extend cities into outer space and under the If you like the Freeciv game that comes with Red Hat Linux, you will love CCP. Engaging...

Processor Cache and TLB Control

Caches are crucial in terms of overall system performance, which is why the kernel tries to exploit them as effectively as possible. It does this primarily by skillfully aligning kernel data in memory. A judicious mix of normal functions, inline definitions, and macros also helps extract greater performance from the processor. The compiler optimizations discussed in Appendix C also make their contribution. However, the above aspects affect the cache only indirectly. Use of the correct alignment...

The Structure and Elements of the Samba Configuration File

The Samba services are configured in the file etc samba smb.conf. The options in the this file are grouped into different sections. Each section starts with a keyword in square brackets. To set up a simple file server with Samba, do the following Create a Section for the General Server Configuration Create a Section for the Files to be Shared Create a Section for the General Server Configuration The section for the general server configuration starts with the keyword global . The following is...

Sharpen images at the command line

Previous Page Command

If you followed Tip 154, on page 197, and Tip 11, on page 72, you'll already have come into contact with Imagemagick. This command-line program can do just about anything to images and you can learn more about it by viewing its man page (man imagemagick) or viewing its website Perhaps one of the most useful functions it can perform, besides file format conversion and resizing, is to sharpen an image. Almost all images look better when sharpened, particularly if they're being shrunk for use in...

Types of Timers

Linux Kernel Architectiure

The timing subsystem of the kernel has grown tremendously during the development of 2.6. For the initial releases, the timer subsystem consisted solely of what are now known as low-resolution timers. Essentially, low-resolution timers are centered around a periodic tick which happens at regular intervals. Events can be scheduled to be activated at one of these intervals. Pressure to extend this comparatively simple framework came predominantly from two sources Devices with limited power (i.e.,...

Process Switch

To control the execution of processes, the kernel must be able to suspend the execution of the process running on the CPU and resume the execution of some other process previously suspended. This activity goes variously by the names process switch, task switch, or context switch. The next sections describe the elements of process switching in Linux. While each process can have its own address space, all processes have to share the CPU registers. So before resuming the execution of a process,...

Configuring the PureFTPd Server

Strictly speaking, the actual configuration of the PureFTPd server is made purely via command line parameters passed when the server is started. The configuration file etc pure-ftpd.conf cannot overwrite any values here. It is evaluated by a Perl script, which creates the corresponding command line parameters from it. These are passed to the program when it starts. The FTP server can either run as an independent service or be started via the inetd . If PureFTPd should be started directly, this...

Installing Software in Knoppix

Despite the fact that KNOPPIX includes a wide range of software applications, there may be some software package you want to use with it that isn't included. For installing software while you are running KNOPPIX from the DVD, you can use Synaptic. To start Synaptic, click the squished penguin on the KNOPPIX panel and select Utilities C Manage Software in KNOPPIX. The Synaptic window opens, displaying lists of installed packages. Here's what you do to install a package 1. Reload the package...

Using linuxconf

The most complete graphical utility for working with Red Hat Linux is linuxconf. It contains features for configuring networking (client and server tasks), creating user accounts, and working with the file system. Note Red Hat is phasing out support for linuxconf. In fact, unless you do an everything install of Red Hat Linux, it's likely that linuxconf isn't even installed on your system. If linuxconf is not found, you can install it from the second Red Hat Linux installation CD (CD-2). As Red...

Dentry Objects

We mentioned in Section 12.1.1 that the VFS considers each directory a file that contains a list of files and other directories. We shall discuss in Chapter 17 how directories are implemented on a specific filesystem. Once a directory entry is read into memory, however, it is transformed by the VFS into a dentry object based on the dentry structure, whose fields are described in Table 12-5. The kernel creates a dentry object for every component of a pathname that a process looks up the dentry...

Using the CUPS Web Interface

Messchieberanalog

The CUPS web interface can be viewed from a browser using port 631 see Figure 19-8 . By default, SUSE's settings allow only administrative changes through the browser interface when connecting from the local machine. This can be changed in the cupsd.conf file, but for now we will look at administering the server from a browser running on itself. So from the local machine, you need to browse to http localhost 631. Some of the functions that are available simply provide information. Others can...

Configuring CUPS and Network Printers with KDEPrint

Setting up remote network printers is not substantially different from the local setup process, but because SUSE Linux 10 gives you a choice, let's show you how to set this up in the KDEPrint wizard . To open KDEPrint, go to Printers in the KDE menu. Figure 7.7 shows you the existing printers it has autodetected. Figure 7.7. KDEPrint displays autodetected and manually added printers. Figure 7.7. KDEPrint displays autodetected and manually added printers. Click Add to select your remote printer....

Level Triggered Interrupts

Interrupt Linux Kernel

Level-triggered interrupts are a little easier to process than their edge-triggered relatives. This is also reflected in the code flow diagram of the flow handler handle_level_irq, which is depicted in Figure 14-6. Figure 14-6 Code flow diagram for handle_level_irq. Figure 14-6 Code flow diagram for handle_level_irq. Note that level-triggered interrupts must be masked when they are processed, so the first thing that needs to be done is to call mask_ack_irq. This auxiliary function masks and...

Saving IPtables Rules

Once you are satisfied that your IPtables rules are working correctly, you can save your rules to the etc sysconfig iptables file (for IPv6 you use etc sysconfig ip6tables). Use the iptables service script with the save option. Now your rules will be read automatically when your system starts up. You can think of the save operation as installing your IPtables rules on your system, making them part of your system setup whenever you start your system. To make changes, modify your iptables script,...

Installing a Server Automatically with AutoYaST

If you just need to install a few servers, it will be no problem to go through the installation procedure manually for each of the servers. However, if you need to configure many servers, it can be rather cumbersome to do so by hand, and the server configurations may not be consistent throughout the organization. In that case, AutoYaST can be a good option. With AutoYaST, it is possible to clone all the current settings of a system and write them to a configuration file. This configuration file...

Using strace with Java

As with native applications, using strace with Java will give you some visibility into how your Java application is stressing the kernel. The challenge to using strace is to run it on the java executable, not on the java launch script. We do this with a modest trick using the debugger backdoor built into the java launch script. DEBUG_PROG strace java -green Setting the debug_prog environment variable causes the java launch script to invoke the java executable with the specified command. The...

Understanding How a Cable Modem Works

How Modem Works

A box called a cable modem is at the heart of Internet access over the cable TV network. The cable modem takes digital data from your PC's Ethernet card and puts in an unused block of frequency (think of it as another TV channel, but instead of pictures and sound, this channel carries digital data). The cable modem places upstream data data that's being sent from your PC to the Internet in a different channel from that used for the downstream data that's coming from the Internet to your PC. By...

Sectors Blocks and Buffers

Each data transfer operation for a block device acts on a group of adjacent bytes called a sector. In most disk devices, the size of a sector is 512 bytes, although there are devices that use larger sectors (1,024 and 2,048 bytes). Notice that the sector should be considered the basic unit of data transfer it is never possible to transfer less than a sector, although most disk devices are capable of transferring several adjacent sectors at once. The kernel stores the sector size of each...

Direct Memory Access DMA

All PCs include an auxiliary processor called the Direct Memory Access Controller (DMAC), which can be instructed to transfer data between the RAM and an I O device. Once activated by the CPU, the DMAC is able to continue the data transfer on its own when the data transfer is completed, the DMAC issues an interrupt request. The conflicts that occur when both CPU and DMAC need to access the same memory location at the same time are resolved by a hardware circuit called a memory arbiter (see...

Using the Nautilus file manager

At one time, file managers did little more than let you run applications, create data files, and open folders. These days, as the information a user needs expands beyond the local system, file managers are expected to also display Web pages, access FTP sites, and play multimedia content. The Nautilus file manager, which is the default GNOME file manager, is an example of just such a file manager. When you open the Nautilus file manager window (from the GNOME main menu or by launching a...

GNOME Desktop Preferences

You can configure different parts of your GNOME interface using tools listed in System Preferences, where Ubuntu also provides several tools for configuring your GNOME desktop. The GNOME preferences are shown in Table 8-3. Several are discussed in different sections in this and other chapters. The Help button on each preference window will display detailed descriptions and examples. Some of the more important tools are discussed here. The keyboard shortcuts configuration (Keyboard Shortcuts)...

Changing GNOME preferences

There are many ways to change the behavior, look, and feel of your GNOME desktop. Most GNOME preferences can be modified from windows you can launch from the System menu (click Preferences to see features to change). Unlike earlier versions of GNOME for Fedora and Red Hat Linux, boundaries between preferences relating to the window manager (Metacity), file manager (Nautilus), and the GNOME desktop itself have been blurred. Preferences for all of these features are available from the Preferences...

GNOME Preferences

Fedora provides several tools for configuring your GNOME desktop. These are listed in the System Preferences menu. Configuration preference tools are organized into several submenus Personal, Look and Feel, Internet and Network, Hardware, and System. Those that do not fall into any category are listed directly. The GNOME preferences are listed in Table 3-1. Several are discussed in different sections in this and other chapters. The Help button on each preference window will display detailed...

The Gnome Desktop

GNOME (pronounced guh-nome) provides the desktop environment that you get by default when you install Fedora, Ubuntu, and other Linux systems. This desktop environment provides the software that is between your X Window System framework and the look-and-feel provided by the window manager. GNOME is a stable and reliable desktop environment, with a few cool features. As of this writing, GNOME 2.26 is the most recent version available, although the distribution you are using may or may not...

Using the Metacity Window Manager

The Metacity window manager seems to have been chosen as the default window manager for GNOME in Red Hat Linux because of its simplicity. The creator of Metacity refers to it as a boring window manager for the adult in you and then goes on to compare other window managers to colorful, sugary cereal, while Metacity is characterized as Cheerios. There really isn't much you can do with Metacity (except get your work done efficiently). Assigning new themes to Metacity and changing colors and window...

Checking Address Resolution Protocol ARP

If you're not able to ping your gateway, you may have an issue at the Ethernet MAC layer. The Address Resolution Protocol (ARP) can be used to find information at the MAC layer. To view and configure ARP entries, use the arp or ip neighbor command. This example shows arp listing computers in the ARP cache by hostname arp -v List ARP cache entries by name Address HWtype HWaddress Flags Mask Iface ritchie ether 00 10 5A AB F6 A7 C eth0 einstein ether 00 0B 6A 02 EC 98 C eth0 In this example, you...

Configure a DHCP Server Using YaST

Linux Network Server

The DHCP server can be configured with YaST by selecting YaST Network Services DHCP Server When this YaST module is started for the first time, a configuration wizard is started, enabling a simple, basic configuration in three steps. 1. Select the network interface on which the DHCP server is to listen 2. Set global settings such as the domain name and the IP addresses of name servers In SUSE LINUX Enterprise Server 9, the data of the DHCP server can be managed in an LDAP directory. To enable...

S3 Make Ubuntu safe for children to use

Ubuntu can be as kid-safe as any other operating system with a little work. Essentially, two things can be done. First you can create a new restricted user account for the child (or children) that stops them from doing anything that might break the system, or attempting to bypass any protective measures you enact. Secondly, you can install a web filtering system so that nothing that isn't entirely child-safe gets through when they're using Firefox.10 The first thing you should do is create a...

Customizing a Bootable Linux

A Linux live CD is like a Linux system running from a hard disk, with a few significant differences. It has to be tailored to run from a read-only medium, it usually doesn't (by default) save information across reboots, and it needs to be able to detect and configure hardware each time it starts. Many live CD distributions have created ways of working around these limitations, including allowing you to customize the CD and to save your customizations across reboots. If you are setting out to...