"Linux Gazette...making Linux just a little more fun!"


More 2¢ Tips!


Send Linux Tips and Tricks to [email protected]


New Tips:

Answers to Mail Bag Questions:


Netscape for Linux trick

Date: Wed, 24 Mar 1999 01:25:12 +0000
From: andy deck, [email protected]

This script will strip away some of the annoying unconfigurable parts of Netscape and replace them with links and button titles that you choose.

This script can be used to modify Netscape 4.51 binaries that run under Linux (ELF).

It will modify the following hard-coded values, which are not modifiable with the preferences:

  1. removes "Netscape:" from the title bar
  2. Changes base url for several links that normally are directed to home.netscape.com You will be prompted for a substitute URL. Note that you will be prompted for a URL that ends with a foldername, not a file. This is because the foldername prepends several files. You should be able to make files in the folder you suggest as an alternative.
  3. Changes the label on the "My Netscape" button in the navigation toolbar. And changes the link.
  4. Changes the link for the Search button on the navigation toolbar.
  5. Changes the link behind the N button on the navigation toolbar. Currently I've hard-coded this to "newssites.html" But you can edit that value in the script.
When modifying values you need to be aware that the binary produced by this process (usually it will be called "netscape.new") MUST be the same number of bytes long as the original.

This script comes with no guarantees. It's working for me, and I've made it as friendly as seems necessary. Good luck.

--
Andy


ATAPI Zip drives under Linux

Date: Tue, 2 Mar 1999 14:31:51 -0800 (PST)
From: Nicolas Pujet, [email protected]

I just read a good article on using internal ATAPI Zip drives under Linux at ../issue28/lg_tips28.html#atapi However I would like to suggest a simplified procedure for beginning Linux users. This procedure does not deal with SCSI at all.

|-----------------------------------------------|
| A simple setup procedure for ATAPI Zip drives |
|-----------------------------------------------|
Step 1: figure out the device name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Run dmesg and look for a block of lines looking like this:

 
hda: ST34342A, 4103MB w/0kB Cache, CHS=523/255/63
hdc: Pioneer CD-ROM ATAPI Model DR-A24X 0105, ATAPI CDROM drive
hdd: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
Here the Zip drive has become hdd. Since DOS formatted Zip disks use partition 4, the device name will be /dev/hdd4

Step 2: set up mounting
^^^^^^^^^^^^^^^^^^^^^^^
Login as root, make a directory /zip and allow users to mount DOS formatted Zip disks by adding the following line to the /etc/fstab file:

 
/dev/hdd4           /zip              vfat   noauto,user  0 0
Reboot to make these changes effective.

You are now ready to use Zip disks !
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any user can now put a Zip disk in the drive and mount it by typing:

 
mount /zip
which makes the contents of the disk available in the directory /zip .

When the user is done with the Zip disk, he should unmount it:

 
umount /zip
Now the "eject" button on the drive can be used to eject the disk.

Notes: -----

Cheers,

--
Nicolas Pujet


Booting off SCSI

Date: Mon, 8 Mar 1999 18:10:21 -0500 (EST)
From: Greg Romaniak [email protected]

Regarding the recent $.02 tips on booting off a SCSI drive with IDE drives also installed -- I used a quick-and-dirty solution that worked for me -- but no guarantees. Simply don't define the IDE drives in the CMOS. This way, the system doesn't "see" them on boot and the SCSI BIOS take over as if there were no IDE drives. Once Linux starts booting off the SCSI drive, the IDE drivers in the kernel will do their own probe for IDE devices and find the IDE drives.

--
Greg


what is my dialup (ppp) IP number?

Date: Wed, 10 Mar 1999 21:12:44 +0000
From: Matt Willis, [email protected]

Okay. This drove me nuts for a while. Here's a succinct perl script to give you the current ppp IP address. This can come in handy for assigning DISPLAY variables for remote X events, etc. It saves the current IP in ~/.myip

 
#!/usr/bin/perl 
open(IFCONFIG,"/sbin/ifconfig|") || die "Can't open /sbin/ifconfig!\n";
while (<IFCONFIG>) { last if (/^ppp0/); }
$_ =<IFCONFIG>;
($inet,$ptp,$mask) = /.*:([\d\.]*) *.*:([\d\.]*) *.*:([\d\.]*)/;
close(IFCONFIG);
open(MYIP,">$ENV{HOME}/.myip");
print MYIP "$inet \n";
close(MYIP);
nb - I did this using kernel 2.2.3 and the success of the script may depend on what the ipconfig output looks like. For me, it looks like this:
 
ppp0      Link encap:Point-to-Point Protocol  
     inet addr:139.186.224.88  P-t-P:139.186.0.50 Mask:255.255.255.255
If yours is different, you may require tweaking. If there is no ppp0 then .myip gets written over with a blank.

--
Matthew Willis


Common POP3 Error

Date: Sat, 27 Mar 1999 21:57:17 +0000
From: Carlos Sousa, [email protected]

There is a common error that occurs when downloading mail for a local machine through POP3.
Sometimes when downloading mail we receive the following error message from the POP3 server:

being read already: /usr/spool/mail/XXXXXXX

where XXXXXXX is the login for the account.

This occurs because the client is interrupted while performing any task on the pop3 server or failed to send the quit command to the pop3 server, causing the lock file from that pop3 account to stay there, causing the occurence of the error message in future attempts to retrieve mail.

The problem can be solved deleting the following file in the pop3 server:

    /usr/tmp/.pop/XXXXXXXX
 

You may think that this article is pure loss of disk space, but believe, 3 network admins at my university were unable to solve the problem.

--
Carlos


Spell checking a single word...1

Date: Tue, 02 Mar 1999 22:37:27 -0600
From: "Ken V. Broezell", [email protected]

Hi Ben. I just read your 2 cent tip in the March Linux Gazette. Did you realize that ispell can already be used to check a single word as follws:

echo ticckle | ispell -a
@(#) International Ispell Version 3.1.20 10/10/95
& ticckle 1 0: tickle
In the above example ticckle was found to be misspelled and tickle was suggested as the correct spelling.

I execute this not as an alias but as a 1 line shell script:

cat /usr/local/bin/ws
echo $1 | ispell -a
--
Ken


Re: Spell checking a single word...2

Date: Wed, 3 Mar 1999 22:08:57 -0500 (EST)
From: "Ben 'The Con Man' Kahn", [email protected]

To: "Ken V. Broezell":
Yep! I knew that. Actually, my tip was in reply to someone who posted just that piece of information. I don't like that output. Under my solution, nothing extra is shown if the word is spelled correctly. If the word is spelled wrong, you get a curses based interface which lets you select the correct word or try to spell it right. I find it removes most of the guess work.

--
Benjamin Kahn


Re: Spell checking a single word...3

Date: Tue, 16 Mar 1999 20:19:27 -0700 (MST)
From: Michal Jaegermann, [email protected]

In "2c Tips" Benjamin Kahn presents an eye popping tcsh macro and writes: "I have no idea how to do this in bash". The answer is "simpler and more general". Try this (may go into your .bashrc):

spell () { echo $@ | ispell -a | sed -n -e '/^\&/p' -e '/^\#/p';}
and type spell tihs is a tset. You will see on your screen:
& tihs 6 0: this, ties, Tims, tins, tips, tits
& tset 2 10: set, test
Numbers like "2 10" mean that there are two replacement propositions and that a "bad" word starts after ten characters of your input. '#' character above is reserved for words ispell knows nothing about whatsoever. Translating that to tcsh is left as an exercise for a reader. :-)

Michal


Re: Spell checking a single word...4

Date: Tue, 16 Mar 1999 22:42:11 -0500 (EST)
From: "Ben 'The Con Man' Kahn", [email protected]

Michal:
That's correct -- this script will work to spell check a word, phrase, paragraph, etc. However, under my solution, nothing extra is shown if the word is spelled correctly. If the word is spelled wrong, you get a curses based interface which lets you select the correct word or try to spell it right. I find it removes most of the guess work.

--
Benjamin Kahn


Spell checking a single word...5

Date: Fri, 12 Mar 1999 16:41:04 -0600 (CST)
From: "Michael P. Plezbert", [email protected]

There's a much easier way to do this, using the -a option to ispell:

echo 'wordyouwanttocheck' | ispell -a
--
Michael


Spell checking a single word...6

Date: Fri, 05 Mar 1999 15:03:47 +0100
From: Dennis van Dok, [email protected]

Gazette march 1999 contained a tip for checking a single word with ispell from the command line. This is a shorter solution:

echo frobnicate | ispell -a
regards,

--
Dennis van Dok


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


ANSWER: Linux Download

Date: Wed, 3 Mar 1999 09:09:40 +0100
From: Ian Carr-de Avelon, [email protected]
Status: RO

N.B. English at end

Beste Jaap,
Ik neem aan dat jij een typierende nederlander bent en geen probleem met een aantword in het engels hebt. Ben ik hier verkeerde, neem even contact voor een vertaaling.

From: "Jaap Wolters", [email protected]:
Ik heb geprobeert jullie programma "LINUX" te downloaden, maar ik krijg geen toegang. hoe zou het toch kunnen? Op de t.v werd verteld dat het programma beter is dan Windows 98, Minder fouten en minder vastlopers. Is het programma windows compatible zodat ik mijn oude windows spellen kan doorspelen. Ik heb ZEER veel belang bij dit programma, maar aangezien me het niet lukt om het te downloaden zou ik graag uw advies willen.
QUESTION
========
I can't access Linux for download. Will it run my old Windows games? What do you suggest I do as I can't download.

ANSWER
======
If you can't easily down load Linux, your best is to get Linux on a CD-ROM. The CD is likely to come free with a book on Linux, maybe there is one in your local library, or a Linux magazine. To run programs writen for Microsoft Windows under Linux's "X" windows, you will need the emulator WINE. As WINE is an emulator, it tends to run programs a little slower than '98 and can't handle tricks which some programers include in their programs. I run MS Word with WINE with no problems, but arcade games need speed and use tricks, so you may have to get some nice new Linux games to go with your system.

--
Ian


ANSWER: We do not relay...1

Date: Mon, 8 Mar 1999 18:18:34 -0500
From: Ayman Haidar, [email protected]

I hope you solved your problem by now, but in case if you haven't.. I just had the same problem, and after a long search all over the internet I finlly gave up and dumped sendmail for qmail, it's extremely easy to install and run. Maybe you should give it a try.

--
Ayman Haidar


ANSWER: Re: We do not relay...2

Date: Sun, 14 Mar 1999 18:55:13 +0000
From: Jeremy Page, [email protected]

I don't know whether this may help you, but I also had the same problem recently. For me the problem occurred when my mail client (in this case Pine) had the setting SMTP server = localhost. When I changed it to the actual hostname the error stopped. Just don't ask me why - someone else will probably tell you that.

--
Jeremy Page


ANSWER: Re: We do not relay...3

Date: Sun, 07 Mar 1999 15:45:46 +0000
From: "Jimmy O'Regan", [email protected]

Regarding "We do not relay":

In /etc/mail you should find files called ip_allow and name_allow To allow your machine to be used to send mail, simply place either IP addresses (ip_allow) or domain names (name_allow) into these files.

For all machine in a domain, just type in the domain, eg: lit.ie for a subnet, use blanks in the place of wildcards, eg. 172.16 172.17.100

--
Jim


ANSWER: RE: Multiple booting (LG #38)

Date: Mon, 08 Mar 1999 20:33:46 +0900
From: Matt Gushee, [email protected]
Richard Veldwijk writes:
As I've got kids and kids tend to play games, I have to have Micro$oft products on my machine. As I use OS/2 and Linux myself, here's a nice tip: Install OS/2's boot manager. If you have OS/2 installation floppies, you can run an OS/2 FDISK and install the boot manager, even without installing OS/2 itself.
As a former OS/2 user, I can confirm that OS/2 is Good Stuff (TM) ... and the above method may be the easiest way to set up dual booting (and I think you have to use it if you boot OS/2) On the other hand, LILO can do pretty much the same things, and doesn't have this drawback:
Only the last booted C-partition is visible. If you need to access the other, you'll have to hide one and unhide the other.
Versions of LILO >= 20 allow you to have partitions automatically "hidden" or "unhidden" at boot time -- but unlike OS/2's boot manager, the "hiding" doesn't affect access from Linux. You do it with an entry something like this in /etc/lilo.conf
win95 = /dev/hda1
  ..........
  change
     partition = /dev/hda2
        deactivate
     partition = /dev/hda1
        activate
*Something* like that. I've done it, but it was a couple of years ago, so I may have forgotten some details. For more info, check the LILO User's Guide (not the man page -- it's a big document probably in PostScript).

Happy booting!

--
Matt Gushee


ANSWER: Re: Linux & Win95/98/NT clients

Date: Sun, 07 Mar 1999 16:20:14 +0000
From: "Jimmy O'Regan", [email protected]

There are two things you can do to use Linux as an image server.

Attach the hard drive you want to use as an image to your linux box, and use something like this: (reverse procedure for making a boot flopy) dd if=/dev/hdb1 of=/path/to/disk.image bs=1024 conv=sync; sync You'll have to find out the right byte size (bs) though, the 1024 is just a guess:) This will create an image of the disk on the machine in /path/to/ called disk.image Linux can read and write FAT16 and FAT32 partitions, but it can't write NTFS (yet). You'll need a commercial DOS tool like Ghost (http://www.ghost.com) for NTFS.

To recreate the image, boot with a linux boot floppy (with dd), and run mkdosfs on the hard drive (I'm not sure if that's necessary, but I doubt it can hurt) then the same dd command with the if and of parameters swapped.

The other option, which will be required for NTFS, is to set up Samba on the Linux box, and use a bootable DOS floppy and ghost.to read and write the images. Ghost comes with documentation, and is easy to use.

--
Jim


ANSWER: Word to Postscript...1

Date: Sun, 07 Mar 1999 15:56:31 +0000
From: "Jimmy O'Regan", [email protected]

I'm pretty sure you mean that you want to convert the word documents to postscript on your Linux box, but I don't think there's a way of doing it yet. The closest there is to it is MS Word View (http://www.csn.ul.ie/~caolan/docs/MSWordView.html) which converts Word 8 to HTML.

This is how you do it on the windows machine: In Control panel, select Printers, Add Printer, Click Next, select a postscript compatible printer from the list (try Oki OL-850/PS), select File: as the port to attach it to, name it, and select 'no' for "Make default printer". You should be prompted for a file name when you print. It works for me.

--
Jim


ANSWER: Word to Postscript...2

Date: Tue, 2 Mar 1999 13:33:31 -0500 (EST) From: Padraic Renaghan, [email protected]
JX: From time to time, people e-mail me documents in Microsoft Word format. Do you know where I can find an utility to convert the MS Words documents into Postscript format so that I can view/print them in Linux?
I don't know of anything to convert MS Word to Postscript, but I do know of a utility to convert MS Word 8 (Office 97) to HTML which can then be read by a web browser and printed.

http://www.csn.ul.ie/~caolan/docs/MSWordView.html

--
Padraic Renaghan


ANSWER: Word to Postscript...3

Date: Wed, 10 Mar 1999 09:53:35 +0500 (PKT)
From: Shahbaz Javeed, [email protected]

Greetings. I have found the program mswordview to be almost indispensable. It doesnt convert Word97 documents to PS, but it converts them to HTML, which comes a close second. An alternative would be to use StarOffice 5.0 (you can get a personal edition for free at http://www.stardivision.com) which can read and write to all Office97 file formats.

Hope this helps.

--
SJ


ANSWER: RE: Korn Shell FAQ...1

Date: Tue, 2 Mar 1999 13:30:09 -0500 (EST)
From: Padraic Renaghan, [email protected]
JT: I'm looking for a good Korn Shell FAQ, because I dislike reading the Manpages. Does anyone know a good Internet Address of a FAQ?
I have found the SHELLdorado site to be very helpful. I has good shell tips and a great list of other shell resources. http://www.oase-shareware.org/shell/

As for learning the korn shell (I am not sure that is what you are doing, but regardless), I purchased the following book which is EXCELLENT! I highly recommend it. http://www.amazon.com/exec/obidos/ASIN/0134514947/

--
Padraic Renaghan


ANSWER: Korn Shell FAQ...2

Date: Wed, 3 Mar 1999 16:04:30 +0100 (CET)
From: Arne Knut Roev, [email protected]

You wrote:

I'm looking for a good Korn Shell FAQ, because I dislike reading the Manpages. Does anyone know a good Internet Address of a FAQ?

Now, I am going to tell you a secret:

FAQ-files _supplement_ the documentation, they do _not_ _replace_ it. So, you should get into the habit of using man/info pages, since they are the places where you can find the formal documentation you sometimes need.

However, FAQ-files and HOWTOs _do_ have their uses, so they are by no means useless.

And in any case, when you are looking for this kind of stuff (relating to Linux documentation), you look for the "Linux Documentation Project" (short: LDP). The www-adress I have for this, is: "http://www.linuxresources.com/LDP" (I am putting it this way, because I am not sure whether this is the address of the main site, or of a mirror.)

NB: I am cc'ing this letter to the www-based Linux Gazette, in case they want to publish this info. (After all, I _am_ replying to a letter published there.)

Arne


ANSWER: Re: Help wanted -- article ideas

Date: Tue, 02 Mar 1999 10:53:36 -0300
From: Andre Correa, [email protected]

Re: Kristoffer Andersson
I had problens that I think are same as yours. Here in our office I have am internal network with 192.168.x.x IP addresses masqueraded to the net throught a Linux box with 2.1.x kernel and everything goes fine but I needed to let outside users see our Intranet. I searched and found a program called rinetd that makes redirection of requests so any request coming to our masq box in port 80, for example, is redirected to 192.168.3.21 in port 80 and then everyone in the Internet can see our pages using our masq box IP address. It works fine for a while now.

from the man rinetd we have:

RINETD(8)                UNIX System Manager's Manual                RINETD(8)

NAME
     rinetd - internet ``redirection server''

SYNOPSIS
     /usr/sbin/rinetd

VERSION
     Version 0.52, 9/7/1998.

DESCRIPTION
     rinetd redirects TCP connections from one IP address and port to another.
     rinetd is a single-process server which handles any number of connections
     to the address/port pairs specified in the file /etc/rinetd.conf.  Since
     rinetd runs as a single process using nonblocking I/O, it is able to
     redirect a large number of connections without a severe impact on the ma-
     chine. This makes it practical to run TCP services on machines inside an
     IP masquerading firewall. rinetd does not redirect FTP, because FTP re-
     quires more than one socket.
You can find at sunsite.unc.edu

good luck

--
Andre Correa, Sao Paulo/Brazil


ANSWER: FW: Linux Gazette #37 question

Date: Tue, 23 Mar 1999 11:29:05 -0600
From: "McKown, John", [email protected]

[email protected]: You asked if there is some way to view MS Word files under Linux. Have you tried mswordview? You can download it from http://metalab.unc.edu/pub/Linux/apps/www/converters or ftp://metalab.unc.edu/pub/Linux/apps/www/converters/mswordview-0.5.1.tar.gz
I'm sending this from work, so I'm forced to use MS Outlook to send it. I hope you can read it OK. I have not tried using this, so I don't know how good it is. the .lsm file says that it works with MS Word 97.

--
John McKown


ANSWER: Re: Making a Red Hat 5.2 CD

Date: Sat, 13 Mar 1999 20:03:50 -0200 (GMT+2)
From: BenettOr, [email protected]

Yeah, this is a common problem when users trying to install RedHat by donwloading the disksets from the net.

In order to install RedHat 5.0+, downloaded from a site or ftp you have to burn (copy) it on a cd in the following directory:

\RedHat\

"R" and "H" in uppercase mode. This means that you have to cd-copy it on Microsoft Extension mode (lower and upper case support) and not in ISO9660. Down that directory copy the disksets directories: A, A1.. etc. etc.

Then start the installation running the batch file included on the distribution.

--
BenettOr


ANSWER: 2 cent correction

Date: Fri, 26 Mar 1999 11:47:43 -0800
From: Ben Kosse, [email protected]

The Ensoniq AudioPCI actually has the necessary circuitry to do hardware MIDI, it simply lacks the onboard RAM, using instead your system RAM to hold the samples.

--
Ben Kosse


ANSWER: Etherexpress NIC

Date: Thu, 25 Mar 1999 09:44:27 -0300
From: "Sergio Pires", [email protected]

Mr Lim:
I read your mail in LG and the only thing I saw is you are using irq 7 normally assigned to the parallel port. Try to choose another irq # (5, for example) and it will work.

--
Sergio Pires


Published in Linux Gazette Issue 39, April 1999


[ TABLE OF 
CONTENTS ] [ FRONT PAGE ]  Back  Next


This page maintained by the Editor of Linux Gazette, [email protected]
Copyright © 1999 Specialized Systems Consultants, Inc.