"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:

IP address in Linux Gazette

Date: Wed, 5 May 1999 08:39:07 -0400
From: "F. D. Jones", mrj@magicnet.net

FYI, the current implementaion of pppd automatically runs the script /etc/ppp/ip-up when the ppp connetion is established. One of the variables created in the script is $IPLOCAL which is your assigned ip address. No perl or awk required, and it's reliable because it's reported by the daemon handling your ppp! There are a few other conditional scripts invoked by pppd, also. Check them out.

From the man page for pppd:

SCRIPTS Pppd invokes scripts at various stages in its processing which can be used to perform site-specific ancillary processing. These scripts are usually shell scripts, but could be executable code files instead. Pppd does not wait for the scripts to finish. The scripts are executed as root (with the real and effective user-id set to 0), so that they can do things such as update routing tables or run privileged daemons. Be careful that the contents of these scripts do not compromise your system's security. Pppd runs the scripts with standard input, output and error redirected to /dev/null, and with an environment that is empty except for some environment variables that give information about the link. The environment variables that pppd sets are:

DEVICE The name of the serial tty device being used.

IFNAME The name of the network interface being used.

IPLOCAL The IP address for the local end of the link. This is only set when IPCP has come up.

IPREMOTE The IP address for the remote end of the link. This is only set when IPCP has come up.

PEERNAME The authenticated name of the peer. This is only set if the peer authenticates itself.

SPEED The baud rate of the tty device.

UID The real user-id of the user who invoked pppd.

Pppd invokes the following scripts, if they exist. It is not an error if they don't exist.

root Password

Date: Wed, 05 May 1999 23:40:19 -0400
From: David Bestor, dab@indenial.com

Forgot root password?
Sendmail hangs on boot?
That new startup script locks up your system..

Instead of breaking into your system just boot up into single user mode.

At the lilo prompt just type: linux -s


LILO:linux -s 
This will boot up into single user mode and it doesnt even ask for a password...

Much easier than trying to break in..



Shutting Up Yer Modem

Date: Thu, 06 May 1999 06:54:30 PDT primes@hotmail.com

This shuts up or quietens noisy modems during dialup. recall the following AT commands.

controls speaker volume:

operates speaker:

you now have to modify the expect-send pairs in your chat script. note that the above commands should be prefixed by AT. the following chat script turns off the modem speaker.

/usr/sbin/chat                                     \
   ABORT           '\nBUSY\r'                      \
   ABORT           '\nNO ANSWER\r'                 \
   ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
   ''              ATZ                             \
   'OK'            ATM0                            \
   'OK'            ATDT1234567                     \
   CONNECT         ''                              \
   ogin:--ogin:    mylogin                         \
   assword?        mypassword
after specifying the ABORT strings, the sequence will first expect nothing; and then send the string ATZ to reset the modem. the expected response to this is the string OK, after which the string of ATM0 is sent to turn off the modem speaker. when it receives OK, the phone number 1234567 is dialed out, after which the login procedure begins.

to vary the speaker's volume, just suitably modify the expect-send pairs before the ATDT command, eg. replacing ATM0 by ATL0 uses low volume for the speaker.


PPP IP address

Date: Tue, 11 May 1999 10:53:27 -0400
From: Robert Jones, rjones@chaotika.net

In response to the recent couple tips about finding the IP address of a PPP interface, I offer the following script, which will tell you the IP address of any properly configured network interface on your system.


if [ -z $1 ]; then
    echo "You must specify a network interface."
elif [ -z "`grep $1: /proc/net/dev`" ]; then
    echo "Interface '$1' does not exist on this system."
        IPADDR=`ifconfig $1 | grep inet | cut -d: -f2 | cut -d\  -f1`
        echo "The IP address for $1 is $IPADDR."

IP adress from ifconfig

Date: Wed, 12 May 1999 00:43:31 +0100 (GMT+0100)
From: Magnus & Tina, magnus@gol.com

I couldn't resist. Why use perl or awk?

Here is another one of those "How to get an IP adress from pppd" tips. In this specific case for the gateway. It needs to be changed depending on the printout format of ifconfig though.

ifconfig | fgrep P-t-P | cut -c42-56 > /tmp/gw_ip


Date: Sun, 16 May 1999 10:40:34 -0600 From: "Joey Stanford", rescue@telebot.net

Just wanted to let you know that, contrary to the lists circulationg around, ASKEY V1433VQH-X modems are Linux Compatable! You have to disable PNP and set it up as COM3 (their terms) and IRQ4. Took me almost a week to figure that out. =3D) Thought it would be helpful to others!


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

ANSWER: Re: [SLL] Basic Question: Gnome Panel?

Date: Tue, 25 May 1999 21:53:30 -0700
From: Michael Leary, leary@nwlink.com

My thanks to Bradley Willson. For anyone else, here's what was wrong:

my .xinitrc was:

exec /usr/bin/enlightenment
as per the enlightenment docs (I think?), anyway, when it should have been:
exec gnome-session
as per the gnome FAQ on gnome.org. This works great now, and all is well.


ANSWER: tar.gz on Windows, ZIP on Linux--1

Date: Mon, 03 May 1999 00:52:17 +0000
From: Heather Stern, star@starshine.org

I'll try to keep this short enough to stay at the Two Cent Tips level :)

'zip and 'unzip' are the Linux tools to deal with .ZIP files. According to the man page, it's been around since 1990, so it predates Linux itself by several years, it exists on other UNIX and UNIX-like systems too. (And it's been ported to MSwin - see http://www.itribe.net/virtunix/ for an unzipper that handles long names and fixes line ends.)

At any rate, I can see your point -- MSwin users are used to finding apps and documentation wrapped in .ZIP files, but true newvies don't know what a .TGZ is, and assume it's useless to them.

It's not. tough! WinZIP (http://www.winzip.com/) handles tar-gzipped files with no hassle whatsoever. I have two laptops, one w95 and one Linux - and with these two utilities I really don't have to think about file formats when I toss archives back and forth.


ANSWER: Linux Gazette Format--2

Date: Mon, 3 May 1999 19:54:46 -0700
From: "Nichole Murphy", Nichole-Murphy@worldnet.att.net

You can Download the text or HTML files and untar them with WinZip. Winzip will tell you that the tar.gz files contain a compressed file and ask if you would like to uncompress the second file. Chose "yes" then read the files with any program you want.


ANSWER: Reading Linux Files from Win95--3

Date: Mon, 03 May 1999 22:10:53 -0400
From: Peter Inskeep, pinskeep@iglou.com

I know of at least one program that will read Linux files from your Windows 95 operating system. It is called "explore2fs.exe." It is about 486K long, and is self contained, if I recall correctly. I know it is a long note, but I have copied the author's Readme.txt file below. The author, John Newbigin, is from Australia. The program opens an explorer like window showing your Linux file systems, ie., /dev/hda5, /dev/hdb6, or whatever. You can read most files, if I recall correctly. I also use a program called Windows Commander, by Deiter Prissing, I believe, in Germany. It may be that program that enables me to read individual files, but it is John's program that makes it possible to read and scan the Linux file systems.


ANSWER: a.out binaries not working--1

Date: Mon, 03 May 1999 21:59:04 -0400
From: Peter Inskeep, pinskeep@iglou.com

Try running the a.out binary with the command line: ./a.out I recently installed RedHat 5.2 and found that its $PATH statement does not include a path of " ./: " ./ is the path of the current directory that you are in. Remarkably, RedHat does not set up paths so that your current path is looked at to execute a file.


ANSWER: Re: Linux partitions from Windows--1

Date: Mon, 3 May 1999 23:44:59 +0200 (CEST)
From: rsmith@xs4all.nl

You can read (but not write) ext2 filesystems ubder Windows with the FSDEXT2 driver. See http://www.yipton.demon.co.uk/


ANSWER: Re: a.out binaries not working--2

Date: Mon, 3 May 1999 23:32:30 +0200 (CEST)
From: rsmith@xs4all.nl

You should probably install a different C development package. Most distributions have two available: one for a.out and one for ELF binaries. Install the package that makes ELF binaries.

If you want to run the a.out binaries, you have to have support for that in the kernel. Either compiled in or as a module (binfmt_aout).


ANSWER: Re: FTP access methods

Date: Mon, 3 May 1999 23:27:08 +0200 (CEST)
From: rsmith@xs4all.nl

Regarding your question about mounting FTP sites...

I do not think you can mount an ftp site directly.

But you might want to check if the FTP site also supports NFS (Network File System) access. That should do what you want.

If you just want to synchronize a remote with a local directory, rsync might be a better choice.

Hope this helps,


ANSWER: Windows NT and Linux hate each other?

Date: Tue, 11 May 1999 06:49:10 -0500
From: "Daniel J. Bodony", bodony@purdue.edu

Dear Pepijn,

Just recently, my roomate and I installed RH5.2 and NT/4.0 on the same machine and had a problem very similar to the one you describe.  The network card used was a 3C509b that had been in an 486 running RH5.0 and was known to work.  In the new machine, NT/4.0 could see and use the network card fine but RH5.2 could not.  More specifically, RH5.2 could find the network card but could not initialize it and Tx/Rx packets.  The answer turned out be that NT/4.0 would Reset and Change the card's IO port and interupt values to a different set of numbers each time the computer was rebooted so that the card was on a different IO/IRQ each time RH5.2 started.   Perhaps Win95 is doing something similar.

The fix was to force NT/4.0 to choose one and only one IO/IRQ combination.  Then all worked fine.


ANSWER: Re: Linux partitions from Windows--2

Date: Tue, 4 May 1999 19:42:35 +0200 (CEST)
From: Der Guru, frank@di-net.de

I use fsdext2. It gives you read access to your Linux partitions. You can find the URL at freshmeat. Regards

Frank Maloschytzki

ANSWER: Problems running your a.out executable--3

Date: Thu, 6 May 1999 16:38:27 +0100
From: "D.McMurray", d.mcmurray@dccl.net

This sounds to me like a very common mistake with newcomers to this type = of operating system, especially those with a DOS/Windows background. I = am assuming you are merely typing:

at the command prompt, which in DOS would normally execute the program. = You may find that the mishap is due to the path enviroment variable, = Which usually has the current directory '.' added by default in DOS but = not so in Linux, well RedHat in particular, I cannot speak for the other = distributions.

When you type 'a.out' the directories in your path variable are = searched, if the file a.out is not found you will receive an error = message along the lines of 'command not found' or similar. Try = specifying the location of the executable, assuming you are in the = directory containing the file try typing:

This specifies that the file can be found in the current directory. If = this works you can save having to type the './' each time by adding the = directory '.' to your user profiles path enviroment.

Hope this helps, regards,

David McMurray

ANSWER: Linux Partitions on Windows--3

Date: Sat, 8 May 1999 17:39:32 +0200 (CEST)
From: Torben Dam Jensen, tdj@hco.kol.ou.dk
I got a question for ya... is there a driver or application I can use to get at least read access to my Linux partitions from Windows? Thanks,

Yep !



http://www.diskwarez.com/other/ext2tool.zip http://www.diskwarez.com/other/ext2tool.txt (for a description)

Above links should get you going...


ANSWER: Need help on Internet connection with Linux

Date: Sat, 08 May 1999 12:17:37 -0400
From: Laurin Killian, lek@uconect.net
First I used kppp (script based)
You sure you want script based? I don't think you do. I went to the homepage for what appears to be your internet provider (http://www.asiaaccess.net.th/), and I see no mention of the logins requiring a script. Try "PAP" under kppp - it stands for Password Authentication Protocol. Since you're using kppp this should be easy to set up.

Might as well go all the way since I'm trying to help: When you create a new account under kppp, all you should need to fill in is:

(Dial Tab):
	Connection Name and Phone Number
	Authentication:		 PAP!
(DNS Tab):
	Primary and secondary DNS #'s from ISP.
It is advisable to backup/delete ppp.options (as you originally did), since kppp generates its own options (but may get confused if you added conflicting options in that file).

It looks like AsiaAccess does have an option for a script, but using PAP is easier and supposedly faster

Let me know if this works.


ANSWER: Re: Linux Gazette Format--4

Date: Sun, 9 May 1999 13:57:00 -0600 (MDT)
From: Michal Jaegermann, michal@ellpspace.math.ualberta.ca

this is a comment to a complaint in Mail Bag, LG#41, from jcclemen@SHERWIN.RMC.com that LG is not available in a format accessible to Windows user and your response to that.

Even under 'doze there are tools available which handle .tar.gz files. WinZip, for example, has even pointy-clicky interface and accepts many different formats beyond zip; tar.gz is one of these.


ANSWER: Network boot disk for i386 without hd

Date: Wed, 12 May 1999 17:41:31 +0200
From: BROWN Nick, Nick.BROWN@coe.int

Several distributions exist for floppy-only machines. Check out mulinux or tomsrtbt (http://www.toms.net/rb/).


ANSWER: Subject: Linux partitions from Windows--4

Date: Wed, 12 May 1999 17:43:12 +0200
From: BROWN Nick, Nick.BROWN@coe.int

Check out e2fs at http://uranus.it.swin.edu.au/~jn/linux/


ANSWER: Linux partitions from Windows--6

Date: Fri, 14 May 1999 14:27:36 +0200
From: Hadess, hadess@infonie.fr

Try-out Fsdext2 that you can grab at http://www.yipton.demon.co.uk/ It's only a read-only driver, but would you want to break your linux drive, hum ? Ciao --

ANSWER: FTP access methods...

Date: Fri, 14 May 1999 14:34:36 +0200
From: Hadess, hadess@infonie.fr

If you want to have Unix-like access on a remote machine, you'd better use NFS. It's not possible to mount FTP shares (if it's, mail-me =).

Your Windows apps were only hiding you the whole FTP thingy. They did the same thing KFM does: show folders _as if_ they were local, no more.

NFS is in stock distro now and 2.2.x NFS performances are rather good, but worse than FTP of course. Compile a new kernel for your rescue disk w/ NFS included. Ciao


ANSWER: a.out--4

Date: Fri, 14 May 1999 14:50:33 -0400
From: Help Desk, help-desk@utc.edu

>Is your current directory in your PATH? If not try ./a.out to execute. You can get a more meaningful name w/ gcc -o myprogram myprogram.c. This gives the executable the name myprogram. To set the path edit your bash_profile and add '.' w/o the quotes to the path statement. Similiarly, for other shells.

Charles Baker

ANSWER: Re: Linux Gazette Format--6

Date: Sun, 16 May 1999 04:30:55 +0200
From: "Anthony E. Greene", agreene@pobox.com

In Linux Gazette #41, you wrote:

Many of us have and use Linux, but are still bound by the need to standardize in the corporate world to the Windows environment. As a Linux newbie, I still do not have a high speed modem bought and installed on my Linux box at home so have no way to get the tar, etc formats, and, of course, many of us have a higher speed lines at work. Is there a way to download the file in a format that can be unzipped, etc. on a Windows workstation then print out? Also, a format easily read by Windows machines would make publicizing the Linux system possible to others now using Windows. For example, our local PCC users club(Coastal Areas PC Users Group, www.caug-pc.org http://www.caug-pc.org) has a web site. I guess what I'm saying, is if we only publish Linux documents in formats that Linux users and/or Linux gurus can use, how do we grow the user base?
There are many native Win95/98 freeware and shareware compression utilities listed at Winfiles:



ANSWER: The PPP problem, followup.

Date: Sun, 16 May 1999 10:19:15 +0700
From: Ruangvith Tantibhaedhyangkul, ruangvith@linuxfan.com

To all generous "Linuxians",

I've solved my problem about Internet connection with Linux, as I called for help in Linux Gazette. After that, tens of suggestions have come from almost all parts of the world. I've tried almost all as well. One of these sent me to the right solution. It was from document "How to Hook up PPP in Linux" by W.G. Unruh, recommended to me by Jerry Boyd. Thanks for all your kindness.

The best of this is not the solution itself, but the way it comes, such generosity which has been bringing about this wonderful OS. It's a true Linux way!


ANSWER: Re: ANSWER: Word to PostScript

Date: Sun, 16 May 1999 10:27:23 -0700
From: Mike Berkley, Mike.Berkley@ec.gc.ca

From: "Asle Aursand", asle@sentinel.no
It is possible to print to file. The resulting *.prn file is really a Postscript file, at least if you are using a postscript printer. Anyway, this *.prn file you can import into Ghostview.

I read your tip, Asle, and there is one problem with it. Some Microsoft printer drivers do not yield legal Postscript documents when printing to a file.

I have experienced the following two misfeatures:

1. HP Postscript drivers add a single line of HP printer codes to the top of the file, to force the printer to use Postscript mode. Since the first line of the file no longer begins with %!PS, Ghostscript and non-HP printers will give an error and refuse to display the file. You have to hand edit the file to get real Postscript.

2. Some NT print drivers mix up a few of the %Page comments, so that Ghostview cannot digest the file. Ghostscript can indeed display the Postscript, but Ghostview cannot be used.

Mike Berkley

ANSWER: Uninstalling Software

Date: Tue, 18 May 1999 17:54:01 +0000
From: Tom Walsh, tom@mytoys.com

You can uninstall a binary distribution of software that was unpacked from a tarball by using: "tar ztf some-name.tgz | xargs -ikillit echo ' rm -f killit' | /bin/sh". Try the command without using the final pipe into the shell to see what the resulting list of commands will be to the shell. BTW, I use this technique a lot to reduce the tedium of repetitious operations on files/directories.



Date: Wed, 19 May 1999 22:38:45 -0500
From: "Charles W. Powell MD", cwpowell@kuhub.cc.ukans.edu

Slackware (and other distributions, I suppose) has a "rescue disk" that becomes the "root disk" of the boot-root floppy disk pair. If one uses the "boot" floppy called 'net.i' and the "root" disk called 'rescue.gz' one finds a highly funtional system at hand. Using this pair I recently initialized the network card (an Intel EtherExpress Pro) when the standard kernel failed at the task. Using the 'ifconfig' and 'route' commands I put the machine on my network in minutes.

Just about any site that handles various distributions will have this disk set available. Create the floppies using:

	dd if=/path/to/boot/or/root/image of=/dev/fd0
under Linux, or with 'rawrite.exe' under DOS.

Network initialization is accomplished with the following commands:

	ifconfig eth0 192.168.x.y
	route add -net 192.168.x.0
or with appropriate addresses for your network. I hope this helps.


ANSWER: 3COM cards

Date: Mon, 24 May 1999 14:25:33 +0100
From: Wood Alan, WOOD_A@admiral.co.uk
I've installed Linux Red Hat 5.2 on my friend's computer, and now for some extremely odd reason the Red Hat machine and the NT Server 4.0 that's on his other machine can't see each other over the network. At all. They don't even respond to each other's ARP requests. The link is alive (judging from the lights on his switching hub), and the machines can see each other fine when he runs Windows 95 on the machine where I've installed Red Hat. TCP/IP is installed and configured correctly on both machines. The Red Hat machine has a 10 Mbps 3COM card, the NT machine a 100 Mbps 3COM, and the lights on the hub say that it's using those speeds on the interfaces that the machines are on, regardless of whether the one machine is running Linux or Windows 95. What on Earth could be going on here?

I had a similar problem with the kernel as supplied with RH5.2, even when recompiled. I tracked it down to not being able to properly determine the IRQ that was being used by my 3c509 in PnP mode. I just forced the card to use a

fixed IRQ, and passed the module the correct IRQ, and all came back to me. I now can boot the machine into either Linux or W95, and networking works fine. I keep meaning to try it with the 2.2.7 kernel to see if it can determine the correct IRQ, but have not gotten around to it as it works now.

Alan Wood

ANSWER: Re: question for the board

Date: Tue, 11 May 1999 11:05:13 +0100
From: Stephen Crane, scrane@flexicom.com
I am confused about what I will need to install Red Hat 5.2 on my new dell system last attempt met me with a command line only --- xfree was needed for my video card TNT chipset however I was looking for the files - and I am hoping for RPMS out there for me to do it the easy way.

XFree86- rpms are in the usual place, i.e., updates.redhat.com or, my favourite mirror, Sunsite:


The best index for, well almost everything, is rpmfind.net, e.g.:




ANSWER: Re: Network boot disk for i386 without hd

Date: Thu, 27 May 1999 15:38:42 +0200
From: Radovan Garabik, garabik@melkor.dnp.fmph.uniba.sk
I have a Linux machine in my office network and several i386 that has no hd, but has 1.44 floppy. They also have ne2000 network card, without no proms. Is there a way to make a boot disk that allow my i386 to boot and login into my Linux machine??? I searched the web but found only solutions that reffer to using network cards with eproms/proms. Thanks.
How much memory do the i386's have?
You can check out one of one-floppy mini distributions, or set up nfs-root linux on them - it requires loadlin.exe and kernel with compiled nfsroot support, and (depending on how much memory you have) swapping over nfs. It is not that difficult to be done, but not for a beginner. Alternatively you can boot into DOS and use good old NCSA telnet to connect to your linux machine.


ANSWER: Re: FTP access methods...

Date: Thu, 27 May 1999 15:48:22 +0200
From: Radovan Garabik, garabik@melkor.dnp.fmph.uniba.sk
Ok tough guys, I have written down more one-liners and cool tricks from the Linux Gazette pages than from anywhere else. And I finally have a good question: In both Window$ and O$/2 I had apps that would treat ftp sites as folders (directories). It worked real well with keeping data in sync off-site. Is there a tool that will allow an FTP site to be mounted under Linux? It seems fairly useful to me, but freshmeat and other resources turned up nada.
Linux VFS is not very friendly to the idea of external filesystems... However, check out http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html I have not tried it yet, but I am going in a short time.
I am working on a cool 1 disk Linux distro that has pilot backup features and other remote file access ideas that could really benefit from this.

probably NFS is the way to go....


ANSWER: re: soundpro

Date: Fri, 28 May 1999 01:10:14 +0800 (SGT)
From: "Jayasuthan ......", suthan@eplx01.fairchildsemi.com

Please check for linux supported soundcards.. second the might compatible with other cards. Try compile soundcard driver as modules. And learn to use isapnp and conf.modules which might help


ANSWER: Re: Question about 2 GB max?

Date: Fri, 28 May 1999 15:39:40 -0400 (EDT)
From: Deirdre Saoirse, deirdre@deirdre.net

On Thu, 27 May 1999, Jim Dennis wrote:
Actually 2Gb is the maximum FILESIZE under 32-bit versions of Linux. (Alpha, and presumably UltraSPARC ports are not hampered by this). Linux ext2 filesystems can be much larger than 2Gb ---
That's fine as far as the general theory goes, however...: See:

Traditionally, there has been a 2GB partition size limit (not just a FILE size limit) on PowerPC Linux partitions. I don't know if that will continue to be true with newer versions but it is true of LinuxPPC up to revision 4 and DR3 of MkLinux. I haven't checked if there's a YellowDogLinux specific answer however.

pre-5 of LinuxPPC reportedly handles larger partitions but I haven't found specifics for later versions (does anyone want to update the FAQ-o-Matic?).


ANSWER: Re: Question about 2 GB max?

Date: Fri, 28 May 1999 19:13:24 -0400 (EDT)
From: Tom Rini, tmrini@ntplx.net

On Fri, 28 May 1999, Deirdre Saoirse wrote:
That's fine as far as the general theory goes, however...: See: http://www.dartmouth.edu/cgi-bin/cgiwrap/jonh/lppc/faq.pl?_highlightWords=p artition%20size&file=494

This is however, WRONG. wrong wrong wrong wrong. Well, almost. :) If you use a newer e2fsprogs (ie compile 1.14 or whatever is current) you're fine. I'm not even sure if R4/DR3 really does have that problem (been a while, and I forget just when that problem was fixed). R5/YDL/anything w/ current e2fsprogs is fine.


Published in Linux Gazette Issue 42, June 1999


This page maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999 Specialized Systems Consultants, Inc.