1420 lines
52 KiB
HTML
1420 lines
52 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<title>More 2 Cent Tips & Tricks LG #34</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_tips34.html#snider">
|
|
No Linux support Lexmark 40 printers
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#Pospisek">
|
|
The Mailbag: Re: text browsers
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#mcnamara">
|
|
RE: Problem mounting vfat filesystem ...
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#greene">
|
|
Re: Linux Newbie
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#marshall">
|
|
Locally Searching the <I>Linux Gazette</I>
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#matthews">
|
|
Re: Problem mounting vfat filesystem
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#young">
|
|
Mounting DOS Partitions in Linux
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#smith1">
|
|
Re: Canon BJC-250 question
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#smith2">
|
|
Re: Help : Modem + HP
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#westley">
|
|
Gnat and Linux: C++ and Java Under Fire LG #33
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#hammel1">
|
|
Re: Canon BJC-250 question
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#carlson">
|
|
re: problem mounting vfat filesystem
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#downs">
|
|
SMB Printing for users with spaces in their SMB username
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#baader">
|
|
2 Cent Tip -- Netscape
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#leach">
|
|
Cobol
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#csmith">
|
|
Piped Signatures
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#siew1">
|
|
Fixing backspace and delete Key in X-windows
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#siew2">
|
|
Creating bzgrep Program
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#hammel2">
|
|
Re: Linux on PalmPilot
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#brais">
|
|
Red Hat 5.1 + Acrobat Reader 3.01 HOWTO
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#poel">
|
|
2 $.25 tips
|
|
</a>
|
|
<li><a HREF="./lg_tips34.html#jalics">
|
|
S3 Virge/DX and XFree
|
|
</a>
|
|
</ul>
|
|
|
|
<P> <HR> <P>
|
|
<!--====================================================================-->
|
|
<a name="snider"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
No Linux support Lexmark 40 printers
|
|
</H3>
|
|
Date: Thu, 15 Oct 1998 12:18:37 -0600 (MDT)<BR>
|
|
From: "D. Snider", <A HREF="mailto:dsnider@nmia.com">dsnider@nmia.com</A>
|
|
<P>
|
|
For your information:<BR>
|
|
The Lexmark 40 color printers do all setup/alignment from MS whatever OS.
|
|
<P>
|
|
Lexmark first told me they don't support Linux
|
|
on their new 40 & 45 printers (all alignment functions are from software
|
|
under MS something). But hey, the guys at Lexmark came through. They sent me a
|
|
<A HREF="./tips_cartutil.c">C program</A> for aligning the printer.
|
|
<P>
|
|
It would be a good candidate to go into an archive (sunsite.unc.edu). I
|
|
don't know the process for putting software into an archive so I am
|
|
passing it on to you folks. I also am sending it to Grant Taylor
|
|
gtaylor+pht@picante.com, who is listed as the custodian of the
|
|
Printing-HOWTO. The model 40 printer is PostScript and works well.
|
|
<P>
|
|
Cheers<BR>
|
|
Dale
|
|
|
|
<!--================================================================-->
|
|
|
|
<a name="pospisek"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
The Mailbag: Re: text browsers
|
|
</H3>
|
|
Date: Mon, 05 Oct 1998 19:46:43 +0200<BR>
|
|
From: Tomas Pospisek - Sysadmin, <A HREF="mailto:tpo@spin.ch">
|
|
tpo@spin.ch</A>
|
|
<blockquote> <font color="navy">
|
|
User has problems with <B>, that is not visible in lynx.
|
|
</font></blockquote>
|
|
Well, this is not the problem of the page, but a problem of lynx
|
|
configuration. At the bottom of the default lynx config file one can
|
|
configure the colors for the display of the different tags as one
|
|
wishes. It is very clear from the comments in the config file on how to
|
|
do it. One can start lynx with an option <tt>lynx -f config.file</tt> if I
|
|
remember right.
|
|
<P>
|
|
Tomas
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="mcnamara"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: Problem mounting vfat filesystem ...
|
|
</H3>
|
|
Date: Mon, 05 Oct 1998 10:13:54 +0100 (IST)<BR>
|
|
From: Caolan McNamara, <A HREF="mailto:Caolan.McNamara@ul.ie">
|
|
Caolan.McNamara@ul.ie</A>
|
|
<blockquote> <font color="navy">
|
|
Jan Jansta wrote...<BR>
|
|
I have permanent problem with mounting any vfat/dos filesystem with write
|
|
permisions for all users on my Linux machine. I'm using
|
|
Red Hat 5.1, kernel version 2.0.34 .
|
|
Does someone know what's not working properly ?
|
|
</font></blockquote>
|
|
Here's what I've done. The exact line from my /etc/fstab:
|
|
<PRE>
|
|
/dev/hda1 /mnt/win95 vfat umask=000,auto 1 1
|
|
</PRE>
|
|
The trick is in setting the umask.
|
|
Caolan
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="greene"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Linux Newbie
|
|
</H3>
|
|
Date: Sat, 03 Oct 1998 12:59:16 +0200<BR>
|
|
From: "Anthony E. Greene", <A HREF="mailto:agreene@pobox.com">
|
|
agreene@pobox.com</A>
|
|
<P>
|
|
I saw your letter to Linux Gazette and decided to drop you a few pointers.
|
|
<P>
|
|
Linux Documentation Project: <BR>
|
|
First, the Linux Documentation Project is your friend. Take a look around
|
|
the site <A
|
|
HREF="http://sunsite.unc.edu/LDP/">http://sunsite.unc.edu/LDP/</A>. The documents that you'll find most
|
|
valuable as a new Linux user are the "Installation and Getting Started
|
|
Guide" and the "The Linux Users' Guide". Both are available for download in
|
|
multiple formats. Descriptions and pointers are at
|
|
http://sunsite.unc.edu/LDP/ldp.html. If you really consider yourself (or
|
|
your curious friends) clueless, then I'd advise you to buy a ream of paper
|
|
and print the PDF version of the Linux User's Guide for casual reading.
|
|
Then get one of the easier distributions, back up your Win95 data, and give
|
|
Linux a whirl.
|
|
<P>
|
|
Linux Distributions:<BR>
|
|
I'd recommend Caldera <A
|
|
HREF="http://www.caldera.com/">http://www.caldera.com/</A> for casual non-programmers
|
|
that are comfortable with Win95 and just want to try Linux. Current
|
|
versions of Caldera come with the KDE desktop <A
|
|
HREF="mailto:http://www.kde.org/">http://www.kde.org/</A>. KDE
|
|
presents a familiar interface to Win95 users. Red Hat
|
|
<A HREF="http://www.redhat.com/">http://www.redhat.com/</A> is very popular and also relatively easy but is
|
|
oriented more toward knowledgeable computer users. I'm not familiar enough
|
|
with SUSE <A HREF="http://www.suse.com/">http://www.suse.com/</A> to make a recommendation, although it's
|
|
supposed to be easy too. Debian <A
|
|
HREF="http://www.debian.org/">http://www.debian.org/</A> and Slackware
|
|
<A HREF="http://www.slackware.org/">http://www.slackware.org/</A> are considered by most to be for those who
|
|
already know how to install and use Linux. There are other distributions,
|
|
but these are the most popular.
|
|
<P>
|
|
Included Documentation:<BR>
|
|
Once you get Linux installed, fire up Midnight Commander from the command
|
|
line using 'mc'. This is an easy to use file manager that, despite its DOS
|
|
look & feel, is also powerful. Use it to take a look around the /usr/doc
|
|
directory for the wealth of documentation installed in any popular Linux
|
|
system. You'll be astounded at the amount of information available if
|
|
you're accustomed to the Win95 way of doing things. The HOWTO documents in
|
|
particular will be very useful to new users. HOWTOs are cookbook-style
|
|
documents written by Linux users who have taken the time to share the steps
|
|
they took to accomplish something in Linux. Perhaps if you use Linux for a
|
|
while, you'll have occasion to write a HOWTO of your own.
|
|
<P>
|
|
Manual Pages<BR>
|
|
If you see references to a command in Linux and would like to know more
|
|
about using it, chances are you'll find a comprehensive description of the
|
|
command and all its options in the associated Manual Page. Just type: 'man
|
|
command' at the command line, substituting the name of the command you're
|
|
interested in and you'll be presented with a summary of the syntax, usage,
|
|
and available options for the command. Many man pages also include examples
|
|
and references to related man pages and commands. To see how to use the
|
|
manual page system itself, just use 'man man'.
|
|
<P>
|
|
Mailing Lists and Newsgroups<BR>
|
|
Mailing lists and newsgroups provide a good way to find the answer to a
|
|
question you haven't been able to find the answer to in the extensive
|
|
documentation included with Linux or available from the LDP. Mailing lists
|
|
are generally archived and the archives will probably be able to answer
|
|
your question. If not, post a note asking for a pointer to the
|
|
documentation and you'll probably get several good answers. If the problem
|
|
is simple enough, you'll probably get an explanation too. I've found
|
|
pointers to comprehensive documentation to be more valuable in the long run
|
|
though. Often, understanding the solution to one problem allows you to
|
|
solve other problems later. When subscribing to a mailing list or
|
|
newsgroup, try to find one that's specific to the distribution you use.
|
|
Most things are the same across distributions, but there are enough small
|
|
differences that new users would be best served by getting help that's
|
|
specific to their distribution.
|
|
<P>
|
|
One more thing; be prepared to do lots of reading. ;-)
|
|
<P>
|
|
--<BR>
|
|
Anthony E. Greene
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="marshall"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Locally Searching the <I>Linux Gazette</I>
|
|
</H3>
|
|
Date: Sat, 3 Oct 1998 01:33:17 -0400 (EDT)<BR>
|
|
From: Ray Marshall, <A HREF="mailto:raym@vnet.net">raym@vnet.net</A>
|
|
<P>
|
|
To begin with, I often like to browse and/or reference present and past
|
|
issues of the <I>Linux Gazette</I>. But, since I'm not always connected to the
|
|
Internet, and even when I am, I hate waiting for a page to download; I
|
|
mirror it locally, both at home, and at work.
|
|
<P>
|
|
On occasion I have found myself grepping the TWDT files for specific
|
|
references to various topics, commands, packages, or whatever. But,
|
|
just a plain grep of lg/issue??/issue??.html, will only show references
|
|
in all but the first 8 issues. So, I made some minor changes in
|
|
lg/issue01to08, and put an alias (command) in ~/.bashrc, to allow easy
|
|
scanning of ALL issues.
|
|
<P>
|
|
First, the changes:
|
|
<PRE>
|
|
cd ~/html/lg/issue01to08
|
|
ln linux_gazette.html lg_issue1.html
|
|
ln linux_gazette.aug.html lg_issue2.html
|
|
ln linux_gazette.sep.html lg_issue3.html
|
|
ln linux_gazette.oct.html lg_issue4.html
|
|
ln linux_gazette.nov.html lg_issue5.html
|
|
</PRE>
|
|
Now the command declaration (for bash):
|
|
<PRE>
|
|
lgfind () { command grep -i ""$@"" ~/html/lg/issue01to08/lg_issue?.html ~/html/lg/issue??/issue??.html | more ; }
|
|
</PRE>
|
|
The same declaration in C-shell (csh):
|
|
<PRE>
|
|
alias lgfind 'grep -i ""\!*"" ~/html/lg/issue01to08/lg_issue?.html ~/html/lg/issue??/issue??.html | more'
|
|
</PRE>
|
|
I suppose I could have used "linux_gazette*" in my grep, but that would
|
|
have put the resulting output out of order. Besides, these links allow
|
|
the grep to show which issue number a match is found in.
|
|
<P>
|
|
And I suppose I could also have created either soft or hard links to ALL
|
|
of the TWDT files in another directory. But I would then have to go there
|
|
and add another link, every time a new issue came out.
|
|
<P>
|
|
Using this is simple, just:
|
|
<PRE>
|
|
lgfind <string>
|
|
</PRE>
|
|
and obvious to most experienced UNIX users, I quote the string if it
|
|
contains spaces. Also, the string can be a regex expression. You may
|
|
have noticed the "-i" -- I don't like having to remember the case of
|
|
the characters I'm looking for.
|
|
<P>
|
|
Once I have the output of lgfind, I point my browser to another html page
|
|
that I have generated, that contains just links to all of the TWDT files.
|
|
I will attach that page to this message. You can either add it to the
|
|
base files, publish it, or whatever TYO. ;-) I put it in the directory
|
|
that contains your `lg' directory.
|
|
<P>
|
|
I hope this helps someone else, too.
|
|
<P>
|
|
Ray Marshall
|
|
<P>
|
|
PS: I agree with your decision to use "TWDT". It can be read in whatever
|
|
way one wishes, including very inoffensively. Wise choice.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="matthews"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Problem mounting vfat filesystem
|
|
</H3>
|
|
Date: Fri, 02 Oct 1998 21:48:55 +0000<BR>
|
|
From: Nick Matthews, <A HREF="mailto:jerrikthyne@geocities.com">
|
|
jerrikthyne@geocities.com</A>
|
|
<P>
|
|
<blockquote> <font color="navy">
|
|
From: Jan Jansta<BR>
|
|
I have a permanent problem with mounting any vfat/dos filesystem with
|
|
write permissions for all users >on my Linux
|
|
machine. I'm using Red Hat 5.1, kernel version 2.0.34
|
|
Does someone know what's not working properly ?
|
|
</font></blockquote>
|
|
<P>
|
|
I had somewhat the same problem. What I did was to put this in my
|
|
<PRE>
|
|
/etc/fstab:
|
|
/dev/hda1 /dos vfat user,noauto 0
|
|
0
|
|
</PRE>
|
|
I don't always want my /dos partition mounted, because I don't want its
|
|
files cluttering up my db for locating files. But making it a user
|
|
partition means that anyone can mount and use it.
|
|
<P>
|
|
Good luck,<BR>
|
|
Nick
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="young"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Mounting DOS Partitions in Linux
|
|
</H3>
|
|
Date: Fri, 02 Oct 1998 17:08:23 -0400<BR>
|
|
From: Ed Young, <A HREF="mailto:youngej@magpage.com">
|
|
youngej@magpage.com</A>
|
|
<P>
|
|
Secure Mounting for DOS Partitions:
|
|
<P>
|
|
In order to open up permissions on your DOS partitions in a
|
|
secure way, do the following:
|
|
<P>
|
|
Note: in the samples below, the dos usrid (63) and grpid(63)
|
|
were selected so they wouldn't duplicate any other
|
|
usrid or grpid in /etc/passwd or /etc/group.
|
|
<P>
|
|
Also, this solution works with Red Hat 5.1, you may
|
|
have to adjust it slightly if you are using a
|
|
different distribution.
|
|
<P>
|
|
1) Make a dos user who can't log in by adding the following
|
|
line to /etc/passwd:
|
|
dos:*:63:63:MSDOS Accessor:/dos:
|
|
<P>
|
|
2) Make a dos group and add users to the dos group. In the
|
|
following example, root and ejy are in the dos group. To
|
|
do this, add a line like the following to /etc/group:
|
|
dos::63:root,ejy
|
|
<P>
|
|
3) Add the following line (changed to suit your system) to
|
|
<PRE>
|
|
/etc/fstab:
|
|
/dev/hda1 /C vfat uid=63,gid=63,umask=007 0 0
|
|
</PRE>
|
|
Of course, you have to locate your DOS partitions in the
|
|
first place. This is done by issuing the following
|
|
commands as 'root':
|
|
<PRE>
|
|
/sbin/fdisk -l
|
|
df
|
|
cat /etc/fstab
|
|
</PRE>
|
|
The `fdisk -l` command lists all available devices. `df`
|
|
shows which devices are mounted and how much is on them.
|
|
And /etc/fstab lists all mountable devices. The devices
|
|
remaining are extended partitions, a kind of a partition
|
|
envelope, which you don't want to mount. And the
|
|
partition's allocated to other operating systems which you
|
|
may want to mount.
|
|
<P>
|
|
4) Create a mount point for your DOS disk by issuing the
|
|
following commands as root:
|
|
mkdir /C
|
|
chown dos:dos /C
|
|
<P>
|
|
With this setup, the C: drive is mounted at boot time to /C.
|
|
Only root and ejy can read and write to it. Note that vfat
|
|
in /etc/fstab works for vfat16 (and vfat32 natively for
|
|
Linux 2.0.34 and above).
|
|
<P>
|
|
Enjoy...
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="smith1"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Canon BJC-250 question
|
|
</H3>
|
|
Date: Fri, 2 Oct 1998 21:32:20 +0200 (CEST)<BR>
|
|
From: <A HREF="mailto:rsmith@xs4all.nl">rsmith@xs4all.nl</A> <BR>
|
|
<blockquote> <font color="navy">
|
|
In issue 33 of the Linux Gazette you wrote:<BR>
|
|
I have a Canon BJC-250 color printer. I have heard many people say that
|
|
the BJC-600 printer driver will let me print in color. But I have not
|
|
heard anyone say where I can get such a driver. I have looked everywhere
|
|
but where it is. Can you help me?
|
|
</font></blockquote>
|
|
When people are talking about printer drivers for Linux, they are
|
|
mostly referring to a piece of code that enables the "Ghostscript"
|
|
program to produce output on your printer.
|
|
<P>
|
|
Ghostscript is an interpreter of the Postscript page-description
|
|
language. In the Unix world, it is kind of a lingua franca of talking to
|
|
a printer. A lot of programs can produce Postscript output.
|
|
<P>
|
|
More expensive printers support Postscript in hardware, other printers
|
|
need Ghostscript with a driver for that particular printer compiled in.
|
|
<P>
|
|
Invoke Ghostscript as "gs -?" to see a list of all the printers for
|
|
which support is compiled in. If your printer is not in the list, use a
|
|
driver for a printer from the same family. Otherwise you might have to
|
|
compile GhostScript with another driver.
|
|
<P>
|
|
The Ghostscript 5.1 that I'm using (Debian distro) is compiled with the
|
|
bjc600 driver.
|
|
<P>
|
|
Roland
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="smith2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Help : Modem + HP
|
|
</H3>
|
|
Date: Fri, 2 Oct 1998 21:20:58 +0200 (CEST)<BR>
|
|
From: Roland Smith, <A HREF="mailto:rsmith@xs4all.nl">
|
|
rsmith@xs4all.nl</A>
|
|
<blockquote> <font color="navy">
|
|
In issue 33 of the Linux Gazette you wrote:<BR>
|
|
I have already spent hours trying to fix my Supra336 PnP internal modem
|
|
and my HP DeskJet 720C under Linux! The result is always the same, no
|
|
communication with teh modem and no page printed on the HP printer!
|
|
Could someone help me, I am close to abandon!
|
|
</font></blockquote>
|
|
To use a Plug-and-Play device under Linux, you have to configure it.
|
|
For that, you can use isapnptools package. It will probably be included
|
|
with your distribution.
|
|
<P>
|
|
Log in as root, and execute the command "pnpdump >isapnp.conf"
|
|
Now edit this file to choose sensible values for the parameters the
|
|
modem requires. Read the isapnp.conf man page. You might want to do
|
|
"cat /proc/interrupts", "cat /proc/dma" and "cat /proc/ioports" to see
|
|
which interrupts, DMA channels and I/O addresses are already in use.
|
|
Once you're finished. copy the isapnp.conf file to /etc (as root). You
|
|
can now configure the card by issuing the command "isapnp
|
|
/etc/isapnp.conf" as root.
|
|
<P>
|
|
This probably must be done before the serial ports are configured. Look
|
|
at the init(8) manpage, and see where the serial ports are configured in
|
|
the system initialization scripts. Make sure that isapnp is called
|
|
before the serial ports are configured.
|
|
<P>
|
|
If the modem is an internal one, you might have to disable one of the
|
|
serial ports in your BIOS, so the modem can use in's address and
|
|
interrupt.
|
|
<P>
|
|
Now, about the printer, AFIAK all HP *20 models are Windows-only
|
|
printers. They use the host computer's CPU to perform all kinds of
|
|
calculations that are normally done by the printer hardware. Therefore
|
|
it needs a driver. Since HP doesn't release programming info on these
|
|
devices, there will probably never be Linux drivers for these printers.
|
|
<P>
|
|
You should avoid this kind of brain-dead hardware (mostly referred to as
|
|
"winprinters", or "winmodems").
|
|
<P>
|
|
Hope this helps :-)
|
|
<P>
|
|
Roland
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="westley"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Gnat and Linux: C++ and Java Under Fire LG #33
|
|
</H3>
|
|
Date: Fri, 2 Oct 1998 14:47:46 -0400<BR>
|
|
From: "Terry Westley", <A HREF="mailto:twestley@buffalo.veridian.com">
|
|
twestley@buffalo.veridian.com</A>
|
|
<P>
|
|
If you want the best of both worlds of Java and Ada,
|
|
write applets targeted to the JVM in Ada! See these
|
|
URLs for further info:
|
|
<P>
|
|
http://www.adahome.com/Resources/Ada_Java.html
|
|
http://www.buffnet.net/~westley/AdaJava/
|
|
<P>
|
|
--<BR>
|
|
Terry J. Westley
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="hammel1"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Canon BJC-250 question
|
|
</H3>
|
|
Date: Fri, 2 Oct 1998 10:21:52 -0500 (CDT)<BR>
|
|
From: <A HREF="mailto:mhammel@graphics-muse.org">
|
|
mhammel@graphics-muse.org</A> <BR>
|
|
<blockquote> <font color="navy">
|
|
You asked:<BR>
|
|
I have a Canon BJC-250 color printer. I have heard many people say that the
|
|
BJC-600 printer driver will let me print in color. But I have not heard
|
|
anyone say where I can get such a driver. I have looked everywhere but where
|
|
it is. Can you help me?
|
|
</font></blockquote>
|
|
Most printing on Linux is handled through the use of the Ghostscript
|
|
drivers. Ghostscript takes postscript input directed to it via the lpr command
|
|
and converts it to the raw data streams that a particular output device can
|
|
handle. Ghostscript can handle devices like printers but can also be used
|
|
to display postscript files to your display (via the ghostview program).
|
|
<P>
|
|
To see if you have ghostscript installed, type the following:
|
|
<PRE>
|
|
% gs -v
|
|
</PRE>
|
|
"gs" is the command name for the ghostscript program (yes, it's really a
|
|
program that has a bunch of output drivers compiled into it). The -v
|
|
option asks it to print version information. If you have gs installed
|
|
you'll see something like this:
|
|
<PRE>
|
|
Aladdin Ghostscript 4.03 (1996-9-23)
|
|
Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA. All rights
|
|
reserved.
|
|
Usage: gs [switches] [file1.ps file2.ps ...]
|
|
Most frequently used switches: (you can use # in place of =)
|
|
-dNOPAUSE no pause after page | -q `quiet', fewer messages
|
|
-g<width>x<height> page size in pixels | -r<res> pixels/inch resolution
|
|
-sDEVICE=<devname> select device | -c quit (as the last switch)
|
|
| exit after last file
|
|
-sOutputFile=<file> select output file: - for stdout, |command for pipe,
|
|
embed %d or %ld for page #
|
|
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
|
|
Available devices:
|
|
x11 x11alpha x11cmyk x11mono deskjet djet500 laserjet ljetplus ljet2p
|
|
ljet3 ljet4 cdeskjet cdjcolor cdjmono cdj550 pj pjxl pjxl300 bj10e bj200
|
|
bjc600 bjc800 faxg3 faxg32d faxg4 pcxmono pcxgray pcx16 pcx256 pcx24b pbm
|
|
pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw tiffcrle tiffg3
|
|
tiffg32d tiffg4 tifflzw tiffpack tiff12nc tiff24nc psmono bit bitrgb
|
|
bitcmyk pngmono pnggray png16 png256 png16m pdfwrite nullpage
|
|
Search path:
|
|
. : /usr/openwin/lib/X11/fonts/Type1 : /usr/openwin/lib/X11/fonts/Type3 :
|
|
/opt/AEgs/share/ghostscript/4.02 : /opt/AEgs/share/ghostscript/fonts
|
|
For more information, see /opt/AEgs/share/ghostscript/4.02/doc/use.txt.
|
|
Report bugs to ghost@aladdin.com; use the form in new-user.txt.
|
|
</PRE>
|
|
(the dashed lines are just to delimit the output from my email message)
|
|
<P>
|
|
This output comes from a version of ghostscript built for a Solaris system
|
|
by someone other than myself. I don't know if this is the default set of
|
|
devices you'll see on a Linux distribution or not.
|
|
<P>
|
|
The "available devices" say which devices you can use with gs. In this
|
|
case the bubble jet 250 is not specifically listed (I suspect it would say
|
|
bjc250, but I could be wrong), so I would (if I were using that particular
|
|
printer) have to get the source and read the devices.txt file to find out if
|
|
this printer is supported, either by its own driver or by one of the other
|
|
drivers (perhaps the bjc600 supports it, for example).
|
|
<P>
|
|
This is the short explanation. To summarize, you'll need to familiarize
|
|
yourself with Ghostscript and using lpr. If you're lucky and this printer
|
|
is commonly supported by the various Linux distributions then you may
|
|
already have this printer configured in the ghostscript you have installed
|
|
on your box.
|
|
<P>
|
|
For information on Ghostscript you'll need to look at the Ghostscript FAQ
|
|
at <A
|
|
HREF="http://www.cs.wisc.edu/~ghost/gsfaq.html">http://www.cs.wisc.edu/~ghost/gsfaq.html</A>.
|
|
Note that there are two
|
|
versions of Ghostscript: Aladdin's and the GNU version. Aladdin's is a
|
|
commercial product but it's free for personal use. If you're not planning
|
|
on redistributing it then I recommend the Aladdin version.
|
|
<P>
|
|
Okay, that's all the good news. I just checked the devices list at
|
|
<A HREF="http://www.cs.wisc.edu/~ghost/aladdin/devices.html">
|
|
http://www.cs.wisc.edu/~ghost/aladdin/devices.html</A> and it doesn't list the
|
|
Canon Color Bubble Jet 250. If this printer is supported it's either with a
|
|
newer, unlisted driver or by one of the other drivers. You'll probably
|
|
need to check the .txt files that come with the source, find the author of
|
|
the Color Bubble Jet drivers and drop them a line to see if they know if
|
|
this printer will work with one of the existing drivers.
|
|
<P>
|
|
Hope that helps point you in the right direction.
|
|
<P>
|
|
Michael J. Hammel,
|
|
The Graphics Muse
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="carlson"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
re: problem mounting vfat filesystem
|
|
</H3>
|
|
Date: Fri, 2 Oct 1998 08:20:38 -0500 (CDT)<BR>
|
|
From: Scott Carlson, <A HREF="mailto:scottcarlson@technologist.com">
|
|
ScottCarlson@technologist.com</A>
|
|
<P>
|
|
Jan, <BR>
|
|
My /etc/fstab contains this line:
|
|
<PRE>
|
|
/dev/hda4 /f: vfat defaults,umask=007,gid=101 1 1
|
|
</PRE>
|
|
This mounts my dos directory at /f: ( to match when I boot NT ) it allows
|
|
root, or anyone in the group 101 to read or write the directory. I set up
|
|
the 101 group so I could say only people in that group could write to /f:
|
|
<P>
|
|
To allow everyone change it to defaults,umask=000
|
|
<P>
|
|
Scott Carlson
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="downs"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
SMB Printing for users with spaces in their SMB username
|
|
</H3>
|
|
Date: Tue, 06 Oct 98 14:31:42 -0800<BR>
|
|
From: <A HREF="mailto:vwdowns@bigfoot.com">vwdowns@bigfoot.com</A> <BR>
|
|
<P>
|
|
In order to get SMB printing to work under Red Hat Linux 5.1
|
|
with my username
|
|
(which has a single space in it), I made the following
|
|
addition to the Red Hat print filter "smbprint", located in:
|
|
/usr/lib/rhs/rhs-printfilters/smbprint
|
|
<PRE>
|
|
USER="`echo $usercmd | awk '{printf "%s %s", $2,
|
|
$3}'`"%$password
|
|
usercmd=""
|
|
</PRE>
|
|
(The above lines were inserted just prior to the last line
|
|
in the script, which on my
|
|
system was):
|
|
<PRE>
|
|
(echo "print -"; cat) | /usr/bin/smbclient "$share"
|
|
$password -E ${hostip:+-I} $hostip -N -P $usercmd
|
|
2>/dev/null
|
|
</PRE>
|
|
This has the effect of setting the USER variable to "User
|
|
Name"%password, where User Name is the name of the user as
|
|
passed in to the script in the $usercmd varible. AWK is used
|
|
to strip out the leading "-U" supplied as part of $usercmd
|
|
somewhere up the command chain.
|
|
<P>
|
|
This solution only works for usernames with a single space
|
|
in them. A more complex and full-featured solution would
|
|
deal with no spaces or multiple spaces, either way. In any
|
|
case, I feel Red Hat should find a general solution to this
|
|
and incorporate it in their next release.
|
|
<P>
|
|
Warren
|
|
<P>
|
|
P.S. Thanks for a great forum for sharing tips and tricks
|
|
for Linux. BTW, does Red Hat read these tips? I'd
|
|
appreciate it if someone would submit this bug to them for
|
|
fixing.
|
|
|
|
<B>Generalized fix for SMB printing-- usernames w/spaces</B>
|
|
Date: Wed, 07 Oct 98 06:38:02 -0800<BR>
|
|
From: <A HREF="mailto:vwdowns@bigfoot.com">vwdowns@bigfoot.com</A> <BR>
|
|
<P>
|
|
I wrote you earlier about a bug in Red Hat 5.1's
|
|
/usr/lib/rhs/rhs-printfilters/smbprint
|
|
<P>
|
|
I later realized a simple generalized solution, by looking
|
|
at the
|
|
source code in more detail. The lines I added before can be
|
|
replaced with:
|
|
<PRE>
|
|
export USER="$user"%$password
|
|
usercmd=""
|
|
</PRE>
|
|
(Just prior to the last line which calls smbclient).
|
|
<P>
|
|
For a more full-featured fix, simply modify the setting of
|
|
$usercmd
|
|
to:
|
|
1. Replace references to $usercmd with references to $USER.
|
|
<P>
|
|
2. $USER should be set/exported conditionally as $usercmd is
|
|
at present.
|
|
<P>
|
|
3. $usercmd should be removed entirely from usage.
|
|
<P>
|
|
The only reliable way to pass a username/password to
|
|
smbclient is via
|
|
the USER environment variable.
|
|
<P>
|
|
1. The environment variable will not be seen on the cmd line
|
|
by someone running ps, thus not exposing your password
|
|
accidentally.
|
|
<P>
|
|
2. User names/passwords passed on the command line cannot
|
|
contain spaces. If you embed them in quotes, smbclient
|
|
keeps the quotes instead of trimming them off, causing
|
|
username/password mismatch on the server. If you leave off
|
|
the quotes, normal command-line parsing separates the
|
|
username/password into separate parameters, and only the
|
|
first word of each will get used.
|
|
<P>
|
|
Anyone using Red Hat print-filters will want to fix this,
|
|
just in case they ever decide to set up SMB printing and are
|
|
stuck with spaces in their username/password (as I am).
|
|
<P>
|
|
Warren E. Downs
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="baader"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
2 Cent Tip -- Netscape
|
|
</H3>
|
|
Date: Sun, 11 Oct 1998 10:37:37 +0200 (MET DST)<BR>
|
|
From: Hans-Joachim Baader, <A HREF="mailto:hans@grumbeer.inka.de">
|
|
hans@grumbeer.inka.de </A>
|
|
<P>
|
|
we all use Netscape every now and then. Most people won't use it as
|
|
mailreader since it is too bloated, and the UNIX mailreaders are
|
|
generally much better.
|
|
<P>
|
|
Nevertheless, Netscape seems to create a directory nsmail in the user's
|
|
home directory every time it starts and doesn't find it, even if mail
|
|
is not used. This is annoying. Here's a trick which doesn't make this
|
|
directory go away, but at least makes it invisible.
|
|
<P>
|
|
I didn't find a GUI equivalent to change this setting so you have to
|
|
do the following:
|
|
<P>
|
|
Edit the file ~/.netscape/preferences.js and change all occurences of
|
|
'nsmail' to '.netscape'. The important thing here is, of course, the
|
|
leading dot before 'netscape'.
|
|
<P>
|
|
Regards,<BR>
|
|
hjb
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="leach"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Cobol
|
|
</H3>
|
|
Date: Wed, 14 Oct 1998 23:10:35 +1000<BR>
|
|
From: "John Leach", <A HREF="mailto:leachj@ozemail.com.au">
|
|
leachj@ozemail.com.au</A> <BR>
|
|
To: cbbrowne@hex.net
|
|
<P>
|
|
I saw your request for help in the Linux Gazette re Cobol.
|
|
I've been using AcuCobol for 2 years under Linux and I strongly recommend
|
|
the product and the company.
|
|
<P>
|
|
I don't know the cost of the compiler because my company bought it - but
|
|
email them and ask for a student copy - they can only refuse...
|
|
They have a full development environment called 'AcuBench' which currently
|
|
only runs only under Windows.
|
|
<P>
|
|
The amazing thing about AcuCobol is that programs compiled on one platform
|
|
will run totally unchanged on another machine - I tend to develop under
|
|
Windows but install at clients sites on Linux.
|
|
I hope this has been helpful.
|
|
<P>
|
|
Regards<BR>
|
|
John Leach
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="csmith"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Piped Signatures
|
|
</H3>
|
|
Date: Fri, 16 Oct 1998 17:03:41 +0000<BR>
|
|
From: Colin Smith, <A HREF="mailto:colin@melly.europe.dg.com">
|
|
colin@melly.europe.dg.com</A>
|
|
<P>
|
|
This has probably come up before, but the "more fun with pipes" thing in
|
|
issue 33 reminded me of it.
|
|
<P>
|
|
Have a different signature appear in your emails every time you send
|
|
one.
|
|
<P>
|
|
Create a subdrectory in your home called .signatures and copy your
|
|
.signature file into it under a visible name.
|
|
delete your .signature file and create a pipe in its place using
|
|
<PRE>
|
|
mkfifo .signature
|
|
</PRE>
|
|
Create a script which simply "cat"s each of the files in the .signatures
|
|
directory out to the .signature pipe:
|
|
<PRE>
|
|
#!/bin/sh
|
|
while true
|
|
do
|
|
for SIGNATURE in ${HOME}/.signatures/*
|
|
do
|
|
# Cat each file out to the .signature and throw away any errors.
|
|
|
|
cat ${SIGNATURE} > ${HOME}/.signature 2> /dev/null
|
|
|
|
# This sleep seems to be required for Netscape to work properly
|
|
# I think buffering on the filesystem can cause multiple signatures
|
|
# to be read otherwise. I think the sleep allows Netscape to see
|
|
# the End Of File.
|
|
|
|
sleep 1
|
|
done
|
|
done
|
|
</PRE>
|
|
Have this script kick off in the background every time you log in to the
|
|
system in your profile or xsession. Add more entries to the .signatures
|
|
directory and they automatically get used in your emails.
|
|
<P>
|
|
Issues and problems:<BR>
|
|
One issue might be blocking on the pipe. If there is no process feeding
|
|
signature files down the pipe, any programs which open the pipe can
|
|
appear to hang until something is written.
|
|
<P>
|
|
--<BR>
|
|
Colin Smith
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="siew1"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Fixing backspace and delete Key in X-windows
|
|
</H3>
|
|
Date: Sun, 18 Oct 1998 17:40:28 +1000<BR>
|
|
From: "Steven K.H. Siew",<A HREF="mailto:ksiew@tig.com.au">
|
|
ksiew@tig.com.au</A>
|
|
<P>
|
|
If you have installed Red Hat version 5.0, you will have come across this
|
|
problem. It will not take you long to realise that the backspace key (by
|
|
this I mean the key above the ENTER key) and the delete key (by this I mean
|
|
the key below the INSERT key and to the left of the END key) behaves
|
|
differently on the console than on xterm in X-windows.
|
|
<P>
|
|
This is extremely irritating if like me you work in both the text-only
|
|
console and xterm on X-windows. I set about to make sure that the behaviour
|
|
is the same on both of them. In other words I want them to be standardise.
|
|
<P>
|
|
My solution is to make the backspace, delete and the pageup and pagedown key
|
|
to behave exactly like they do in the text-only console.
|
|
<P>
|
|
The literature to do this is available on the web, however here I shall show
|
|
those who have not done this yet, the steps needed to acheive this. A word
|
|
of warning! This is dangerous. You can potentially stuff things up very very
|
|
badly. In other words you must do this extremely carefully (and make lots of
|
|
backups).
|
|
<P>
|
|
For your information I included the links below where you may obtain more
|
|
details about this matter.
|
|
<P>
|
|
http://www.best.com/~aturner//RedHat-FAQ/
|
|
http://www.ibbnet.nl/~anne/keyboard.html
|
|
<P>
|
|
Okay now for the step by step instruction to fix the problem
|
|
<P>
|
|
Step one <BR>
|
|
* * * is to create a directory to store the original files
|
|
<PRE>
|
|
ksiew > mkdir original-terminfo-file
|
|
ksiew > cd original-terminfo-file/
|
|
original-terminfo-file > pwd
|
|
/home/ksiew/original-terminfo-file
|
|
</PRE>
|
|
<P>
|
|
Step two<BR>
|
|
* * * is to save the original copy of the xterm terminfo file
|
|
<PRE>
|
|
original-terminfo-file > locate xterm | grep terminfo | grep x/xterm
|
|
/usr/lib/terminfo/x/xterm
|
|
/usr/lib/terminfo/x/xterm-bold
|
|
/usr/lib/terminfo/x/xterm-color
|
|
/usr/lib/terminfo/x/xterm-nic
|
|
/usr/lib/terminfo/x/xterm-pcolor
|
|
/usr/lib/terminfo/x/xterm-sun
|
|
/usr/lib/terminfo/x/xterms
|
|
/usr/lib/terminfo/x/xterms-sun
|
|
original-terminfo-file > cp /usr/lib/terminfo/x/xterm xterm.original
|
|
original-terminfo-file > ls -al
|
|
total 5
|
|
drwxrwxr-x 2 ksiew ksiew 1024 Oct 18 15:35 .
|
|
drwxr-xr-x 24 ksiew ksiew 2048 Oct 18 15:31 ..
|
|
-rw-rw-r-- 1 ksiew ksiew 1380 Oct 18 15:35 xterm.original
|
|
</PRE>
|
|
Step three<BR>
|
|
* * * is to obtain the xterm terminfo settings and save it into a file
|
|
called "xterm" in the current directory
|
|
<P>
|
|
<pre>
|
|
original-terminfo-file > infocmp xterm > xterm
|
|
original-terminfo-file > less ./xterm
|
|
# Reconstructed via infocmp from file: /usr/lib/terminfo/x/xterm
|
|
xterm|vs100|xterm terminal emulator (X11R6 Window System),
|
|
am, km, mir, msgr, xenl, xon,
|
|
cols#80, it#8, lines#65,
|
|
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\
|
|
054\054hhII00,
|
|
bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
|
|
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
|
|
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
|
|
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
|
|
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
|
|
ed=\E[J, el=\E[K, enacs=\E(B\E)0, home=\E[H, ht=^I,
|
|
ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
|
|
ind=^J,
|
|
is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
|
|
kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
|
|
kcuu1=\EOA, kend=\EOe, kent=\EOM,
|
|
kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
|
|
kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~,
|
|
kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
|
|
khome=\EO\200, kich1=\E[2~, kmous=\E[M, knp=\E[6~,
|
|
kpp=\E[5~, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
|
|
rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
|
|
rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs1=^O,
|
|
rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<,
|
|
sc=\E7, sgr0=\E[m, smacs=^N, smam=\E[?7h,
|
|
smcup=\E7\E[?47h, smir=\E[4h, smkx=\E[?1h\E=,
|
|
smso=\E[7m, smul=\E[4m, tbc=\E[3k, u6=\E[%i%d;%dR,
|
|
u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
|
|
</PRE>
|
|
Step four<BR>
|
|
* * * is to modify the file called "xterm" in the current directory to
|
|
change the kbs setting and to insert a new kdch1 setting
|
|
<P>
|
|
Change from
|
|
<PRE>
|
|
kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
|
|
kcuu1=\EOA, kend=\EOe, kent=\EOM,
|
|
</PRE>
|
|
to
|
|
<PRE>
|
|
kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
|
|
kcuu1=\EOA, kdch1=\E[3~, kend=\EOe, kent=\EOM,
|
|
</PRE>
|
|
Step five<BR>
|
|
* * * is to create a .terminfo directory, setup the TERMINFO, setup TERM
|
|
as xterm, change into superuser and then recompile the "xterm" settings file
|
|
<PRE>
|
|
original-terminfo-file > mkdir ~/.terminfo
|
|
|
|
original-terminfo-file > export TERMINFO=~/.terminfo
|
|
</PRE>
|
|
If you are using tcsh, type instead
|
|
<PRE>
|
|
original-terminfo-file > setenv TERMINFO ~/.terminfo
|
|
|
|
original-terminfo-file > export TERM=xterm
|
|
</PRE>
|
|
If you are using tcsh, type instead
|
|
<PRE>
|
|
original-terminfo-file > setenv TERM xterm
|
|
|
|
original-terminfo-file > su
|
|
password: opensesame
|
|
|
|
#| tic xterm
|
|
</PRE>
|
|
Step six<BR>
|
|
* * * is to change to the ~/.terminfo/x/ directory and copy the xterm file
|
|
to /usr/lib/terminfo/x/xterm
|
|
<PRE>
|
|
#| cd ~/.terminfo/x/
|
|
#| cp xterm /usr/lib/terminfo/x/xterm
|
|
#| cd ~
|
|
#| rm -rf .terminfo
|
|
#| exit
|
|
ksiew>
|
|
</PRE>
|
|
Step seven
|
|
* * * is to logoff and log back on (this is to get rid of the TERMINFO
|
|
variable) and change the .Xdefaults file
|
|
<PRE>
|
|
ksiew> logout
|
|
login: ksiew
|
|
password: opensesame
|
|
ksiew> less .Xdefaults
|
|
</PRE>
|
|
<A HREF="./tips_xdefaults.txt">Output from less</A><BR>
|
|
Now change the last few lines from
|
|
<PRE>
|
|
xterm*VT100.Translations: #override\n\
|
|
<KeyPress>gt;Prior : scroll-back(1,page)\n\
|
|
<KeyPress>gt;Next : scroll-forw(1,page)
|
|
nxterm*VT100.Translations: #override\n\
|
|
<KeyPress>gt;Prior : scroll-back(1,page)\n\
|
|
<KeyPress>gt;Next : scroll-forw(1,page)
|
|
</PRE>
|
|
to the following lines
|
|
<PRE>
|
|
xterm*VT100.Translations: #override\n\
|
|
<KeyPress>gt;Prior : string("\033[5~")\n\
|
|
<KeyPress>gt;Next : string("\033[6~")
|
|
nxterm*VT100.Translations: #override\n\
|
|
<KeyPress>gt;Prior : string("\033[5~")\n\
|
|
<KeyPress>gt;Next : string("\033[6~")
|
|
*VT100.Translations: #override \
|
|
<Key>gt;BackSpace: string(0x7F)\n\
|
|
<Key>gt;Delete: string("\033[3~")\n\
|
|
<Key>gt;Home: string("\033[1~")\n\
|
|
<Key>gt;End: string("\033[4~")
|
|
*ttyModes: erase ^?
|
|
</PRE>
|
|
That's it! Save the .Xdefaults file and now you can start X-windows and
|
|
the backspace key, the delete key, the pageup key and the pagedown key
|
|
will work just like in the text-only console window.
|
|
<P>
|
|
Steven
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="siew2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Creating bzgrep Program
|
|
</H3>
|
|
Date: Sun, 18 Oct 1998 17:35:43 +1000<BR>
|
|
From: "Steven K.H. Siew", <A HREF="mailto:ksiew@tig.com.au">
|
|
ksiew@tig.com.au</A>
|
|
<P>
|
|
If you have ever used zgrep on gzip-textfiles then you would have realise
|
|
what a wonderful it is. The program zgrep allows you to grep a textfile even
|
|
if the text file is compressed in gzip format. Not only that it can also
|
|
grep a uncompress textfile. For example if you have the following directory
|
|
<PRE>
|
|
testing > ls -al
|
|
total 2086
|
|
drwxrwxr-x 2 ksiew ksiew 1024 Oct 18 11:07 .
|
|
drwxr-xr-x 24 ksiew ksiew 2048 Oct 18 11:00 ..
|
|
-rwxrwxr-x 1 ksiew ksiew 1363115 Oct 18 11:01 cortes.txt
|
|
-rwxrwxr-x 1 ksiew ksiew 172860 Oct 18 11:01 lost_world_10.txt.gz
|
|
-rwxrwxr-x 1 ksiew ksiew 582867 Oct 18 11:00 moon10a.txt
|
|
</PRE>
|
|
Then if you are looking for the word "haste",
|
|
<PRE>
|
|
testing > zgrep -l haste *
|
|
cortes.txt
|
|
lost_world_10.txt.gz
|
|
moon10a.txt
|
|
</PRE>
|
|
Tells you that "haste" is in all three files.
|
|
<P>
|
|
Now if you compress a textfile using the famous bzip2 compress program, you
|
|
have a problem.
|
|
<PRE>
|
|
testing > bzip2 cortes.txt
|
|
testing > ls -al
|
|
total 1098
|
|
drwxrwxr-x 2 ksiew ksiew 1024 Oct 18 11:12 .
|
|
drwxr-xr-x 24 ksiew ksiew 2048 Oct 18 11:12 ..
|
|
-rwxrwxr-x 1 ksiew ksiew 355431 Oct 18 11:01 cortes.txt.bz2
|
|
-rwxrwxr-x 1 ksiew ksiew 172860 Oct 18 11:01 lost_world_10.txt.gz
|
|
-rwxrwxr-x 1 ksiew ksiew 582867 Oct 18 11:00 moon10a.txt
|
|
testing > zgrep -l haste *
|
|
lost_world_10.txt.gz
|
|
moon10a.txt
|
|
</PRE>
|
|
What happen now is that zgrep no longer recognise the file cortes.txt.bz2 as
|
|
a compress text file.
|
|
<P>
|
|
What we need is a new program bzgrep which can recognise bzip2 compress text
|
|
files.
|
|
<P>
|
|
The best way to create bzgrep file is to modify the existing zgrep file.
|
|
<PRE>
|
|
testing > locate zgrep
|
|
/usr/bin/zgrep
|
|
/usr/man/man1/zgrep.1
|
|
|
|
testing > su
|
|
password: opensesame
|
|
#| cp /usr/bin/zgrep /usr/local/bin/bzgrep
|
|
</PRE>
|
|
The bzgrep file is a copy of zgrep file can contain
|
|
<A HREF="./tips_zgrep.txt">this text</A>.
|
|
<P>
|
|
We cannot change the last few lines to the following
|
|
<P>
|
|
<pre>
|
|
res=0
|
|
for i do
|
|
if test $list -eq 1; then
|
|
bzip2 -cdf "$i" | $grep $opt "$pat" > /dev/null && echo $i
|
|
r=$?
|
|
elif test $# -eq 1 -o $silent -eq 1; then
|
|
bzip2 -cdf "$i" | $grep $opt "$pat"
|
|
r=$?
|
|
else
|
|
bzip2 -cdf "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
|
|
r=$?
|
|
fi
|
|
test "$r" -ne 0 && res="$r"
|
|
done
|
|
exit $res
|
|
</pre>
|
|
<P>
|
|
Now the bzgrep file is a program that will be able to grep bzip2 compressed
|
|
textfiles. BUT there is a problem.
|
|
<P>
|
|
bzgrep program WILL NOT recognise ordinary textfiles or gzip compress
|
|
textfiles. This is a major problem! It means you have to compress all your
|
|
textfiles with bzip2 in order to use bzgrep program.
|
|
<P>
|
|
Luckily there is always a solution in Linux. All we have to do is alter
|
|
the program to be more choosy on which decompression program to use. ie. Do
|
|
it uses <tt>gzip -cdfq or bzip2 -cdf</tt>
|
|
<P>
|
|
Now change the last few lines again to resemble this
|
|
<PRE>
|
|
res=0
|
|
for i do
|
|
case "$i" in
|
|
|
|
*.bz2 )
|
|
if test $list -eq 1; then
|
|
bzip2 -cdf "$i" | $grep $opt "$pat" > /dev/null && echo $i
|
|
r=$?
|
|
elif test $# -eq 1 -o $silent -eq 1; then
|
|
bzip2 -cdf "$i" | $grep $opt "$pat"
|
|
r=$?
|
|
else
|
|
bzip2 -cdf "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
|
|
r=$?
|
|
fi ;;
|
|
|
|
* )
|
|
if test $list -eq 1; then
|
|
gzip -cdfq "$i" | $grep $opt "$pat" > /dev/null && echo $i
|
|
r=$?
|
|
elif test $# -eq 1 -o $silent -eq 1; then
|
|
gzip -cdfq "$i" | $grep $opt "$pat"
|
|
r=$?
|
|
else
|
|
gzip -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
|
|
r=$?
|
|
fi ;;
|
|
esac
|
|
test "$r" -ne 0 && res="$r"
|
|
done
|
|
exit $res
|
|
</PRE>
|
|
Finally, this is the contents of a working <A
|
|
HREF="./tips_bzgrep.txt">bzgrep</A> program.
|
|
<P>
|
|
Steve
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="hammel2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Linux on PalmPilot
|
|
</H3>
|
|
Date: Sat, 17 Oct 1998 17:00:37 -0600 (MDT)<BR>
|
|
From: "Michael J. Hammel", <A HREF="mailto:mjhammel@graphics-muse.org">
|
|
mjhammel@graphics-muse.org</A>
|
|
<blockquote> <font color="maroon">
|
|
In a previous message, dino jose says:<BR>
|
|
Hi... Mike, I read your article about the Linux in palm pilot.Its very
|
|
intersting.Iam kind of new in LINUX platform! Because Iam so curious
|
|
about Linux. I bought a palm pilot 111 the new version of palm with 2meg
|
|
of memory.the main problem is, I don't know where to get the Linux
|
|
operating system that it runs on palm pilot 111 the newer version. what
|
|
about the HOW TO LINUX DOCUMENTATION FROM from its official site?
|
|
Once I get this software do I run this in Linux operating system then
|
|
transfer this to palm 111? Iam kind novice in Linux. If you could help
|
|
me.I would gladly appreciated. Thanks a lot....
|
|
</font></blockquote>
|
|
Actually, you don't run Linux on the PalmPilot itself (although there is a
|
|
project to do so - I don't know much about that however). You run Linux on
|
|
your PC and transfer data files between the Linux system and the Pilot.
|
|
You still run the same programs you normally would *on* the PalmPilot -
|
|
it's just that you can transfer these programs and their data file to the
|
|
Pilot using tools on Linux.
|
|
<P>
|
|
Don't let using Linux confuse you. You use Linux in the same way you use
|
|
Microsoft Windows - it runs on your PC to do word processing or
|
|
spreadsheets or whatever. You then pass data files back and forth the the
|
|
Pilot using special tools.
|
|
<P>
|
|
If you want to try out a program that helps transfer files back and forth
|
|
you can try my XNotesPlus. Its a sticky notes program that will allow you
|
|
do backups of your Pilot to your local hard disk and will transfer the
|
|
Address database from the Pilot to be used in doing some simple printing of
|
|
envelopes. You can download the program from
|
|
<A HREF="http://www.graphics-muse.org/xnotes/xnotes.html">
|
|
http://www.graphics-muse.org/xnotes/xnotes.html</A>. You will also need to get
|
|
the PilotLink software that I described in the article you read.
|
|
XNotesPlus uses PilotLink to do the actual data transfers to and from the
|
|
Pilot.
|
|
<P>
|
|
Hope this helps.
|
|
<P>
|
|
Michael J. Hammel, The Graphics Muse
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="brais"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Red Hat 5.1 + Acrobat Reader 3.01 HOWTO
|
|
</H3>
|
|
Date: Thu, 22 Oct 1998 22:55:27 -0400<BR>
|
|
From: Louis-Philippe Brais, <A HREF="mailto:lpbrais@grm94.polymtl.ca">
|
|
lpbrais@grm94.polymtl.ca</A>
|
|
<P>
|
|
Some people I know went nuts trying to install Acrobat Reader 3.01 as a
|
|
helper app in Netscape, as shipped with Red Hat Linux 5.1. Here's how
|
|
I've done it:
|
|
<P>
|
|
1. Download Acrobat Reader 3.01 from ftp.adobe.com. Let the installer
|
|
script install the whole thing under /usr/local/Acrobat3.
|
|
<P>
|
|
2. Create the following shell script:
|
|
/usr/local/Acrobat3/bin/nsacroread
|
|
<PRE>
|
|
#!/bin/sh
|
|
unset LD_PRELOAD
|
|
exec /usr/local/Acrobat3/bin/acroread $* >$HOME/.nsacroread-errors
|
|
2>&1
|
|
</PRE>
|
|
<P>
|
|
3. Don't forget to make this script executable:
|
|
<PRE>
|
|
# chmod 755 /usr/local/Acrobat3/bin/nsacroread
|
|
</PRE>
|
|
4. If the directory /usr/local/lib/netscape doesn't already exist,
|
|
create
|
|
it.
|
|
<P>
|
|
5. Copy (exactly) the following two files into this directory.
|
|
<P>
|
|
mailcap:
|
|
<PRE>
|
|
#mailcap entry added by Netscape Helper
|
|
application/pdf;/usr/local/Acrobat3/bin/nsacroread -tempFile %s
|
|
</PRE>
|
|
mime.types:
|
|
<PRE>
|
|
#--Netscape Communications Corporation MIME Information
|
|
#Do not delete the above line. It is used to identify the file
|
|
type.
|
|
#
|
|
#mime types added by Netscape Helper
|
|
type=application/pdf \
|
|
desc="Acrobat Reader" \
|
|
exts="pdf"
|
|
</PRE>
|
|
<p>
|
|
Note: You can do without the last two steps and instead configure the
|
|
helper apps with the Edit >> Preferences menu of Netscape. This will
|
|
create similar .mailcap and .mime.types files in the user's home dir.
|
|
But IMHO the first method is best because this way you can configure
|
|
Acrobat Reader for all users at once.
|
|
<P>
|
|
Cheers,<BR>
|
|
Louis-Philippe Brais
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="poel"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
2 $.25 tips
|
|
</H3>
|
|
Date: Thu, 22 Oct 1998 11:19:22 -0600<BR>
|
|
From: Bob van der Poel, <A HREF="mailto:bvdpoel@kootenay.com">
|
|
bvdpoel@kootenay.com</A>
|
|
<P>
|
|
1. I was having some real problems with Netscape (3.04 Gold) the other
|
|
day. No matter what I did, I could not get the helpers to work.
|
|
Somewhere in the back of my mind, I knew that they had worked in the
|
|
past, but I couldn't see anything that I'd changed. A few messages on
|
|
various newsgroups turned on the lights: I had upgraded my Bash to
|
|
2.0.0--and this version has a bug in it. Expressions of the form ((..)
|
|
.. ) are interpreted as arithmetic expressions, rather than nested
|
|
sub-shells. Upgrading to 2.02.1(1) was almost painless and fixed the
|
|
Netscape problem.
|
|
<P>
|
|
To get 2.02.1(1) go to the gnu site (www.gnu.org) and follow the links
|
|
to the software sections. The new software should compile out of the box
|
|
(it did for me). One problem I had was that the install script put the
|
|
new binaries in /usr/local/bin, and since I had my old versions in
|
|
/usr/bin they weren't found. A quick mv solved that.
|
|
<P>
|
|
2. For a number of years I've been struggling trying to read the results
|
|
of color-ls on my xterm screens. A number of the colors (green and blue)
|
|
were just too bright to read. I didn't want to turn down the brightness
|
|
of my monitor...so I mostly just squinted. For some reason I was looking
|
|
at the XTerm.ad file, and noticed that the colors could be adjusted! The
|
|
XTerm.ad file should be located in /usr/lib/X11/app-defaults (or
|
|
something similar). It is read each time a new xterm start up and sets
|
|
various options. If you look near the end of this file you'll see a
|
|
number of definitions for the VT100 colors. I changed:
|
|
<PRE>
|
|
*VT100*color2: green3
|
|
</PRE>
|
|
to
|
|
<PRE>
|
|
*VT100*color2: green4
|
|
</PRE>
|
|
and
|
|
<PRE>
|
|
*VT100*color6: cyan3
|
|
</PRE>
|
|
to
|
|
<PRE>
|
|
*VT100*color6: cyan4
|
|
</PRE>
|
|
Like magic, the colors are darkened and I can read the results. If you
|
|
don't want to fool with your global default file, you could also just
|
|
add the entries to your ~/.Xresources file.
|
|
<P>
|
|
-- <BR>
|
|
Bob van der Poel
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="jalics"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
S3 Virge/DX and XFree
|
|
</H3>
|
|
Date: Mon, 26 Oct 1998 00:56:25 -0500 (EST)<BR>
|
|
From: "Andy K. Jalics", <A HREF="mailto:ab212@acorn.net">
|
|
ab212@acorn.net</A>
|
|
<P>
|
|
I had a S3 Virge/DX, and couldn't get it working well in XFree.
|
|
This made me very mad since there is a specific XFREE_S3V (S3 virge
|
|
server).
|
|
<P>
|
|
I used a borrowed Xaccel, but it made me feel guilty real quick. :)
|
|
So I decided that I need to get XFree configured well, and then ditch
|
|
Xaccel. I found that xfree86config can not be well used to configure a
|
|
Virge.
|
|
<P>
|
|
Here are the modelines I use for a mid-range 17 inch monitor @ 16bpp using
|
|
the SVGA server.
|
|
*WARNING* If this blows up your monitor/card, It's not my fault, although
|
|
it shouldn't.
|
|
<PRE>
|
|
Modeline "640x480" 31.5 640 680 720 864 480 488 491 521
|
|
ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -HSync -VSync
|
|
Modeline "640x400" 36 640 696 752 832 480 481 484 509 -HSync -VSync
|
|
Modeline "800x600" 40 800 840 968 1056 600 601 605 628 +hsync +vsync
|
|
Modeline "800x600" 50 800 856 976 1040 600 637 643 666 +hsync +vsync
|
|
Modeline "800x600" 60.75 800 864 928 1088 600 616 621 657 -HSync -VSync
|
|
# Modeline "1024x768" 85.00 1024 1032 1152 1360 768 784 787 823
|
|
Modeline "1024x768" 85.00 1024 1052 1172 1320 768 780 783 803
|
|
# Modeline "1152x864" 85.00 1152 1240 1324 1552 864 864 876 908
|
|
Modeline "1152x864" 85.00 1152 1184 1268 1452 864 880 892 900
|
|
</PRE>
|
|
This cured me of using Xaccel, and should cure your S3 Virge blues.
|
|
P.S. A S3 Virge can go up to 1600x1000?
|
|
<P>
|
|
Andy
|
|
|
|
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<center>Published in <I>Linux Gazette</I> Issue 34, November 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_mail34.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
|
|
<A HREF="./lg_bytes34.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 ============================================================-->
|