Welcome to this month's Tech Support. This month we have started listing some nifty little Linux applications you may want to check out in our "App Tips" section. If you know of a program that you think we'd like to know about, drop us a line at email@example.com. And, as always, keep those tech support questions coming.
Welcome to this month’s Tech Support. This month we have started listing some nifty little Linux applications you may want to check out in our “App Tips” section. If you know of a program that you think we’d like to know about, drop us a line at firstname.lastname@example.org. And, as always, keep those tech support questions coming.
How can I find out which X server is being used on my system? I’m running Red Hat using XF86Config.
Locating the symbolic link called X on your system is the key to answering this question, because this link is what starts your X server. For Red Hat systems and derivatives, you can find X in /usr/X11R6/bin. On older versions of Red Hat, /usr/X11R6/bin/X is directly symlinked to the X server being used. On more recent versions, however, /usr/X11R6/bin/ is symlinked to a wrapper binary that calls /etc/X11/X, which is a symlink to the X server being used.
For example, on my system, I typed which X at the command line to find where the symlink is located. My system returned /usr/X11/bin/X, so I changed directory to /usr/X11/bin and did a long listing, ls -la X. If you have an older version of Red Hat, you will see the symlink pointing to the correct X server, and you’ve accomplished your goal. Since I run a recent version of Red Hat, the X symlink is directed to the Xwrapper binary that looks at the X symlink in the /etc/X11/ directory. So I changed directories to /etc/X11 and did a long listing for X (ls -l X), which displayed the exact X server being used.
X uses the XF86Config file in /etc/ X11/XF86Config on Red Hat systems.
I use KDE on my Linux workstation and have had difficulties getting Kppp to detect my modem. Is there an easier way to determine where my modem is from the command line?
Yes, there is a way to get the information from the command line, but it may be easier simply to use Kppp to get what you need to know. At the command line, type:
for device in /dev/ttyS[0-9]
echo “atdt” >> $device
Do you hear a dialtone? If you do, the information that appears next will determine to which serial port the modem is connected. You can modify this query to give you even more detailed information. For example, adding the line:
setserial $device >> filename
provides the UART, Port, and IRQ numbers, information that can be useful for resolving hardware conflicts during the initial configuration of the modem. setserial is a program for configuring serial ports.
I have a Pentium II 300 Mhz system with IDE hard drives, and it is not performing very well. Is there a way to optimize it without buying new hardware?
One way to tune your system without upgrading your hardware is to use the hdparm utility. According to its man page, hdparm “provides a command line interface to various hard disk ioctls supported by the stock Linux IDE/ST-506 device driver.” Basically, you can use hdparm to change the way the system uses DMA (Direct Memory Access) and hardware interrupts.
By default Linux uses extremely conservative settings for IDE (Integrated Drive Electronics). In particular the default settings do two things that make the IDE system work inefficiently. First, it does not use DMA, which means that all data that comes to and from the hard disk or CD-ROM drive is processed a byte at a time by the CPU. This can be relatively transparent if you have fast processors, but it still puts a strain on available resources while you’re actively running multiple programs and processes on the machine. The second problem is that hardware interrupts are masked during IDE transfers, meaning that while data is getting bunched together for transfer to and from an IDE device, no other interrupts are processed. Basically, the machine is just waiting around until the IDE devices are done with their tasks. This slows performance with any other devices connected to the machine, such as modems, network devices, and serial devices, and could result in things such as freezing your PPP connection or rendering your mouse inactive.
Why is it set up this way by default? The reason is that there are many different types of hardware out there, a lot of which is old but still works well under normal conditions, but can corrupt data during IDE transfers. For example, CMD-640B and RZ1000 (E)IDE interfaces have problems because of a hardware flaw and can cause massive filesystem corruption when enabling the interrupt unmasking flag. Although these problems exist in some old hardware, if you are running a fairly recent 2.2.x kernel, it should detect the failure during transfer and fall back to the default settings. Even so, you still might have a problem, because there might be some corrupt data in your cache. Before using any tuning scripts incorporating hdparm, make sure that your hardware can handle both options.
The following setting is useful for just about any Linux box and is probably the simplest way to speed up your IDE-based Linux box significantly without changing the hardware. Add the following lines to your startup script on your Linux box’s /etc/ rc.d/rc.sysinit (or equivalent startup script):
/sbin/hdparm -u 1 -d 1 /dev/hda
/sbin/hdparm -u 1 -d 1 /dev/hdc
Make sure to add this to other IDE devices that you have on your system.
I just made the jump to Linux and now I want to find some office applications to help me maximize my use of Linux and minimize my dependency on Windows. Any suggestions?
A few years ago the integrated office productivity suite arena was rather bleak, but that’s changing. These days there are three major contenders in this area that are worth checking out.
StarOffice 5.1: This is an interesting integrated solution that offers word processing, spreadsheet, graphics, database, image, and HTML authoring tools. It will run on most current distributions such as Red Hat and SuSE without a problem. StarOffice does require some CPU horsepower to run, and there were a few stability problems with earlier releases of version 5. The folks who make this suite were recently acquired by Sun Microsystems, which promply slashed the cost of the CD-ROM to the very reasonable price of $10 and made a free version available for download. Check it out at http://www.sun.com/staroffice.
Corel WordPerfect 8: Corel got into the Linux game about a year ago by offering its WordPerfect word processor for free downloads. It’s a very nice solution if you’re looking for a feature-rich word-processing tool that can import a wide variety of different formats and perform some advanced page layout. WordPerfect is easy to install and comes with decent support on a mailing list that is hosted by Corel. You can get a free downloaded from http://linux.corel.com or purchased from vendors like LinuxMall (http://www.linuxmall.com). The CD-ROM version includes some additional fonts and image-editing capabilities. Look for Corel’s full Office for Linux suite, which is slated to appear in the coming months.
Applix 4.4.4: An integrated office suite that includes word processing, graphics, spreadsheet, and their database tool for connecting to SQL databases like Oracle, Informix, or Sybase. This one is powerful but does not have some of the features like changing mistyped words on the fly. It is stable and includes versions for older distributions (ones using the libc5 libraries) and the newer glibc releases.
Free Stuff: If it’s important to you to be using an open source word processor, there are a few interesting options to consider. The folks at KDE have put together KOffice, which is a little rough in functionality but — like the KDE project itself — ambitious and soon to be very cool. http://www.kde.org.
You might also want to have a look at AbiSource’s open source word processor, AbiWord. This slim, well designed word processor does quite a lot for a beta product. As long as you don’t need to import a lot of different file formats, it makes a fairly solid little writing tool. I just hope that the folks at AbiWord add an autosave feature. http://abisoft.com.
Finally, a whole range of text editors can provide basic word processing functionality. My all-time favorite is the JOE editor, which masquerades itself as a Wordstar and Emacs clone. Check out the application lists like http://www.linuxberg.com and the ever-popular Rufus RPM archives at http://www.rpmfind.org.
Gaylen Brown is a senior consultant at Linuxcare, Inc. He can be reached at email@example.com.