More 2 Cent Tips & Tricks LG #51

Rate this post

…), and reads the entire /usr/doc hierarchy – perfect for those times when the man page isn’t quite enough. I find myself using it about as often as I do the ‘man’ command.

You will need the Midnight Commander on your system to take advantage of this (in my opinion, one of the top three apps ever written for the Linux console). I also find that it is at its best when used under X-windows, as this allows the use of GhostView, xdvi, and all the other nifty tools that aren’t available on the console.

Here’s the script.

To use it, type (for example)

doc xl

and press Enter. The script will respond with a menu of all the /usr/doc subdirs beginning with ‘xl’ prefixed by menu numbers; simply select the number for the directory that you want, and the script will switch to that directory and present you with another menu. Whenever your selection is an actual file, MC will open it in the appropriate manner – and when you exit that view of it, you’ll be presented with the menu again. To quit the script, press ‘Ctrl-C’.

A couple of built-in minor features (read: ‘bugs’) – if given a nonsense number as a selection, ‘doc’ will drop you into your home directory. Simply ‘Ctrl-C’ to get out and try again. Also, for at least one directory in ‘/usr/doc’ (the ‘gimp-manual/html’) there is simply not enough scroll-back buffer to see all the menu-items (526 of them!). I’m afraid that you’ll simply have to switch there and look around; fortunately, MC makes that relatively easy!

Oh, one more MC tip. If you define the ‘CDPATH’ variable in your .bash_profile and make ‘/usr/doc’ one of the entries in it, you’ll be able to switch to any directory in that hierarchy by simply typing ‘cd ‘ and pressing the Tab key for completion. Just like using ‘doc’, in some ways…

Hope this is of help.

lil2cent-2711464 ANSWER: Triple booting

Mon, 14 Feb 100 11:51:22 Australia/NSW
From: Harry

In a recent two cent tip there was a suggestion to use NT loader to triple boot, I have another method use lilo.

Install all three OS’es, the order I did it, Win95(FAT32), NT4(NTFS) then linux (ext2).

Edit lilo.conf and add the following sections:

# Windows 95 stanza
# End Windows 95 stanza

# Windows NT stanza
# End Windows NT stanza

Then run lilo and when you can select between the three of them. If you select NT it then comes up with the NT loader. I have set this to appear for 0 seconds so that it starts straight away instead of having a menu.

Tips in the following section are answers to questions printed in the Mail Bag column of previous issues.

lil2cent-2711464 ANSWER: Re: Driver for ATI Xpert @ Work PCI card (from LinuxGazette)

Tue, 2 Feb 1999 09:25:01 +0000
From: Jan-Hendrik Terstegge

Hi Mike!

In LinuxGazette #50 you wrote:

I’m new user and believer of the Linux OS and I need help badly. I’m looking for a driver for an ATI Xpert@Work 8Mb PCI card. Where can I get it? I’m using a RedHat 5.2 and my monitor is a Mitsubishi Diamond Scan model FA3415AT4 […]

Configure your display with the help of ‘XF86Setup’ (you have to write it as I do, with upper and lower cased letters), or, if it doesn’t run the ‘xf86config’ program. Try to find your ATI Card, and if you don’t, use simply SVGA. Most of cards which are not listed are standard SVGA Cards (my Matrox Millenium G200 also), and they run very well with the SVGA driver.

lil2cent-2711464 ANSWER: Overclocking a Motherboard? 233Mhz to 450Hmz? (AnswerGuy Gazette issue 50)

Wed, 02 Feb 2000 10:54:51 -0500
From: R. Smith

Overclocking a Motherboard? 233Mhz to 450Hmz?

From Steve on Fri, 07 Jan 2000

I have a motherboard in my PC that says it has a max processor speed of 233mhz, i did’nt know this when i resently purchased a 450mhz CPU. Is there any way i can override this issue, my max bus speed is 66.

I wouldn’t recommend it. Bare motherboards are not very expensive so you should be able to pick up one for about a $100 or less that will take the CPU that you got and still allow you to pull in your old DIMMs, and adapter cards from the existing system.

Of course I’d double check the RAM (DIMMs, SIMMs or whatever you’ve got) and make sure it is fast enough that you aren’t wasting the investment in the new CPU.

Personally I don’t recommend CPU upgrades at all. I suggest that people buy the CPU, motherboard, and RAM together, and get them matched to one another. Also it is quite unlikely that you applications are actually CPU bound. Your CPU investment would probably have been better spent in extra RAM or a faster controller.

As you say your current motherboard’s bus speed is only 66Mhz. You probably want a motherboard that runs at closer to 100Mhz (at least PC100 RAM). You don’t want the CPU sitting there waiting for its own RAM all the time.

Sometimes it can be done! I just managed to get my old DFI 586STC Rev D+ motherboard to run an AMD k6-2/400.

The jumper settings for the cpu voltage only went down to 2.5v The K6-2 needs 2.2v. There are three jumpers used to set voltage. I noticed a binary pattern to the settings suggesting that there are undocumented settings for: 2.4-2.0v. Following this pattern, I set the jumper for what should be 2.2v. I installed a K6/300 and turned on the computer. It fired up fine. I let it run a while and the cpu stayed cool. I now had a K6/300 running but the bios was saying it was a MMX processor at 50mhz. It was running at 300mhz: Bogomips was 597 which is what it should be for a K6/300. The K6-2/400 will run at 6x (66mhz times 6x 396mhz) when the multiplier jumpers are set to 2x. I tried that and it was no go. She wouldn’t boot. I put the K6/300 back in and reset the multiplier jumpers to 4.5x. I went to DFI’s web page and downloaded the latest bios. I flashed the new bios and success, the cpu was now recognized as a K6/300. So, I put the K6-2/400 back in and set the jumpers back to 2x. Success again! My old DFI motherboard is now running at 400mhz. I have SUSE 6.3 on it and it seems rock stable. With a K6-2/400 selling for under $50 I don’t see this as a bad day’s work. However, I WAS prepared to suffer the consequences if this project had failed! The motherboard was old, retired from service and failure wouldn’t have been that great a lost.

Lire aussi...  Microsoft flip-flop LG #52

Rick in Tampa

lil2cent-2711464 ANSWER: Re: Help request send to Linux Gazette

Wed, 2 Feb 2000 17:21:23 -0600 (CST)
From: Michael P. Plezbert

These are not strictly linux questions, but I’ll answer them anyway. 🙂

On Sun, 16 Jan 2000, Wei Huang wrote (in issue50):

sir, I need some help.


I wrote a program of showing the contents of other program on the platform of LINUX,the compiler is g++, but got problems in statement 1 and statement 2.

First,I want to show the sentence in statement 1 ahead of the body of file being showed,but it can’t appear in the proper position.I mean I want the program running like this:

This is caused by buffering being done in the C++ stream library. To get the result you desire, you just need to flush the stream before writing directly to stdout. In other words, just put the statement « cout.flush(); » right after statement 1.

I don’t why,how can it be corrected. Second,I had believed the statement 2 is illegal in grammar.Because if you define an array, char buffer[BufferSize] ,the BufferSize indicate the number of elements in array and should be a constant or at least be a const variable,and it can’t be a variable, otherwise the program cann’t be compiled. But the fact is this program is compiled smoothly and functions normally. What is wrong?

ANSI C++ does not allow this, but g++ does. If you run g++ with the « -pedantic » flag, it will issue a warning about that statement.

Question 2, I write a c program. But when compiling, gcc reports that all the functions with « vga_ » profix are undefined,what is the problem? I had included « vga.h » in my programe as indicated in « man » help on the usage of either « vga_ » function.

You need to link with the vga library. Just include the flag « -lvga » when running g++.

lil2cent-2711464 ANSWER: C Programming hints

Mon, 14 Feb 2000 10:27:02 -0500
From: Curly

Wei Huang did write an email asking:

I want to show the sentence in statement 1 ahead of the body

The two statements in your code:

      coutInternet->kppp a pop-up box opens up and wants me to enter the root-password! This does not seem right. is there a way to avoid having to enter the root pass word when logged on as a non-root user?

This is probably related to the permissions of the serial port that your modem is using.
For instance my modem is /dev/modem. This is a symbolic link:
rsmith@aragorn:~$ ls -l /dev/modem
lrwxrwxrwx   1 root     root           10 Nov 28  1998 /dev/modem -> /dev/ttyS2

Now for the permissions on this device:
rsmith@aragorn:~$ ls -l /dev/ttyS2
crw-r-----   1 root     dialout    4,  66 Feb 22 21:24 /dev/ttyS2

So only the owner [root] has read/write acess [cRW-r-----], and the group has read access [crw-R-----]. Your setup is probably similar.
So you can do a chmod (see `man chmod') to grant wider access to the device. This can be done in two ways.
- You can give read/write access to the group that owns the device (in my case dialout), and make yourself a member of the relevant group. - Alternatively you can give read/write access to everybody.
Both of these approaches have security implications on a multi-user machine.
Another approach could be to make pppd setuid root. That means that pppd assumes the identity of root even if you start it as a normal user. I would not reccommend this. These suid programs can be a major security risk.

lil2cent-2711464 ANSWER: Display support

Tue, 22 Feb 2000 22:10:46 +0100 (CET)
From: Roland Smith

I am trying to run Linux on a system with a NEC Multisync monitor. Where can I find a driver Or what monitor should I use.

The X Window System doesn't use a monitor driver as such.
Information about the monitor's characteristics should be entered in the configuration file for the X server program, usually /etc/X11/XF86Config.
Some tools like xconfigurator or xf86config can help you with this. Your monitor might even be in their database. The X server distribution XFree86 also comes with a list of so-called modelines for lots of monitors.
Alternatively you can use the following example:
Section "Monitor"
    Identifier  "SAM M174"
    VendorName  "S.A.M. GmbH"
    ModelName   "M174"
    HorizSync   30-64   
    VertRefresh 47-100  
    Gamma 1.2
    Mode "640x480@72Hz" # Standard VESA
        DotClock        31.5
        HTimings        640 664 704 832
        VTimings        480 489 492 520
    Mode "800x600@72Hz" # Standard VESA   
        DotClock         50
        HTimings         800 856 976 1040
        VTimings         600 637 643 666
        Flags            "+HSync" "+VSync"
    Mode "1024x768@70Hz" # Standard VESA
        DotClock          75
        HTimings          1024 1048 1184 1328
        VTimings          768 771 777 806
        Flags             "-HSync" "-VSync"

It is the "Mode"'s that you want. All VESA compliant monitors should support these modes. Note that you have to look-up the "HorizSync" and the "VertRefresh" in your monitor's documentation.
For more in-depth information, see the XFree86-Video-Timings-HOWTO (usually in /usr/doc/HOWTO/XFree86-Video-Timings-HOWTO.gz)

lil2cent-2711464 ANSWER: Re: X won’t start

Tue, 22 Feb 2000 22:24:21 +0100 (CET)
From: Roland Smith

I Have Reacently Installed LINUX on an Dell OptiPlex GX110 PentiumIII that I bought. I can boot up an login into root but when i issue the command startx to get X to start this is what i get:

        execve failed for /ect/X11/X (errno 2) 

and then

        _X11TransSocketUNIXConnect: Can't Connect: errno = 2 


        Giving up 

and Finally I wonderered if anyone could help a LINUX newbie.

Your X installation has not been finished. This is/was a common problem with Red Hat and probably other distro's
Basically, /etc/X11/X is a symbolic link to the real X server (that usually lives in /usr/X11R6/bin/.
In your case the link probably doesn't point to the right file.
Try configuting X again (using whatever program you used for that) or make a link using `ln -s' to the appropriate server.

lil2cent-2711464 ANSWER: Re: Outgoing mail problem

Tue, 22 Feb 2000 22:46:59 +0100 (CET)
From: Roland Smith

We are attempting to set up our linux machine such that it can used as a POP server. On a Windoze machine, Eudora software successfully retrieves email from the machine. However, when we try to send email through the linux machine, the email bounces back. By the way, using email tools such as pine on the linux machines itself works fine.

The mail transfer agent on your Linux box is not configured to send the mail from the windoze box through. Most mail tranfer agents block relaying from other machines/domains.
The log files (/var/log/syslog, var/log/messages) should give you an idea what's wrong.
Read the documentation for the MTA you're using (probably sendmail?) to see how you should configure it properly for your situation.
You could also ask your local network wizard. :)
This page written and maintained by the Editor of the Linux Gazette. Copyright © 2000,
Published in Issue 51 of Linux Gazette, March 2000
indexnew-6412347 homenew-8587157 back2-4390158  fwd-4847475