1475 lines
55 KiB
HTML
1475 lines
55 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<title>More 2 Cent Tips & Tricks LG #27</title>
|
|
</head>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
<P> <hr> <P>
|
|
|
|
<!-- QUICK TIPS SECTION ================================================== -->
|
|
<center>
|
|
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
|
|
More 2¢ Tips!</A></H1> <BR>
|
|
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
|
|
gazette@ssc.com
|
|
</A></center>
|
|
|
|
<p><hr><p>
|
|
<H3>Contents:</H3>
|
|
<ul>
|
|
<li><a HREF="./lg_tips27.html#shane">Re: Help Wanted LaserJet 4L</a>
|
|
<li><a HREF="./lg_tips27.html#fraser">StarOffice 4/Ghostscript</a>
|
|
<li><a HREF="./lg_tips27.html#rc">Linux and VAX 3400 and 3300</a>
|
|
<li><a HREF="./lg_tips27.html#caolin">xdm with Pictures</a>
|
|
<li><a HREF="./lg_tips27.html#caolin2">Re: Help-Installing Linux on a FAT32</a>
|
|
<li><a HREF="./lg_tips27.html#john">Regarding Easter Eggs in Netscape etc.</a>
|
|
<li><a HREF="./lg_tips27.html#craige">Re: Changing XDM windows</a>
|
|
<li><a HREF="./lg_tips27.html#serge">Nice xdm and Linux PPC</a>
|
|
<li><a HREF="./lg_tips27.html#roland">Re: Help with Sound Card</a>
|
|
<li><a HREF="./lg_tips27.html#friedhelm">Modline for TV</a>
|
|
<li><a HREF="./lg_tips27.html#ji">mpack 2 cent tip</a>
|
|
<li><a HREF="./lg_tips27.html#guido">shutdown and root</a>
|
|
<li><a HREF="./lg_tips27.html#allan">Perl Script 2 cent tip</a>
|
|
<li><a HREF="./lg_tips27.html#james">RE: my dual pentium</a>
|
|
<li><a HREF="./lg_tips27.html#james2">RE: Changing XDM windows</a>
|
|
<li><a HREF="./lg_tips27.html#james3">RE: HELP-Installing Linux on a FAT32
|
|
Drive</a>
|
|
<li><a HREF="./lg_tips27.html#gman">Re: Apache SSL extensions...</a>
|
|
<li><a HREF="./lg_tips27.html#brett">Reply to locate tip (LG 26)</a>
|
|
<li><a HREF="./lg_tips27.html#milton">Re: Getting Linux to the public...</a>
|
|
<li><a HREF="./lg_tips27.html#carl">My 2-cents on W95/Linux coexistence</a>
|
|
<li><a HREF="./lg_tips27.html#christoph">2-cent tips in LG 26: core dumps</a>
|
|
<li><a HREF="./lg_tips27.html#mark">Perl Script 2C Tip</a>
|
|
<li><a HREF="./lg_tips27.html#john2">rxvt 0.02$ tip</a>
|
|
<li><a HREF="./lg_tips27.html#john3">Tiny patch to ifconfig</a>
|
|
<li><a HREF="./lg_tips27.html#bill">Re: Wanting HELP!</a>
|
|
<li><a HREF="./lg_tips27.html#kragen">Re: Help Wanted (usershell on console
|
|
without logging in)</a>
|
|
<li><a HREF="./lg_tips27.html#vivek">2 cent tip followup -- X</a>
|
|
<li><a HREF="./lg_tips27.html#remco">locate patch</a>
|
|
<li><a HREF="./lg_tips27.html#padraig">locate subdirectories</a>
|
|
</ul>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="shane"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: Help Wanted - LaserJet 4L
|
|
</H3>
|
|
<P>
|
|
Date: Mon, 2 Mar 1998 14:38:43 -0500<BR>
|
|
From: <A
|
|
HREF="mailto:Shane_McLaughlin@stream.com">Shane_McLaughlin@stream.com</A>
|
|
<P>
|
|
To: John.H.Gorman@MCI.Com<BR>
|
|
Re: font sizes + points, Linux Gazette #26
|
|
|
|
I had a similar problem with an old Deskjet under SunOS and was
|
|
supplied with the following info by HP support Europe. It applies to
|
|
DOS but should be applicable to any Un*x system as well
|
|
|
|
These are printer instruction generation wizards URLs
|
|
<ul>
|
|
<li>FOR PCL3 got to (DeskJets):
|
|
http://www.hp.com/cpso-support/deskjet/tools/pcl3.html
|
|
|
|
<li>FOR PCL5 got to (LaserJets):
|
|
http://www.hp.com/cpso-support/PrinterLanguage/pclwiz.html
|
|
|
|
<li>FOR PJL go to (printer job language - like a batch language):
|
|
http://www.hp.com/cpso-support/PrinterLanguage/pjlwiz.html
|
|
|
|
<li>Try checking entries on Horizontal Motion Index and Vertical Motion
|
|
Index (HMI + VMI) - that might be what you want.
|
|
</ul>
|
|
I saw a posting in C.O.L.A. a few months back that someone has
|
|
already done the tough work and has programmed some mostly-complete
|
|
PCL 3+ 5 drivers for Linux
|
|
|
|
If all else fails, HP DOS drivers exist that can customise point sizes
|
|
+ fonts and save them permanently to printer memory (5Si's do, i don't
|
|
know about 4Ls) If you don't have a DOS partition maybe DOSEMU?
|
|
|
|
Good Luck!<BR>
|
|
Shane McLaughlin
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="fraser"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
2c tip (StarOffice 4 / Ghostscript)
|
|
</H3><P>
|
|
Date: Mon, 2 Mar 1998 18:48:51 -0500 (EST)<BR>
|
|
From: Fraser McCrossan, <A
|
|
HREF="mailto:fraserm@gtn.net">fraserm@gtn.net</A>
|
|
<P>
|
|
I've just started using the excellent Star Office 4.0 (free for personal
|
|
use - go get it now!), but have noticed that when using Ghostscript to
|
|
filter its print output on my non-Postscript printer, the results
|
|
were not quite as they appeared on the screen.
|
|
<P>
|
|
I reasoned that this might be because the fonts supplied with SO didn't
|
|
quite match those supplied with Ghostscript. However, the SO fonts are
|
|
Type 1 Postscript fonts... which Ghostscript can use. To make Ghostscript
|
|
use them, you need to link them to its home directory. For example, if
|
|
your SO is installed in /home/fraser/Office40, change to the Ghostscript
|
|
font (normally /usr/local/share/ghostscript/fonts) directory, and do the
|
|
following:
|
|
<PRE>
|
|
ln -s /home/fraser/Office40/fonts/type1/*.pf[ab] .
|
|
mv Fontmap Fontmap.hide
|
|
</PRE>
|
|
For some reason, when I tried to add the new fonts to Fontmap in the same
|
|
format as the existing fonts, GS would crash, hence hiding it. I'm not a
|
|
GS guru... perhaps someone else can explain why. However, GS works just
|
|
fine without Fontmap for me, although it probably takes longer to start
|
|
up - and everything I print looks just like the screen.
|
|
<P>
|
|
--Fraser
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="rc"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: Linux and VAX 3400 and 3300
|
|
</H3><P>
|
|
Date: Mon, 02 Mar 1998 20:34:55 -0500<BR>
|
|
From: RC Pavlicek, <A HREF="mailto:pavlicek@radc17.cop.dec.com">
|
|
pavlicek@radc17.cop.dec.com</A>
|
|
<P>
|
|
The March issue of the Gazette includes the following under 2 Cent Tips:
|
|
<<I have just purchased a MicroVAX 3400 and 3300. I would like to put
|
|
<<Linux on these two systems. Can you provide any help in this aspect.
|
|
<P>
|
|
<I believe those are MIPS 3000 boxes, try the Linux VAX Port Homepage at >http://ucnet.canberra.edu.au/~mikal/vaxlinux/home.html
|
|
<and the Linux/MIPS project at http://lena.fnet.fr/
|
|
<P>
|
|
Anything with "VAX" in its name is just that -- a VAX. Digital made
|
|
MIPS boxes once upon a time, but they never used the VAX/MicroVAX
|
|
name. Most of Digital's MIPS boxes were sold under the DECstation or
|
|
DECsystem name.
|
|
<P>
|
|
The pointer to the VAX/Linux effort is the best one I know about, but
|
|
the whole VAX/Linux project was not even close to producing usable code
|
|
last time I checked. NetBSD, if it works on these boxes, may be your
|
|
best bet.
|
|
<P>
|
|
-- Russell C. Pavlicek<BR>
|
|
[speaking for himself, not for Digital Equipment Corporation]
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="caolin"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
xdm with pictures
|
|
</H3><P>
|
|
Date: Thu, 05 Mar 1998 10:34:43 -0000 (GMT)<BR>
|
|
From: Caolan McNamara, <A HREF="mailto:Caolan.McNamara@ul.ie">
|
|
Caolan.McNamara@ul.ie</A>
|
|
<P>
|
|
<blockquote>
|
|
Can I change the XDM login window/screen? I have a cool house logo so i want to
|
|
use it in my own Home Network.
|
|
And at my school they want to know to so. Is it possible. If yes, how? If no,
|
|
WHY NOT? -- Jeroen Bulters, The netherlands
|
|
</blockquote>
|
|
you could try xdm3d_xpm, which allows a picture in the xdm box, which is 3d
|
|
with shadows and stuff,one version is at
|
|
ftp://brain.sel.cam.ac.uk/users/mbm/xdm3d (probably the latest)
|
|
theres another (older) at
|
|
http://oak.ece.ul.ie/~griffini/software.html
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="james3"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: HELP-Installing Linux on a FAT32 Drive
|
|
Date: Thu, 05 Mar 1998 11:35:42 -0000 (GMT)<BR>
|
|
</H3><P>
|
|
From: Caolan McNamara, <A HREF="mailto:Caolan.McNamara@ul.ie">
|
|
Caolan.McNamara@ul.ie</A>
|
|
<blockquote>
|
|
I'm interested in installing linux on a machine I built recently, but when I
|
|
installed Win95(b), I idiotically opted to
|
|
format the drive using FAT32, which in a 95-only environment is great, but
|
|
Linux can't read it for greek.
|
|
I've looked around for utilities to effectively un-FAT32 the drive, which I
|
|
will then partition with Partition Magic to
|
|
use the freespace as a native ext2 partition, etc., but am having little luck.
|
|
Reformating is a disheartening prospect
|
|
I would rather not face, but am fully prepared to do so if I don't find any
|
|
help here. --nate daiger</blockquote>
|
|
<P>
|
|
Well partition magic 3 can repartition fat32 without hassle, and there exists
|
|
a patch for linux kernel to understand fat32 at
|
|
http://bmrc.berkeley.edu/people/chaffee/fat32.html
|
|
which also lists a version of fips which also should understand fat32, to
|
|
resize your drive.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="john"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Regarding "Easter Eggs" in Netscape etc.
|
|
</H3><P>
|
|
Date: Thu, 5 Mar 1998 23:21:20 +0000 (GMT)<BR>
|
|
From: John Pelan, <A
|
|
HREF="mailto:johnp@am.qub.ac.uk">johnp@am.qub.ac.uk</A>
|
|
<P>
|
|
The on-going 2 cent tips about the hidden "Easter Eggs" in Netscape is
|
|
interesting. However rather than continually listing them it might be more
|
|
fruitful to learn how one can try to discover them for oneself.
|
|
<P>
|
|
One useful tool in particular, is the oft neglected 'strings' command.
|
|
This will locate printable strings in an arbitrary file and display them.
|
|
So one can do something like;
|
|
<PRE>
|
|
prompt% strings /usr/lib/netscape/netscape-navigator
|
|
</PRE>
|
|
which will reveal all the embedded strings in that binary. You might like
|
|
to redirect the output to a file for analysis. As many of the strings will
|
|
be rubbish (i.e. 'random' sequences of printable characters) one can
|
|
always use grep, awk, Perl etc. to help filter in/out particular patterns.
|
|
<P>
|
|
In the case of Netscape, only a tiny set of the strings will correspond to
|
|
"Easter Eggs" (not all of them will be immediately obvious either) and
|
|
locating them is left as an exercise to the reader...
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="craige"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Changing XDM windows
|
|
</H3><P>
|
|
Date: Fri, 06 Mar 1998 12:16:02 +1200<BR>
|
|
From: Craige McWhirter, <A HREF="mailto:craige@magna.com.au">
|
|
craige@magna.com.au</A>
|
|
<blockquote>
|
|
From: Jeroen Bulters, jbulters@scoutnet.nl <BR>
|
|
Can I change the XDM login window/screen? I have a cool house logo so i want
|
|
to use it in my own Home Network. And at my school they want to know to so.
|
|
Is it possible. If yes, how? If no, WHY NOT. </blockquote>
|
|
<P>
|
|
Try this web site below. It had everything I needed to
|
|
customise my XDM login.<BR>
|
|
<A HREF="http://torment.ntr.net/xdm/">http://torment.ntr.net/xdm/</A>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="serge"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Nice xdm and Linux PPC
|
|
Date: Fri, 06 Mar 1998 09:09:48 -0500<BR>
|
|
</H3><P>
|
|
From: Serge Droz, <A
|
|
HREF="mailto:droz@physics.uoguelph.ca">droz@physics.uoguelph.ca</A>
|
|
<P>
|
|
just a quick comment on two letters in the Linux Gazette #26
|
|
(http://www.linuxgazette.com/issue26/lg_mail26.html)
|
|
<ol>
|
|
<li>Changing XDM windows: Check out
|
|
http://jovian.physics.uoguelph.ca/~droz/uni/xdm3d.html for
|
|
a replacement (This version comes with pam support). This
|
|
version runs fine on our Redhat systems (Intel & PPC).
|
|
<P>
|
|
<li>New direction: Linux is beeing ported to the PPC chip. See
|
|
http://www.linuxppc.org for more info, downloads CD's T-shirts....
|
|
It actually runs quite stable on my PPC.
|
|
</ol>
|
|
Cheers, Serge
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="roland"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Help with Sound Card
|
|
</H3><P>
|
|
Date: Fri, 6 Mar 1998 20:32:13 +0100 (MET)<BR>
|
|
From: Roland Smith, <A HREF="mailto:rsmit06@ibm.net">
|
|
rsmit06@ibm.net</A>
|
|
<P>
|
|
According to the Sound-HOWTO:<BR>
|
|
"MV Jaz16 and ESS688/1688 based cards generally work with the
|
|
SoundBlaster driver"
|
|
<P>
|
|
To get a PnP card to work, you need to configure it first. There are two
|
|
ways of doing that:
|
|
<ol>
|
|
<li>boot into DOS, use the card's DOS-based initialization program, then do
|
|
a warm boot to Linux
|
|
<P>
|
|
<li>compile sound support as a module, and use isapnp from the isapnptools
|
|
package to initialize the card, after which you can insert the sound
|
|
module.
|
|
</ol>
|
|
The isapnptools package can be found at
|
|
ftp://ftp.demon.co.uk/pub/unix/linux/utils
|
|
<P>
|
|
Regards, Roland
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="friedhelm"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Modline for TV
|
|
</H3><P>
|
|
Date: Sun, 8 Mar 1998 13:11:37 +0100 (MET)<BR>
|
|
From: <A HREF="mailto:friedhelm.mehnert@gmx.net">
|
|
friedhelm.mehnert@gmx.net</A>
|
|
<P>
|
|
I have shamelessly stolen this from USENET, because I feel this excellent
|
|
information should appear within the <I>Linux Gazette</I>.
|
|
<P>
|
|
I hope the original author don't mind. :-)
|
|
<blockquote>
|
|
From: Rob van der Putten<BR>
|
|
Date: Sun, 8 Mar 1998 00:14:15 +0100<BR>
|
|
Hopefully you won't need this, but if you ever want to display X on a big
|
|
screen and a TV is the only big screen around you might want to use this.
|
|
</blockquote> <P> <blockquote>
|
|
A TV with a RGB SCART input is nothing more than a fixed sync monitor with
|
|
a rather low picture quality. This means that you can make a TV compatible
|
|
signal with a plain vanilla cheapo VGA card.
|
|
</blockquote> <P> <blockquote>
|
|
For the european 625 line (575 visable lines) TV standard a modeline looks
|
|
like this:
|
|
Modeline "736x575i" 14.16 736 760 824 904 575 580 585 625 interlace -hsync -vsync
|
|
</blockquote> <P> <blockquote>
|
|
Officially the horizontal resolution is 767 (4 / 3 * 575) pixels with a
|
|
clock of 14.76 MHz. However, since the clock used is 14.16 MHz, I reduced
|
|
the horizontal values proportional to 14.16 / 14.76 (and rounded them to
|
|
the nearest multiple of 8).
|
|
</blockquote> <P> <blockquote>
|
|
If you want to make a 640x480 screen with a black border you can you use
|
|
this line:
|
|
Modeline "640x480i" 14.16 640 712 776 904 480 532 537 625 interlace -hsync -vsync
|
|
</blockquote> <P> <blockquote>
|
|
You can center it by altering the 2nd and 3rd horizontal and vertical
|
|
values (this example shifts the picture to the left):
|
|
Modeline "640x480i" 14.16 640 728 792 904 480 532 537 625 interlace -hsync -vsync
|
|
</blockquote> <P> <blockquote>
|
|
You can make a non interlaced signal with this modeline:
|
|
Modeline "736x288" 14.16 736 760 824 904 288 290 292 312 -hsync -vsync
|
|
</blockquote> <P> <blockquote>
|
|
The VGA RGB signals are compatible with the scart bus, the sync signals
|
|
are not. You have to create a composit sync signal of 0.3 ... 0.5 Vpp.
|
|
The cirquit below acts both as a AND gate and a level translator.
|
|
It doesn't need a power supply and can be mounted inside a VGA plug:
|
|
</blockquote> <PRE>
|
|
|
|
-VS ------------------------+
|
|
|
|
|
|
|
|
| /
|
|
+-----+ |/
|
|
-HS --+ 3k3 +-----*-----| BC 548 B
|
|
+-----+ | |\
|
|
| | \|
|
|
| -| +-----+
|
|
| *-----+ 68 +----- -CS 0.3 Vpp
|
|
| | +-----+
|
|
+++ +++
|
|
| | | |
|
|
| | | |
|
|
+++ +++
|
|
| |
|
|
GND --------------*---------*----------------- GND
|
|
1k2 820
|
|
</PRE> <blockquote>
|
|
You can use any general purpose low frequent low power NPN transistor
|
|
instead of the BC 548 B<BR>
|
|
Regards, Rob
|
|
</blockquote>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="ji"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
mpack 2 cent tip
|
|
</H3><P>
|
|
Date: Mon, 9 Mar 1998 11:17:47 +0100 (MET)<BR>
|
|
From: J.I.vanHemert, <A HREF="mailto:jvhemert@wi.leidenuniv.nl">
|
|
jvhemert@wi.leidenuniv.nl</A>
|
|
<P>
|
|
I response to the 2 cent tip of Ivan Griffin, I am sending a two cent tip of
|
|
my own.
|
|
<P>
|
|
Ivan send in a script that can be used to mail Micro$oft users. I would like
|
|
to mention the package 'mpack', this program is very handy if you want to send
|
|
out some mime-encoded mail. Furthermore the package also contains 'munpack'
|
|
which does the obvious thing.
|
|
<P>
|
|
Mpack can be found on ftp.andrew.cmu.edu in the directory pub/mpack, in the
|
|
archive mpack-1.5.tar.gz
|
|
<P>
|
|
Cheer, Jano
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="guido"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
shutdown and root
|
|
</H3><P>
|
|
Date: Mon, 9 Mar 1998 13:10:55 +0100<BR>
|
|
From: Guido Socher, <A HREF="mailto:eedgus@eed.ericsson.se">
|
|
eedgus@eed.ericsson.se</A>
|
|
<P>
|
|
I noticed that many people still login as root before they power
|
|
down their system in order to run the command 'shutdown -h now'.
|
|
This is really not necessary and it may cause problems if everybody
|
|
working on a machine knows the root password.
|
|
<P>
|
|
Most Linux distributions are configured to reboot if ctrl-alt-delete
|
|
is pressed, but this can be changed to run 'shutdown -h now'.
|
|
Edit your /etc/inittab and change the line that starts with ca:
|
|
<PRE>
|
|
# Trap CTRL-ALT-DELETE
|
|
# original line would reboot:
|
|
#ca::ctrlaltdel:/sbin/shutdown -t3 -r now
|
|
# now halt the system after shutdown:
|
|
ca::ctrlaltdel:/sbin/shutdown -t3 -h now
|
|
#
|
|
</PRE>
|
|
Now you can just press crtl-alt-delete as normal user and your system
|
|
comes down clean and halts.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="allan"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Perl Script 2 cent tip (maybe even a nickel)
|
|
</H3><P>
|
|
Date: Mon, 09 Mar 1998 18:37:20 -0500<BR>
|
|
From: Allan Peda, <A
|
|
HREF="mailto:allan@interport.net">allan@interport.net</A>
|
|
<P>
|
|
When I was putting my network card in my Linux box, I wanted to keep the
|
|
soundblaster, but the addresses are not easy to read (for me) in hex.
|
|
Even if there were in decimal, I figured a plot of the areas that appear
|
|
open would be useful. So I hacked together a little perl script to do
|
|
just that, Usage: addreses.pl addr.txt > outputfile.txt
|
|
<P>
|
|
Of course it goes to stdout without a redirected file.
|
|
The input file is constructed with one line for each address:
|
|
<PRE>
|
|
base_address TAB upper_address TAB :Description
|
|
</PRE>
|
|
Here's a little perl script that I wrote to help me identify
|
|
conflicting addreses:
|
|
<PRE>
|
|
# address.pl v 0.1
|
|
# Allan Peda
|
|
# allan@interport.net
|
|
#
|
|
# How to use: Prepare a file based on the format of the sample at
|
|
# the end of this script.
|
|
# This script will plot a servicable chart of the addresses in use,
|
|
# with the gaps plainly apparant.
|
|
#
|
|
$debug = 1;
|
|
$min_addr=0;
|
|
$max_addr=0;
|
|
for ($i=1; <:>; $i++) {
|
|
/^(\w+)\s/; $$memory[$i]{base_addr}=$1; # base address
|
|
/^\w+\s+(\w+)\s/; $$memory[$i]{upper_addr}=$1; # upper address
|
|
/\:(.+)$/; $$memory[$i]{addr_descrip} = $1; # description of address
|
|
$ttl_num_addresses = $i;
|
|
print "$i\t $$memory[$i]{base_addr} \t" if $debug;
|
|
print hex($$memory[$i]{base_addr}),"\t-->\t" if $debug;
|
|
print " $$memory[$i]{upper_addr}\t" if $debug;
|
|
print hex($$memory[$i]{upper_addr}),"\t" if $debug;
|
|
print "$$memory[$i]{addr_descrip}\n" if $debug;
|
|
if (( hex($$memory[$i]{base_addr}) < hex($min_addr) ) || $i<=1){
|
|
$min_addr = $$memory[$i]{base_addr};
|
|
}
|
|
if (( hex($$memory[$i]{upper_addr}) > hex($max_addr) ) || $i<=1){
|
|
$max_addr = $$memory[$i]{upper_addr};
|
|
}
|
|
}
|
|
print "\nTotal number of addreses used = $ttl_num_addresses" if $debug;
|
|
print "\nMinimimum address is: $min_addr" if $debug;
|
|
print "\nMaximimum address is: $max_addr\n" if $debug;
|
|
for ($addr = hex($min_addr); $addr <= hex($max_addr); $addr++) {
|
|
printf "\n%4x -> ", $addr;
|
|
for ($i=1; $i <= $ttl_num_addresses; $i++) {
|
|
if (( hex($$memory[$i]{base_addr}) <= $addr ) and
|
|
(( hex($$memory[$i]{upper_addr}) >= $addr))){
|
|
print "*** ";
|
|
if (( hex($$memory[$i]{base_addr}) == $addr )) {
|
|
print "$$memory[$i]{addr_descrip}";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
# sample file address.txt follows:
|
|
__END__
|
|
0x1F0 0x1f8 :Hard disk drive
|
|
0x200 0x207 :Game I/O
|
|
0x278 0x27f :Parallel Port 2 (LPT2)
|
|
0x2e8 0x2ef :serial port, com4
|
|
0x300 0x31f :Prototype / Network PCB
|
|
0x360 0x363 :PC Network (Low address)
|
|
0x368 0x36B :PC Network (High address)
|
|
0x378 0x37f :Parallel Port 1 (LPT1)
|
|
0x380 0x38f :SDLC, Bisync
|
|
0x3a0 0x3bf :MDA / prn adapter (hercules)
|
|
0x3c0 0x3cf :EGA/VGA
|
|
0x3d0 0x3df :CGA/MDA/MCGA
|
|
0x3e8 0x3ef :Diskette controller
|
|
0x3fb 0x3ff :serial port 1 - com 1
|
|
</PRE>
|
|
The input file looks like this (typically):
|
|
<PRE>
|
|
0x1F0 0x1f8 :Hard disk drive
|
|
0x200 0x207 :Game I/O
|
|
0x278 0x27f :Parallel Port 2 (LPT2)
|
|
0x2e8 0x2ef :serial port, com4
|
|
0x300 0x31f :Prototype / Network PCB
|
|
0x360 0x363 :PC Network (Low address)
|
|
0x368 0x36B :PC Network (High address)
|
|
0x378 0x37f :Parallel Port 1 (LPT1)
|
|
0x380 0x38f :SDLC, Bisync
|
|
0x3a0 0x3bf :MDA / prn adapter (hercules)
|
|
0x3c0 0x3cf :EGA/VGA
|
|
0x3d0 0x3df :CGA/MDA/MCGA
|
|
0x3e8 0x3ef :Diskette controller
|
|
0x3fb 0x3ff :serial port 1 - com 1
|
|
</PRE>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="james"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: my dual pentium
|
|
</H3><P>
|
|
Date: Mon, 09 Mar 1998 10:29:24 -0700 <BR>
|
|
From: James Gilb, <A HREF="mailto:p27451@email.sps.mot.com">
|
|
p27451@email.sps.mot.com</A>
|
|
<P>
|
|
My guess is that the default Caldera kernel does not have multiple
|
|
CPU's enabled. You will probably have to recompile your kernel to
|
|
enable SMP. Some kernel versions (even the 2.0.xx) are less stable for
|
|
SMP than others, unfortunately I can't give you any help on which
|
|
version to choose. However, you may want to join the Linux-SMP mailing
|
|
list, email majordomo@vger.rutgers.edu with the text 'subscribe
|
|
linux-smp' to join the list. An archive is maintained at Linux HQ
|
|
(http://www.linuxhq.com/lnxlists/linux-smp/), so you may want to look
|
|
there first before you ask on the mailing list. The May 1997 Caldera
|
|
newsletter has the following information (a little out of date):
|
|
<P>
|
|
Linux? When will
|
|
SMP be fully supported?
|
|
<P>
|
|
The Linux 2.x kernel with full SMP support is currently in beta,
|
|
and will most likely
|
|
be included in the next stable release of the kernel. The Linux
|
|
2.0.25 and 2.0.29
|
|
kernels which ship in OpenLinux 1.0 and 1.1 products can reside
|
|
and are tolerant of an
|
|
SMP environment, but will not perform load balancing.
|
|
<P>
|
|
To enable SMP, the OpenLinux 1.2 FAQ
|
|
(http://www.caldera.com/tech-ref/col-1.2/faq/faq-5.html) has the
|
|
following suggestions:
|
|
<P>
|
|
5.4 How to enable SMP (multiple processor) support: <BR>
|
|
To enable SMP (multiple processor) support in OpenLinux, you
|
|
must do three things:
|
|
<ol>
|
|
<li>Go to "/usr/src/linux" and uncomment the "SMP = 1"
|
|
line in the Makefile (to
|
|
uncomment this line, remove the preceeding "#").
|
|
<li>Follow the instructions in Rebuilding the Linux Kernel
|
|
for Caldera OpenLinux 1.2
|
|
(http://www.caldera.com/tech-ref/docs/COL12-Kernel-Rebuild.html)
|
|
and during the 'make config' step be sure to enable
|
|
"Real-time clock support". Then
|
|
recompile your kernel using the remainder of the
|
|
steps.
|
|
<li>Reboot your system.
|
|
</ol>
|
|
Currently there is no method for monitoring how much of each
|
|
processor is being used, but if you run the "top" utility you will most
|
|
likely see processes that are using more than 100% of a processor;
|
|
whatever is above the 100% mark is being done with the other processors.
|
|
Also, to determine if both processors have been detected and are in use,
|
|
you can cat the "/proc/cpuinfo" file for a report of what processors are
|
|
recognized by Linux; if there's more than one listed, you are running
|
|
with SMP support.
|
|
<P>
|
|
Some sources for information on SMP are:<BR>
|
|
<P>
|
|
http://www.caldera.com/LDP/HOWTO/Parallel-Processing-HOWTO-2.html<BR>
|
|
(or any other LDP site)<BR>
|
|
http://www.linux.org.uk/SMP/title.html <BR>
|
|
http://www.uruk.org/~erich/mps-linux-status.html <BR>
|
|
(These pages haven't been updated in a while)
|
|
<P>
|
|
If after reading the above information, you still have questions, you
|
|
might email Caldera's technical support (assuming you purchased your
|
|
distribution from them and registered it.) I have had good luck with
|
|
their technical support, but read the FAQ's first.
|
|
<P>
|
|
BTW: I found most of the above information by going to Caldera's web
|
|
page and typing SMP in the search box. Thanks Caldera for the web site.
|
|
<P>
|
|
James P. K. Gilb
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="james2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: Changing XDM windows
|
|
</H3><P>
|
|
Date: Mon, 09 Mar 1998 11:20:33 -0700<BR>
|
|
From: James Gilb, <A HREF="mailto:p27451@email.sps.mot.com">
|
|
p27451@email.sps.mot.com</A>
|
|
<P>
|
|
Jeroen, there a three ways that I know for sure to customize your login
|
|
screen.
|
|
<ol>
|
|
<li>Get XDM-photo from
|
|
ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin.X11/xdm-photo-1.1.tar.gz
|
|
<li>Use XBanner, which can do some really terrific things with you
|
|
login screen. If you want a login screen that is the envy of you
|
|
neighbors, you need XBanner. The URL for XBanner is:
|
|
http://chaos.fullerton.edu/XBanner
|
|
<li>Use Xdm3d/XPM - from
|
|
http://oak.ece.ul.ie/~griffini/software.html, get the sources and put
|
|
your own XPM in, although the default penguin is pretty cool.
|
|
</ol>
|
|
-- James Gilb
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="james 3"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: HELP-Installing Linux on a FAT32 Drive
|
|
</H3><P>
|
|
Date: Mon, 09 Mar 1998 11:24:56 -0700<BR>
|
|
From: James Gilb, <A HREF="mailto:p27451@email.sps.mot.com">
|
|
p27451@email.sps.mot.com</A>
|
|
<P>
|
|
Nate, there is a patch to allow FAT32 support in the Linux kernel so you
|
|
can mount the OSR2 drives and even run a umsdos type installation. The
|
|
web page for the patches is:<BR>
|
|
http://bmrc.berkeley.edu/people/chaffee/fat32.html
|
|
<P>
|
|
-- James Gilb
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="gman"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Apache SSL extensions...
|
|
</H3><P>
|
|
Date: Wed, 11 Mar 1998 02:45:06 -0800<BR>
|
|
From: G-man, <A HREF="mailto:gman@infinex.com">gman@infinex.com</A>
|
|
<P>
|
|
I've put up a web page on how to setup apache-ssl Check out
|
|
http://www.linuxrox.com/WebServer.html .. Also have examples of how the
|
|
httpd.conf should look like to run secure and non-secure web server
|
|
using apache-ssl..
|
|
<P>
|
|
Hope that helps..
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="brett"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Reply to locate tip (LG 26)
|
|
</H3><P>
|
|
Date: Wed, 11 Mar 1998 19:37:47 -0500 (EST)<BR>
|
|
From: Brett Viren, <A HREF="mailto:bviren@ale.physics.sunysb.edu">
|
|
bviren@ale.physics.sunysb.edu</A>
|
|
<P>
|
|
About the problem of `locate' (2c tip #2 LG #26) showing files that
|
|
normal users can't access: If this happens, it is not a bug with
|
|
`locate' but rather with the Linux distribution (or the way locate and
|
|
friends have been installed by hand). `Locate' should be allowed to
|
|
print any and all matching file that are in the database it is pointed
|
|
to. However, in the case of the database for general system, it is a
|
|
security bug (IMO) if the database includes non-world-readable
|
|
files. Here is were the problem lies.
|
|
<P>
|
|
Debian Linux handles this by running `updatedb' (the program which
|
|
actually makes the `locate' data base) from /etc/cron.daily/find via:
|
|
<PRE>
|
|
cd / && updatedb --localuser=nobody 2>/dev/null
|
|
</PRE>
|
|
This is also a tad easier than patching/recompiling.
|
|
Anyways, there is my 2cents.
|
|
<P>
|
|
-Brett.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="milton"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Getting Linux to the public...
|
|
</H3><P>
|
|
Date: Thu, 12 Mar 1998 17:19:59 -0500<BR>
|
|
From: Milton L. Hankins {64892}, <A HREF="mailto:mlh@swl.msd.ray.com">
|
|
mlh@swl.msd.ray.com</A>
|
|
<P>
|
|
(This is in response to the article posted in General Mail, Linux
|
|
Gazette, Issue 26, March 1998.)
|
|
<P>
|
|
Although I can't speak for developers "that have Gobs of money for good
|
|
video boards and [humongous] monitors," I can share a few things with
|
|
you about my experiences with XFree86. I have run it successfully with
|
|
on a 14 inch monitor, using the standard SVGA X server on a 486-75MHz
|
|
with a Cirrus video card. It took quite a bit of fiddling, but I
|
|
eventually figured out how to get it to run in 800x600 mode, and then in
|
|
1024x768 interlaced.
|
|
<P>
|
|
A lot of it was just meddling with the XFree86 configuration file
|
|
directly, hoping that I wouldn't blow my monitor up. There are tools
|
|
today (like Metro-X) that make this process a fair bit easier.
|
|
<P>
|
|
One thing you might not realize is that the XFree86 config (last I
|
|
remember) sometimes chooses 640x480 mode on startup, when it actually
|
|
supports more modes. Try pressing Ctrl-Alt-Keypad+ to change the
|
|
resolution while running X.
|
|
<P>
|
|
Monitor size is another matter. I recall one application that liked to
|
|
size itself bigger than my screen. There are a couple ways around this.
|
|
<P>
|
|
The first is the -geometry flag, available to most X applications. If
|
|
you want to try it, the xterm, xeyes, and xbiff programs all support it.
|
|
The most basic format is:
|
|
<PRE>
|
|
-geometry =<width>x<height>+<x>+<y>:
|
|
</PRE>
|
|
Replace <width> and <height> with the desired width and height
|
|
of the
|
|
window, respectively. Sometimes width and height refer to characters,
|
|
and sometimes they refer to pixels. Your mileage may vary. <x> and
|
|
<y>
|
|
refer to the pixel coordinates of the new window's upper left corner.
|
|
If you want, you can leave out the first half (default size) or the
|
|
second half (default location). Sometimes you can leave off the equals
|
|
sign, too.
|
|
<P>
|
|
Some examples: "-geometry 800x600+0+0" will place an 800x600 window in
|
|
the upper left corner of the screen. "-geometry 400x300+200+150" will
|
|
place a 400x300 window in the center of an 800x600 display.
|
|
<P>
|
|
You can write shell aliases to run these programs with a default size.
|
|
A cleaner way is to put geometry specifications in your .Xresources
|
|
file. Usually this is of the form
|
|
<programName>*geometry:
|
|
<width>x<height>+<x>+<y>
|
|
<P>
|
|
Here are some examples:
|
|
<PRE>
|
|
XEyes*geometry: +1060+40
|
|
plan*geometry: +10+10
|
|
Netscape.Navigator.geometry: =336x425
|
|
Netscape.Mail.geometry: =300x400
|
|
Netscape.News.geometry: =300x400
|
|
Netscape.Composition.geometry: =350x350
|
|
</PRE>
|
|
You may also want to adjust the fonts for your program, especially if it
|
|
doesn't support the -geometry flag nor X resource.
|
|
<P>
|
|
I, too, feel that Linux is not ready for the public because of its
|
|
comparatively steeper learning curve. But it's gotten a lot better over
|
|
the years, thanks to the Linux community. Keep up the good work,
|
|
everyone!
|
|
<P>
|
|
Milton L. Hankins (no known relation to Greg)
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="carl"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
My 2-cents on W95/Linux coexistence
|
|
</H3><P>
|
|
Date: Tue, 17 Mar 1998 17:56:16 -0500<BR>
|
|
From: Carl Helmers, <A HREF="mailto:carl@helmers.com">
|
|
carl@helmers.com</A>
|
|
<P>
|
|
Re W95 and Linux: With hard disks crashing in price (hopefully not the
|
|
heads), here is the strategy I used for this problem of getting W95 and
|
|
Linux on the same machine at the end of 1997: On one of my personal
|
|
desktop machines, I had excellent results using a product called "System
|
|
Commander" -- this product has a Linux-savvy manual which explains all
|
|
the details one needs. The machine in question is a generic Pentium-133
|
|
with 32mb memory, a 2GB EIDE drive and a S3 Virge based graphic card.
|
|
After I got the machine in 1997 I added a removable 2GB EIDE drive in a
|
|
DataPort drive frame/cartridge setup for testing various Linux versions,
|
|
keeping the original W95 that came with the machine in the first drive.
|
|
<P>
|
|
Once I installed System Commander I set up the default boot choice on
|
|
the P133 desktop machine to be (of course) Linux on the second hard
|
|
drive, where I currently have X installed. I use this machine (running
|
|
Emacs and a bunch of handy macros) to keep my update log while
|
|
installing new Linices on my other machines (a Dell Latitude LM Laptop
|
|
[P133 40mb] with an alternate 2GB hard drive for Linux, and a Cyrix
|
|
6X86-166 clone on the desktop next to the P133.
|
|
<P>
|
|
My first attempt at a W95/Linux combination was on that Cyrix clone --
|
|
whose W95 seems to have re-written the fundamental hard disk sector map
|
|
of the second (but different model number, same capacity) Western
|
|
Digital drive on which I installed Linux through getting a working X
|
|
display -- before closing down and rebooting with LILO. After that
|
|
disaster, I just said the heck with W95 and reformatted the 2GB hard
|
|
disk as the primary Linux disk, with the second disk in its DataPort
|
|
removable frame retained as an additional file storage region. In my 30
|
|
years of using computers since high school in 1966, I have developed
|
|
the habit of always keeping a detailed log when doing anything I might
|
|
want to reproduce -- such as installing a Linux release. That way, if
|
|
I make a mistake I can try again, changing some critical detail or
|
|
other. I started the habit with pencil and spiral paper notebooks.
|
|
These days, I use a second computer system sitting on the same desktop
|
|
running emacs under XFree86 with my custom macros to speed up entry --
|
|
but the principle is the same.
|
|
<P>
|
|
In the System Commander desktop machine, I set W95 as a second boot
|
|
option, and the third option for booting from floppy using the Linux
|
|
installation boot diskettes. I still useW95 [perish the thought] for
|
|
one or two commercial Wintel programs I like which do not have a Linux
|
|
work-alike, and to try out new software packages.
|
|
<P>
|
|
Carl Helmers
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="christoph"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
2-cent tips in LG 26: core dumps (Marty Leisner)
|
|
</H3><P>
|
|
Date: Tue, 17 Mar 1998 19:45:48 +0100<BR>
|
|
From: Christoph L. Spiel, <A
|
|
HREF="mailto:Christoph_Spiel@physik.tu-muenchen.de">
|
|
Christoph_Spiel@physik.tu-muenchen.de</A>
|
|
<P>
|
|
I was annoyed by "file", too. Under several other unices
|
|
"file" can be used to identify a core dump. Marty's tip is
|
|
just fine. You don't have to write any script or other stuff.
|
|
<P>
|
|
I used "gdb" to find out where a "core"-file came from. As
|
|
a wrapper around it, I wrote "idcore". It has
|
|
the advantage of displaying only relevant information, i.e.,
|
|
the name of the binary causing the core-dump. This way it
|
|
can by used, e.g., in cron jobs to notify users.
|
|
The verbosity of idcore is controlled with the
|
|
<PRE>
|
|
--brief
|
|
</PRE>
|
|
and
|
|
<PRE>
|
|
--long
|
|
</PRE>
|
|
options.
|
|
<P>
|
|
I'd like to paste some sample output here, but neither can I
|
|
find a core dump on my machine, nor do I know a program that
|
|
generates one. (This is not a devine linux-box, I have
|
|
thrown out most instable binaries ;-)
|
|
<P>
|
|
Here comes "idcore":
|
|
<PRE>
|
|
#!/bin/sh
|
|
|
|
# name: idcore -- identify which binary caused a core dump
|
|
# author: c.l.s. (cspiel@physik.tu-muenchen.de)
|
|
# last rev.: 1998-01-22 11:14
|
|
# bash ver.: 1.14.7(1)
|
|
# $Id: lg_tips27.html,v 1.2 2002/10/09 22:24:23 lg Exp $
|
|
|
|
# display help message
|
|
# char* disp_help(void)
|
|
function disp_help
|
|
{
|
|
echo "usage:"
|
|
echo " idcore [OPTION] [[COREDUMP] ...]"
|
|
echo
|
|
echo " If COREDUMP is omitted the core file in the current"
|
|
echo " directory is used."
|
|
echo
|
|
echo " -h, --help display this help message"
|
|
echo " -v, --version show version of idcore"
|
|
echo " -b, --brief brief format, i.e. filename only"
|
|
echo " -l, --long long format, with filename, signal, user,"
|
|
echo " date, and backtrace"
|
|
}
|
|
|
|
# retrieve name binary that caused core dump via gdb
|
|
# char* get_name(const char* mode, const char* name)
|
|
function get_name
|
|
{
|
|
case "$1" in
|
|
brief)
|
|
echo q | gdb --quiet --core="$2" 2>&1 | head -1 | \
|
|
sed -ne "s/^.*\`\(.*\)'\.$/\1/p"
|
|
;;
|
|
standard)
|
|
echo q | gdb --quiet --core="$2" 2>&1 | head -2
|
|
;;
|
|
long)
|
|
dump=$(echo -e "where\nq" | \
|
|
gdb --quiet --core="$2" 2>&1)
|
|
echo "$dump" | head -2 | sed -ne '2,2s/\.$//p'
|
|
ls -l "$2" | \
|
|
awk '{ print "on", $6, $7, $8, "caused by", $3 }'
|
|
echo
|
|
echo "backtrace:"
|
|
echo "$dump" | sed -ne '/^(gdb) /s/^(gdb) //p'
|
|
;;
|
|
esac
|
|
}
|
|
#
|
|
# start of main
|
|
#
|
|
myname=$(basename "$0") # name of shell-script
|
|
mode=standard # normal mode of operation
|
|
|
|
case "$1" in
|
|
-h | --help)
|
|
disp_help
|
|
exit 1
|
|
;;
|
|
-v | --version)
|
|
echo "version 0.1.0"
|
|
exit 0
|
|
;;
|
|
-b | --brief)
|
|
mode=brief
|
|
shift
|
|
;;
|
|
-l | --long)
|
|
mode=long
|
|
shift
|
|
;;
|
|
-* | --*)
|
|
echo "$myname: unknown option $1"
|
|
exit 2
|
|
;;
|
|
esac
|
|
|
|
if [ -z "$1" ]; then
|
|
# no argument -> look at core in the current directory
|
|
get_name "$mode" core
|
|
else
|
|
# process all arguments
|
|
for c; do
|
|
# echo file we are processing
|
|
if [ "$mode" != "brief" ]; then
|
|
echo "$c: "
|
|
fi
|
|
get_name "$mode" "$c"
|
|
done
|
|
fi
|
|
exit 0
|
|
</PRE>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="mark"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Perl Script 2C Tip
|
|
</H3><P>
|
|
Date: Mon, 16 Mar 1998 15:46:25 +0000<BR>
|
|
From: Mark Hood, <A HREF="mailto:mark.hood@deep-thought.ericsson.se">
|
|
mark.hood@deep-thought.ericsson.se</A>
|
|
<P>
|
|
After seeing the "Keeping Track of Tips" suggestion in your October
|
|
issue, I thought it might be worth contributing this perl script which I
|
|
use in a similar way.
|
|
I have a user called 'info' and he has a .forward file consisting of the
|
|
following line:
|
|
<PRE>
|
|
"| /home/info/mail2web"
|
|
</PRE>
|
|
In the user's public_html folder, I created a file called index.html:
|
|
<PRE>
|
|
<HTML><HEAD><TITLE>Information Archive</TITLE></HEAD>
|
|
<BODY>
|
|
<TABLE>
|
|
<TR><TH>Subject</TH><TH>Date</TH><TH>From</TH></TR>
|
|
<!-- Add after here -->
|
|
</TABLE>
|
|
</BODY>
|
|
</HTML>
|
|
</PRE>
|
|
This allows me to simply mail directly to this user, and the tip is
|
|
instantly stored on the web page - no need for cron jobs or external C
|
|
programs to split the mail up.
|
|
<P>
|
|
This file is provided for free use, feel free to distribute or alter it
|
|
in any way.
|
|
Note that there is no warranty - it works for me, but that's all I can
|
|
say. In particular, I can't promise there are no security holes in it
|
|
(it never calls 'exec', so it's unlikely a cracker can subvert it on
|
|
your machine - and it's certainly no more dangerous than a shell script
|
|
run by cron).
|
|
<P>
|
|
Enjoy! Mark Hood
|
|
<PRE>
|
|
----- Cut here and save as mail2web -----
|
|
#!/usr/local/bin/perl
|
|
#
|
|
# mail2web (C) 1998 Mark A. Hood (mark.hood@usa.net)
|
|
#
|
|
# Takes a file (piped through it, eg. from a .forward file)
|
|
# And bungs it in a Web page.
|
|
# We have two html files:
|
|
# $index is the index file
|
|
# $stem is the base name of the information files - the date & time
|
|
# are appended to make it unique.
|
|
#
|
|
# The index file must exist and look like this (without the leading #
|
|
signs)
|
|
# The important bit is the <!-- Add after here --> comment - this script
|
|
# uses that to know where to put the new data...
|
|
#
|
|
# <HTML><HEAD><TITLE>Information Archive</TITLE></HEAD>
|
|
# <BODY>
|
|
# <TABLE>
|
|
# <TR><TH>Subject</TH><TH>Date</TH><TH>From</TH></TR>
|
|
# <!-- Add after here -->
|
|
# </TABLE>
|
|
# </BODY>
|
|
# </HTML>
|
|
|
|
# Variables - change these to match your system
|
|
|
|
$index = "/home/info/public_html/index.html";
|
|
$stem = "/home/info/public_html/";
|
|
|
|
# Nothing below this line should need changing
|
|
|
|
# Define the time and date
|
|
|
|
($sec,$min,$hour,$mday,$mon,$syear,$wday,$yday,$isdst) = localtime;
|
|
|
|
$year = 1900 + $syear;
|
|
|
|
# Add the time and date to the end of the filestem
|
|
|
|
$stem = sprintf ("%s%02d%02d%02d%02d%02d%02d.html",
|
|
$stem, $year, $mon, $mday, $hour, $min, $sec);
|
|
|
|
# Open the new file
|
|
|
|
open ( OUTFILE, ">$stem") ;
|
|
|
|
# Write the HTML header
|
|
print OUTFILE "<HTML><HEAD><TITLE>\n";
|
|
|
|
$printing = 0;
|
|
$from = "nobody";
|
|
$date = "never";
|
|
$title = "Untitled";
|
|
|
|
while ($line = <>) {
|
|
if ($line =~ s/^From: (.*)$/$1/g) { # Sender
|
|
$from = $line;
|
|
} elsif ($line =~ s/^Date: (.*)$/$1/g) { # Date
|
|
$date = $line;
|
|
} elsif ($line =~ s/^Subject: (.*)$/$1/g) { # Subject
|
|
$title = $line;
|
|
print OUTFILE $title;
|
|
print OUTFILE "</TITLE><BODY><PRE>";
|
|
} elsif ($line =~ /^$/ && $printing == 0) { # End of headers
|
|
$printing = 1; # Show the info.
|
|
print OUTFILE "From: " . $from;
|
|
print OUTFILE "Date: " . $date;
|
|
print OUTFILE "Subject: " . $title . "\n";
|
|
}
|
|
$line =~ s/\</\<\;/g; # Mask out
|
|
specials
|
|
$line =~ s/\>/\>\;/g;
|
|
|
|
if ($printing) {
|
|
print OUTFILE $line;
|
|
}
|
|
|
|
}
|
|
|
|
print OUTFILE "</PRE></BODY></HTML>"; # Finish the
|
|
HTML
|
|
|
|
close OUTFILE; # Close the file
|
|
|
|
$newfile = sprintf("%s.new", $index); # Backups
|
|
$oldfile = sprintf("%s.old", $index);
|
|
open ( INFILE, "$index");
|
|
|
|
while ($line = <INFILE>) {
|
|
if ($line =~ /^\<\!-- Add after here --\>/ ) { # Our marker
|
|
print OUTFILE "<TR><TD>";
|
|
print OUTFILE "<A HREF=\"" . $stem . "\">";
|
|
print OUTFILE $title . "</A></TD>";
|
|
print OUTFILE "<TD>" . $date . "</TD>";
|
|
print OUTFILE "<TD>" . $from . "</TD></TR>\n";
|
|
}
|
|
|
|
print OUTFILE $line;
|
|
}
|
|
rename ($index, $oldfile); # Backup the
|
|
current
|
|
rename ($newfile, $index); # Move the new
|
|
one
|
|
----- Cut here ----- Cut here ----- Cut here ----- Cut here -----
|
|
</PRE>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="john2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
rxvt 0.02$ tip
|
|
</H3><P>
|
|
Date: Sun, 15 Mar 1998 17:21:26 -0500 (EST)<BR>
|
|
From: John Eikenberry [MSAI], <A HREF="mailto:jae@ai.uga.edu">
|
|
jae@ai.uga.edu</A>
|
|
<P>
|
|
Recently I hacked together a little shell script for some friends of mine
|
|
that I thought others might find of interest. It allows you to run rxvt
|
|
with a random pixmap put in the background. The random pixmap is taken
|
|
from a directory, thus no hard coding of pixmap names in the shell script.
|
|
<P>
|
|
Well, here it is... oh, this is using bash btw...
|
|
<PRE>
|
|
----start----
|
|
#!/bin/sh
|
|
run_rxvt ()
|
|
{
|
|
shift $((RANDOM%$#))
|
|
exec rxvt -pixmap ~/.pixmaps/$1
|
|
}
|
|
run_rxvt `ls ~/.pixmaps/`
|
|
</PRE>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="john3"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Tiny patch to ifconfig
|
|
</H3><P>
|
|
Date: Fri, 06 Feb 1998 23:12:02 -0600 <BR>
|
|
From: John Corey, <A HREF="mailto:kunglao@prairienet.org">
|
|
kunglao@prairienet.org</A>
|
|
<P>
|
|
I've often wondered just how much data I've transmitted through my
|
|
network. After a little research, I found that the ifconfig program
|
|
just simply does not display this bit of information in it's results.
|
|
So, I've fixed that problem.
|
|
<P>
|
|
To install, first get the sources from your favorite sunsite mirror.
|
|
The file to look for is net-tools-1.432.tar.gz. I found it at
|
|
ftp://ftp.cc.gatech.edu/pub/linux/distributions/slackware/source/n/tcpip/net-tools-1.432.tar.gz
|
|
<P>
|
|
Unpack those sources, apply the patch with patch < ifconfig.diff, and
|
|
compile. I only modify the ifconfig program, so just simply backup your
|
|
existing binary, then install the newly compiled one (assuming you
|
|
already have this version of net-tools installed). Here is an example
|
|
of the new output:
|
|
<PRE>
|
|
eth0 Link encap:Ethernet HWaddr 00:40:F6:A4:8E:73
|
|
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
|
|
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
|
RX packets:99773 errors:0 dropped:0 overruns:0 frame:0
|
|
TX packets:91834 errors:0 dropped:0 overruns:0 carrier:0
|
|
coll:6
|
|
RX bytes: 20752805 (19.7 Mb) TX bytes: 27982763 (26.6 Mb)
|
|
Interrupt:9 Base address:0x280
|
|
</PRE>
|
|
<PRE>
|
|
Content-Type: text/plain; charset=us-ascii; name="ifconfig.diff"
|
|
Content-Transfer-Encoding: 7bit
|
|
Content-Disposition: inline; filename="ifconfig.diff"
|
|
|
|
diff -c -r net-tools/ifconfig.c net-tools-patched/ifconfig.c
|
|
*** net-tools/ifconfig.c Tue Sep 23 15:05:24 1997
|
|
--- net-tools-patched/ifconfig.c Fri Feb 6 15:54:51 1998
|
|
***************
|
|
*** 190,195 ****
|
|
--- 190,196 ----
|
|
static void
|
|
ife_print(struct interface *ptr)
|
|
{
|
|
+ unsigned long rx, tx, short_rx, short_tx; char Rext[5], Text[5];
|
|
struct aftype *ap;
|
|
struct hwtype *hw;
|
|
int hf;
|
|
***************
|
|
*** 352,357 ****
|
|
--- 353,372 ----
|
|
ptr->stats.tx_packets, ptr->stats.tx_errors,
|
|
ptr->stats.tx_dropped, dispname, ptr->stats.tx_fifo_errors,
|
|
ptr->stats.tx_carrier_errors, ptr->stats.collisions);
|
|
+
|
|
+ /* MyMod */
|
|
+ rx = ptr->stats.rx_bytes; tx = ptr->stats.tx_bytes;
|
|
+ strcpy(Rext, ""); short_rx = rx * 10; short_tx = tx * 10;
|
|
+ if (rx > 1048576) { short_rx /= 1048576; strcpy(Rext, "Mb"); }
|
|
+ else if (rx > 1024) { short_rx /= 1024; strcpy(Rext, "Kb"); }
|
|
+ if (tx > 1048576) { short_tx /= 1048576; strcpy(Text, "Mb"); }
|
|
+ else if (tx > 1024) { short_tx /= 1024; strcpy(Text, "Kb"); }
|
|
+
|
|
+ printf(" ");
|
|
+ printf(NLS_CATGETS(catfd, ifconfigSet, ifconfig_tx,
|
|
+ "RX bytes: %lu (%lu.%lu %s) TX bytes: %lu (%lu.%lu %s)\n"),
|
|
+ rx, short_rx / 10, short_rx % 10, Rext,
|
|
+ tx, short_tx / 10, short_tx % 10, Text);
|
|
|
|
if (hf<255 && (ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
|
|
ptr->map.base_addr)) {
|
|
</PRE>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="bill"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Wanting HELP!
|
|
</H3><P>
|
|
Date: Wed, 04 Mar 98 13:35:24 -0500<BR>
|
|
From: Bill R. Williams, <A HREF="mailto:brw@BRW.ETSU.Edu">
|
|
brw@BRW.ETSU.Edu</A>
|
|
Status: RO
|
|
<P>
|
|
For anyone interested... IT'S FIXED! (*applause, cheering, etc.*)
|
|
On Fri, 27 Feb 98 14:16:13 -0500, I (Bill R. Williams) wrote:
|
|
<PRE>
|
|
...[snip]...<BR>
|
|
In the process of getting a System installed I upgraded from the
|
|
original CD-ROM install of (Intel) RedHat 4.2 to the new RedHat 5.0
|
|
CD-ROM. One of the significant items on this system is the mars-nwe
|
|
Netware emulator.
|
|
Under the RedHat 4.2 with mars-nwe 0.98pl8-1 the mars package ran fine,
|
|
but logged copious errors about there being "too many connections --
|
|
increase the number in config.h". But it ran, and I *liked* the way it
|
|
happily did Netware duties! (Especially the printer part.)
|
|
The *new* RedHat 5.0 with mars-nwe 0.99pl2-1 offered some very desirable
|
|
abilities, not the least of which is the move of some items (such as
|
|
number of connections) to the run-time config file (/etc/nwserv.conf
|
|
under RedHat, probably nw.ini on other distributions.) Now the bad
|
|
news...<BR>
|
|
...[snip]...<BR>
|
|
This new package spawns out nwconn processes with an empty parenthesis
|
|
as the last token instead of the USERID ('nwconn ... ()') until all
|
|
connection slots are eaten, and then, of course, will not recognize any
|
|
new attempts. Any users already logged into the nwserv(ice) are Ok.<BR>
|
|
...[snip]...<BR>
|
|
I have tried every combination of parameter twiddling in the run-time
|
|
config file that can think of, but to no avail.<BR>
|
|
...[snip]...<BR>
|
|
Anyone who has solved this problem, please share the secret.
|
|
</PRE>
|
|
BTW: I had regularly pulled in updates to everything from RedHat
|
|
errata. I was getting a bit gun shy about updating, because that's how
|
|
I got into the mess. :-) I had previously tried the "..pl2-3.rpm" when
|
|
it first appeared, but it died immediatly on startup so I went back to
|
|
the "..pl2-1.rpm" build which, at least, would run in spite of all the
|
|
problems I was having with it.
|
|
<P>
|
|
The breakthrough was inspired by a note I got when
|
|
On Mon, 02 Mar 1998 12:24:37 +0100, Trond Eivind Glomsrd wrote:
|
|
"Last: You have installed all items from the errata? The glibc updates
|
|
fixes a lot of bugs, at least."
|
|
<P>
|
|
So I made one more trip to the RH errata repository, and got the
|
|
absolute latest updates. There did happen to be a newer update of that
|
|
glibc which Tron had mentioned.
|
|
<P>
|
|
I applied the glibc updates and installed the mars-nwe 0.99pl2-3, and
|
|
this all seems to have fixed everything. Mars runs, and all the ugly
|
|
hangups and problems appear to be gone! It's a thing of beauty.
|
|
<P>
|
|
For those keeping score, here are the package levels which are
|
|
significant to running the mars-nwe on my RH 5.0 System:
|
|
<PRE>
|
|
kernel-2.0.32-2
|
|
mars-nwe-0.99pl2-3
|
|
glibc-2.0.6-9
|
|
</PRE>
|
|
It appears that the mixture of levels I had prior to this set just
|
|
did not synch up, and I suspect the the fix must have been in the new
|
|
glibc as Tron suggested it might be.
|
|
<P>
|
|
What a relief!
|
|
<P>
|
|
Bill R. Williams
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="kragen"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Help Wanted (usershell on console without logging in)
|
|
</H3><P>
|
|
Date: Mon, 23 Mar 1998 15:26:17 -0500 (EST)<BR>
|
|
From: Kragen, <A HREF="mailto:kragen@pobox.com">kragen@pobox.com</A>
|
|
<P>
|
|
Last month, there was a request by Todd Blake for some help:
|
|
<blockquote>
|
|
I like most people am the only person to use my linux system at home.
|
|
What I'd like to do is when my system is done booting to have me
|
|
automatically login as my main user account(not as root though) on one
|
|
virtual console(the first) and leave all other consoles and virtual
|
|
consoles alone,</blockquote>
|
|
<P>
|
|
I thought this was a good idea, so I tried to do it. Eventually, I
|
|
succeeded. The resulting software is at
|
|
http://www.pobox.com/~kragen/sw/usershell.html. Mr. Blake
|
|
reports that it is a good job.
|
|
<P>
|
|
Anyone else is welcome to it. I'll even help you if you have trouble
|
|
with it :)
|
|
<P>
|
|
Kragen
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="vivek"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
2 cent tip followup -- X
|
|
</H3><P>
|
|
Date: Tue, 24 Mar 1998 14:26:43 -0500<BR>
|
|
From: Vivek Khera, <A HREF="mailto:vivek@khera.org">vivek@khera.org</A>
|
|
<P>
|
|
In the March issue, you have a tip on using X programs when you've run
|
|
su to root. By far the easiest method is to simply
|
|
<PRE>
|
|
setenv XAUTHORITY ~khera/.Xauthority
|
|
</PRE>
|
|
for your own user name, of course... No need to run any other programs
|
|
or cut and paste anything.
|
|
<P>
|
|
I have my machines configured so that when someone becomes root, if the
|
|
file ~/.rootrc exists in their home directory, it is sourced as part of
|
|
the root's .cshrc file. In there, I put the above setenv command. I've
|
|
never had to think about it again (in nearly 5 years).
|
|
<P>
|
|
Hope this helps someone.
|
|
<P>
|
|
Vivek Khera, Ph.D.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="remco"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
locate patch
|
|
</H3><P>
|
|
Date: 24 Mar 1998 11:57:20 -0000<BR>
|
|
From: Remco Wouts, <A HREF="mailto:remco@xray.bmc.uu.se">
|
|
remco@xray.bmc.uu.se</A>
|
|
<P>
|
|
In the Linux Gazette number 26 (march) there was mention of a patch
|
|
for locate. The idea of the patch was to make it impossible to find
|
|
out the names of files in directories that you do not have access to.
|
|
<P>
|
|
Unfortunately this patch does not solve the problem at all. So I would
|
|
advise people not to use this patch, they could be lured into a false
|
|
sense of privacy. What is the problem and what is wrong with the
|
|
patch?
|
|
<P>
|
|
Locate allows you to find a file quickly. It does this by consulting a
|
|
database of filenames. Of course this way of finding a file is much
|
|
quicker then hunting for it in the file system. However, somebody has
|
|
to make the database. This is done with the program updatdb, usually
|
|
from a crontab every day or week. Updatdb can find all files that the
|
|
user id, it is running as, has access to. So if updatedb is run with
|
|
an id that has more access rights then the user who invokes the locate
|
|
command, this user can find out the names of files that he/she
|
|
otherwise could not find. The author of the locate patch solved the
|
|
problem simply by changing the locate command. Just before sending the
|
|
name of a file, it checks whether it exists and if so whether the
|
|
invoking user has read access. However you don't need to use the
|
|
locate command at all to read the file database. To make sure every
|
|
user, who invokes locate, can read it it is stored world readable. The
|
|
patch does not help at all to solve the privacy problem.
|
|
<P>
|
|
For the moment, if you are concerned about these privacy issues, you
|
|
should not run 'updatedb' at all, and remove the existing database.
|
|
Since locate & Co. are very handy utilities it is probably best to
|
|
leave things as they are and make sure updatedb is run by user nobody
|
|
from a crontab.
|
|
<P>
|
|
The next easiest solution would be to make the database created by
|
|
updatedb readable by root only, and change locate to a setuid program
|
|
which consults the database as root and checks for permissions. I
|
|
will leave that as a challenge to the author of the patch.
|
|
<P>
|
|
Happy Linuxing.<BR>
|
|
-- Remco Wouts
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="padraig"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
locate subdirectories
|
|
</H3><P>
|
|
Date: Thu, 26 Mar 1998 17:02:22 +0000 (GMT)<BR>
|
|
From: <A HREF="mailto:Padraig.Finnerty@acm.org">
|
|
Padraig.Finnerty@acm.org</A>
|
|
<P>
|
|
in a large directory of files it is sometimes hard to locate the
|
|
subdirectories. to do this you can tag the directories with a '/'
|
|
(using ls -F) and then grep these out...
|
|
<PRE>
|
|
ls -F |grep /$
|
|
</PRE>
|
|
or even better..
|
|
<PRE>
|
|
alias sub="ls -F |grep /$"
|
|
</PRE>
|
|
Padraig
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<center>Published in <I>Linux Gazette</I> Issue 27, April 1998</center>
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
|
|
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail27.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
|
|
<A HREF="./lg_bytes27.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
|
|
<P> <hr> <P>
|
|
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
|
|
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
|
|
Copyright © 1998 Specialized Systems Consultants, Inc. </H5>
|
|
<P>
|
|
<!--startcut ==========================================================-->
|
|
</body>
|
|
</html>
|
|
<!--endcut ============================================================-->
|