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


More 2¢ Tips!


Send Linux Tips and Tricks to gazette@ssc.com


New Tips:

Answers to Mail Bag Questions:


Netscape for Linux trick

Date: Wed, 24 Mar 1999 01:25:12 +0000
From: andy deck, andy.deck@nyu.edu

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, npujet@yahoo.com

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 greg@snoopy.gwr.com

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, matt@optimus.cee.cornell.edu

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, majestik@mail.telepac.pt

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", broezell@cig.mot.com

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", xkahn@cybersites.com

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, michal@ellpspace.math.ualberta.ca

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", xkahn@cybersites.com

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", plezbert@cs.wustl.edu

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, dvandok@wins.uva.nl

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, ian@emit.pl
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", woltersj@hotmail.com:
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, haidar@usol.com

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, jpage@cwcom.net

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", Jim.Regan@lit.ie

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, matt@it.osha.sut.ac.jp
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.conftcsh 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", xkahn@cybersites.com

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", plezbert@cs.wustl.edu

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, dvandok@wins.uva.nl

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, ian@emit.pl
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", woltersj@hotmail.com:
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, haidar@usol.com

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, jpage@cwcom.net

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", Jim.Regan@lit.ie

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, matt@it.osha.sut.ac.jp
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.conftcsh 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", xkahn@cybersites.com

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", plezbert@cs.wustl.edu

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, dvandok@wins.uva.nl

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, ian@emit.pl
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", woltersj@hotmail.com:
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