862 lines
28 KiB
HTML
862 lines
28 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<title>More 2 Cent Tips & Tricks Issue 22</title>
|
|
</head>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
|
|
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_tips22.html#netscape">Netscape and Seyon
|
|
questions</a>
|
|
<li><a href="./lg_tips22.html#mailtips">Keeping track of tips</a>
|
|
<li><a href="./lg_tips22.html#tree">Displaying File Tree</a>
|
|
<li><a href="./lg_tips22.html#video">Making Changing X video modes
|
|
easier</a>
|
|
<li><a href="./lg_tips22.html#code">Tree Program</a>
|
|
<li><a href="./lg_tips22.html#find">Finding what you want with
|
|
find</a>
|
|
<li><a href="./lg_tips22.html#kermit">Minicom kermit help</a>
|
|
<li><a href="./lg_tips22.html#postscript">Postscript printing</a>
|
|
<li><a href="./lg_tips22.html#realaudio">Realaudio without
|
|
X-windows</a>
|
|
<li><a href="./lg_tips22.html#dynamic">Connecting to dynamic IP via
|
|
ethernet</a>
|
|
<li><a href="./lg_tips22.html#commandx">Running commands from X w/out
|
|
XTerm</a>
|
|
<li><a href="./lg_tips22.html#asciiftp">Ascii problems with FTP</a>
|
|
<li><a href="./lg_tips22.html#rhq">Red Hat Questions</a>
|
|
</ul>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="netscape"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Netscape and Seyon questions
|
|
</H3>
|
|
<P>
|
|
Date: Mon, 8 Sep 1997 11:23:51 -0600 (MDT)<br>
|
|
From: "Michael J. Hammel" <a href="mailto:mjhammel@long.emass.com">mjhammel@long.emass.com</a>
|
|
|
|
<P>
|
|
Lynn Danielson asked:<p>
|
|
<p>I downloaded Netscape Communicator just a few weeks ago from
|
|
the Netscape site. I'm not sure older versions of Netscape are still
|
|
available. I'm probably wrong, but I was under the impression that
|
|
only the most current beta versions were freely available.
|
|
<P>
|
|
Answer:<p>
|
|
A quick search through Alta-Vista for Netscape mirrors showed a couple of
|
|
different listing for mirror sites. I perused a few and found most either
|
|
didn't have anything or had non-English versions, etc. One site I did find
|
|
with all the appropriate pieces is:
|
|
<P>
|
|
<a href="ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/">
|
|
|
|
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/
|
|
</a>
|
|
|
|
<P>
|
|
|
|
Its a long way to go to get it (Australia), but thats all I could find. If
|
|
you want to go directly to the latest (4.03b8) Communicator directory, try:
|
|
<P>
|
|
<a href="ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/communicator/4.03/4.03b8/english/unix/">
|
|
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/communicator/4.03/4.03b8/english/unix/
|
|
</a>
|
|
<P>
|
|
I did notice once while trying to download from Netscape that older
|
|
versions were available, although I didn't try to download them. I noticed
|
|
this while looking for the latest download of Communicator through their
|
|
web sites. Can't remember how I found that, though.
|
|
<P>
|
|
The 3.x version is available commercially from Caldera. I expect that the
|
|
4.x versions will be as well, though I don't know if Caldera keeps the beta
|
|
versions on their anonymous ftp sites.
|
|
<P>
|
|
BTW, the Page Composer is pretty slick, although it has no interface for
|
|
doing Javascript. It has a few bugs, but its the best WYSIWYG interface
|
|
for HTML composition on Linux that I've seen. Its better than Applix's
|
|
HTML Editor, although that one does allow exporting to non-HTML stuff.
|
|
Collabra Discussions sucks. The old news reader was better at most things.
|
|
I'd still like to be able to mark a newsgroup read up to a certain point
|
|
instead of the all-or-nothing bit.
|
|
<P>
|
|
For anyone who is interested - 4.x now supports CSS (Cascading Style
|
|
Sheets) and layers. Both of these are *very* cool. They are the future of
|
|
Web design and, IMHO, a very good way to create Multimedia applications for
|
|
distribution on CDs. One of C|Net's web pages (I think) has some info on
|
|
these items, including a demo of layers (moves an image all over the screen
|
|
*over* the underlying text - way cool). The only C|Net URL I ever remember
|
|
is www.news.com, but you can get to the rest of their sites from there.
|
|
<P>
|
|
-- Michael J. Hammel
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="mailtips"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Keeping track of tips
|
|
</H3>
|
|
<P>
|
|
Date: Tue, 26 Aug 1997 16:29:13 +0200
|
|
<br>
|
|
From: Ivo Saviane <a href="mailto:saviane@astrpd.pd.astro.it">saviane@astrpd.pd.astro.it</a>
|
|
<P>
|
|
|
|
|
|
<p>Dear LG,
|
|
<p>it always happens to me that I spend a lot of time finding out how to
|
|
do a certain thing under Linux/Unix, and then I forget it. The next time
|
|
I need that information I will start all the `find . ...', `grep xxx *' process
|
|
again and waste the same amount of time!
|
|
<p>
|
|
To me, the best way to avoid that is to send a mail to myself telling how
|
|
to do that particular operation. But mail folders get messy and, moreover,
|
|
are not useful to other users who might need that same information.
|
|
<p>
|
|
Finally I found something that contributes solving this problem. I set up
|
|
a dummy user who reads his mail and puts it in www readable form. Now it is
|
|
easy for me to send a mail to news@machine as soon as I learn something,
|
|
and be sure that I will be able to find that information again just
|
|
clicking on the appropriate link. It would also be easy to set up a grep
|
|
script and link it to the same page.
|
|
<p>
|
|
The only warning is to put a meaningful `subject: ' to the mail, since
|
|
this string will be written besides the link.
|
|
<p>
|
|
I am presently not aware of something similar.
|
|
At least, not that simple. It you know, let me know too!
|
|
<p>
|
|
If you want to see how this works, visit
|
|
<p>
|
|
<a href="http://obelix.pd.astro.it/~news">http://obelix.pd.astro.it/~news</a>
|
|
<p>
|
|
A quick description of the basic operations needed is given below.
|
|
<p>
|
|
--------------------------------------------------------------------------
|
|
<p>
|
|
The following lines briefly describe how to set up the light news server.
|
|
<p>
|
|
1. Create a new user named `news'
|
|
<p>
|
|
2. Login as news and create the directories ~/public_html
|
|
and ~/public_html/folders (I assume that your http server is configured
|
|
so that `http://machine/~user' will point to `public_html' in the user's
|
|
$HOME).
|
|
<p>
|
|
3. Put the wmanager.sh script in the $HOME/bin directory. The script follows
|
|
the main body of this message as attachment [1]. The script does work
|
|
under bash.
|
|
<p>
|
|
The relevant variables are grouped at the beginning of the script. These
|
|
should be changed according to the machine/user setup
|
|
<p>
|
|
4. The script uses splitmail.c in order to break the mail file in sub-folders
|
|
The binary file should be put in the $HOME/bin dir. See attachment [2].
|
|
<p>
|
|
5. Finally, add a line in the `news' user crontab, like the following
|
|
<p>
|
|
00 * * * * /news_bin_dir/wmanager.sh
|
|
<p>
|
|
where `news_bin_dir' stands for $HOME/bin. In this case the mail will be
|
|
checked once every hour.
|
|
<p>
|
|
<p>
|
|
---------------------------------- attachment [1]
|
|
<pre>
|
|
#!/bin/sh
|
|
|
|
# wmanager.sh
|
|
|
|
# Updates the www news page reading the user's mails
|
|
# (c) 1997 Ivo Saviane
|
|
|
|
# requires splitmail (attachment [2])
|
|
|
|
## --- environment setup
|
|
|
|
BIN=/home/obelnews/bin # contains all the executables
|
|
MDIR=/usr/spool/mail # mail files directory
|
|
USR=news # user's login name
|
|
MFOLDER=$MDIR/$USR # user's mail file
|
|
MYFNAME=`date +%y~%m~%d~%H:%M:%S.fld` # filename for mail storage under www
|
|
|
|
FLD=folders # final dir root name
|
|
PUB=public_html # httpd declared public directory
|
|
PUBDIR=$HOME/$PUB/$FLD
|
|
MYFOLDER=$PUBDIR/$MYFNAME
|
|
INDEX=$HOME/$PUB/index.html
|
|
|
|
## --- determines the mailfile size
|
|
|
|
MSIZE=`ls -l $MFOLDER | awk '{print $5}'`
|
|
|
|
## --- if new mail arrived goes on; otherwise does nothing
|
|
|
|
if [ $MSIZE != "0" ]; then
|
|
|
|
## --- writes the header of index.html in the pub dir
|
|
|
|
echo "<html><head><title> News! </title></head>" > $INDEX
|
|
echo "<h2> Internal news archive </h2> <p><p>" >> $INDEX
|
|
echo "Last update: <i>`date`</i> <hr>" >> $INDEX
|
|
|
|
## --- breaks the mail file in single folders; splitmail.c must be compiled
|
|
|
|
$BIN/splitmail $MFOLDER > $MFOLDER
|
|
|
|
## --- each folder is copied in the folder dir, under the pub dir,
|
|
## and given an unique name
|
|
|
|
for f in $MFOLDER.*; do\
|
|
NR=`echo $f | cut -d. -f2`;\
|
|
MYFNAME=`date +%y~%m~%d~%H:%M:%S.$NR.fld`;\
|
|
MYFOLDER=$PUBDIR/$MYFNAME;\
|
|
mv $f $MYFOLDER;\
|
|
done
|
|
|
|
## --- prepares the mailfile for future messages
|
|
|
|
rm $MFOLDER
|
|
touch $MFOLDER
|
|
|
|
## --- Now creates the body of the www index page, searching the folders
|
|
## dir
|
|
|
|
for f in `ls $PUBDIR/* | grep -v index`; do\
|
|
htname=`echo $f | cut -d/ -f5,6`;\
|
|
rfname=`echo $f | cut -d/ -f6 | sed 's/.fld//g'`;\
|
|
echo \<a href\=\"$htname\"\> $rfname\<\/a\> >> $INDEX;\
|
|
echo \<strong\> >> $INDEX;\
|
|
grep "Subject:" $f | head -1 >> $INDEX;\
|
|
echo \</strong\> >> $INDEX;\
|
|
echo \<br\> >> $INDEX;\
|
|
done
|
|
|
|
echo "<hr>End of archive" >> $INDEX
|
|
echo "</html>" >> $INDEX
|
|
fi
|
|
|
|
</pre>
|
|
|
|
<P>
|
|
---- attachment [2]<br>
|
|
|
|
<pre>
|
|
|
|
/******************************************************************************
|
|
Reads stdin. Assuming that this has a mailfile format, it breaks the input
|
|
in single messages. A filestem must be given as argument, and single
|
|
messages will be written as filestem.1 filestem.2 etc.
|
|
(c) 1997 I.Saviane
|
|
|
|
******************************************************************************/
|
|
|
|
#define NMAX 256
|
|
/*****************************************************************************/
|
|
|
|
#include <stdio.h>
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/************************** MAIN **************************************/
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
FILE *fp;
|
|
char mline[NMAX], mname[NMAX];
|
|
int nmail=0, open;
|
|
|
|
if(argc < 2) {
|
|
fprintf(stderr, "splitmail: no input filestem");
|
|
return -1;
|
|
}
|
|
|
|
fp = fopen("/tmp/xx", "w");
|
|
while(fgets(mline, NMAX, stdin) != NULL) {
|
|
|
|
open = IsFrom(mline);
|
|
if(open==1) {
|
|
|
|
fclose(fp);
|
|
nmail++;
|
|
sprintf(mname, "%s.%d", argv[1], nmail);
|
|
fp = fopen(mname, "w");
|
|
open = 0;
|
|
}
|
|
fprintf(fp, "%s", mline);
|
|
}
|
|
fclose(fp);
|
|
system("rm /tmp/xx");
|
|
return 1;
|
|
}
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
int IsFrom(char *s) {
|
|
|
|
if(s[0]=='F' && s[1]=='r' && s[2]=='o' && s[3]=='m' && s[4]==' ') {
|
|
|
|
return 1;
|
|
} else {
|
|
|
|
return 0;
|
|
}
|
|
}</pre>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="tree"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Displaying File Tree
|
|
</H3>
|
|
<P>
|
|
|
|
Date: Tue, 26 Aug 1997 16:40:43 -0400 (EDT)
|
|
<br>
|
|
From: Scott K. Ellis <a href="mailto:storm@gate.net">storm@gate.net</a><br>
|
|
|
|
<p>A nice tool for displaying a graphic tree of files or directories in your
|
|
filesystem can be found at your local sunsite mirror under
|
|
/pub/Linux/utils/file/tree-1.2.tgz. It is also included as the package
|
|
tree included in the Debian distribution.
|
|
<P>
|
|
<hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="video"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Making Changing X video modes easier
|
|
</H3>
|
|
<P>
|
|
|
|
Date: Thu, 28 Aug 1997 20:29:59 +0100<br>
|
|
From: Jo Whitby <a href="mailto:pandore@globalnet.co.uk">pandore@globalnet.co.uk</a><br>
|
|
|
|
Hi
|
|
<P>
|
|
|
|
In issue 20 of the Linux gazette there was a letter from Greg Roelofs on
|
|
changing video modes in X - this was something I had tried and had found
|
|
changing colour depths awkward, and didn't know how to start multiple
|
|
versions of X.
|
|
<P>
|
|
I also found the syntax of the commands difficult to remember, so here's
|
|
what I did.
|
|
<P>
|
|
First I created 2 files in /usr/local/bin called x8 and x16 for the
|
|
colour depths that I use, and placed the command in them -
|
|
<P>
|
|
for x8
|
|
<pre>
|
|
#!/bin/sh
|
|
startx -- :$* -bpp 8 &
|
|
</pre>
|
|
<P>
|
|
and for x16
|
|
<P>
|
|
<pre>
|
|
#!/bin/sh
|
|
startx -- :$* -bpp 16 &
|
|
</pre>
|
|
<P>
|
|
then I made them executable -
|
|
<P>
|
|
<pre>
|
|
chmod -c 755 /usr/local/bin/x8
|
|
chmod -c 755 /usr/local/bin/x16
|
|
|
|
</pre>
|
|
<P>
|
|
now I simply issue the command x8 or x16 for the first instance of X and
|
|
x8 1 or x16 1 for the next and so on, this I find much easer to
|
|
remember:-) An addition I would like to make would be to check which X
|
|
servers are running and to increment the numbers automatically, but as I
|
|
have only been running Linux for around 6 months my script writing is
|
|
extremely limited, I must invest in a book on the subject.
|
|
<P>
|
|
Linux is a fantastic OS, now I've tried it I could not go back to
|
|
Windoze and hate having to turn my Linux box into a wooden doze box just
|
|
to run the couple of progs that I can't live without (Quicken 4 and a
|
|
lottery checking prog), so if anyone knows of a good alternative to
|
|
these please let me know, the sooner doze is gone for good the better -
|
|
then Linux can have the other 511Mb of space doze95 is hogging!
|
|
<P>
|
|
ps. Linux Gazette is just brilliant, I've been reading all the back
|
|
issues, nearly caught up now - only been on the net for 3 months. I hope
|
|
to be able to contribute something a little more useful to the Gazette
|
|
in the future, when my knowledge is a little better:-)
|
|
<P>
|
|
keep up the good work.
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="code"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Tree Program
|
|
</H3>
|
|
<P>
|
|
Date: Mon, 01 Sep 1997 03:28:57 -0500<br>
|
|
From: Ian <a href="mailto:Beth13@mail.utexas.edu">Beth13@mail.utexas.edu</a><br>
|
|
|
|
<p>
|
|
Try this instead of the tree shell-script mentioned earlier:<br>
|
|
|
|
--------- Cut here --------
|
|
|
|
|
|
<pre>
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
#include <dirent.h>
|
|
|
|
|
|
// This is cool for ext2.
|
|
#define MAXLEN 256
|
|
#define maxdepth 4096
|
|
|
|
struct dnode {
|
|
dnode *sister;
|
|
char name[MAXLEN];
|
|
};
|
|
|
|
const char *look;
|
|
const char *l_ascii="|+`-";
|
|
const char l_ibm[5]={179,195,192,196,0};
|
|
|
|
int total;
|
|
|
|
char map[maxdepth];
|
|
|
|
void generate_header(int level) {
|
|
int i;
|
|
for (i=0;i<level;i++) printf(" %c ",(map[i]?look[0]:32));
|
|
printf (" %c%c ",(map[level]?look[1]:look[2]),look[3]);
|
|
}
|
|
|
|
dnode* reverselist(dnode *last) {
|
|
dnode *first,*current;
|
|
first=NULL;
|
|
current=last;
|
|
|
|
// Put it back in order:
|
|
// Pre: last==current, first==NULL, current points to backwards linked
|
|
list
|
|
while (current != NULL) {
|
|
last=current->sister;
|
|
current->sister=first;
|
|
first=current;
|
|
current=last;
|
|
}
|
|
|
|
return first;
|
|
}
|
|
|
|
void buildtree(int level) {
|
|
dnode *first,*current,*last;
|
|
first=current=last=NULL;
|
|
char *cwd;
|
|
struct stat st;
|
|
|
|
if (level>=maxdepth) return;
|
|
|
|
// This is LINUX SPECIFIC: (ie it may not work on other platforms)
|
|
cwd=getcwd(NULL,maxdepth);
|
|
if (cwd==NULL) return;
|
|
|
|
// Get (backwards) Dirlist:
|
|
DIR *dir;
|
|
dirent *de;
|
|
|
|
dir=opendir(cwd);
|
|
if (dir==NULL) return;
|
|
|
|
while ((de=readdir(dir))) {
|
|
// use de->d_name for the filename
|
|
if (lstat(de->d_name,&st) != 0) continue; // ie if not success go on.
|
|
if (!S_ISDIR(st.st_mode)) continue; // if not dir go on.
|
|
if (!(strcmp(".",de->d_name) && strcmp("..",de->d_name))) continue; //
|
|
skip ./
|
|
..
|
|
current=new dnode;
|
|
current->sister=last;
|
|
strcpy(current->name,de->d_name);
|
|
last=current;
|
|
}
|
|
|
|
closedir(dir);
|
|
|
|
first=reverselist(last);
|
|
|
|
// go through each printing names and subtrees
|
|
|
|
while (first != NULL) {
|
|
map[level]=(first->sister != NULL);
|
|
generate_header(level);
|
|
puts(first->name);
|
|
total++;
|
|
// consider recursion here....
|
|
if (chdir (first->name) == 0) {
|
|
buildtree(level+1);
|
|
if (chdir (cwd) != 0) return;
|
|
}
|
|
current=first->sister;
|
|
delete first;
|
|
first=current;
|
|
}
|
|
free (cwd);
|
|
}
|
|
|
|
void tree() {
|
|
char *cwd;
|
|
cwd=getcwd(NULL,maxdepth);
|
|
if (cwd==NULL) return;
|
|
printf("Tree of %s:\n\n",cwd);
|
|
free (cwd);
|
|
total=0;
|
|
buildtree(0);
|
|
printf("\nTotal directories = %d\n",total);
|
|
}
|
|
|
|
void usage() {
|
|
printf("usage: tree {-[agiv]} {dirname}\n\n");
|
|
printf("Tree version 1.0 - Copyright 1997 by Brooke Kjos
|
|
<beth13@mail.utexas.ed
|
|
u>\n");
|
|
printf("This program is covered by the Gnu General Public License
|
|
version 2.0\n
|
|
");
|
|
printf("or later (copyleft). Distribution and use permitted as long
|
|
as\n");
|
|
printf("source code accompanies all executables and no additional\n");
|
|
printf("restrictions are applied\n");
|
|
printf("\n\n Options:\n\t-a use ascii for drawings\n");
|
|
printf("\t-[ig] use IBM(tm) graphics characters\n");
|
|
printf("\t-v Show version number and exit successfully\n");
|
|
};
|
|
|
|
void main (int argc,char ** argv) {
|
|
look=l_ascii;
|
|
int i=1;
|
|
if (argc>1) {
|
|
if (argv[1][0]=='-') {
|
|
switch ((argv[1])[1]) {
|
|
case 'i':
|
|
case 'I':
|
|
case 'g':
|
|
case 'G':
|
|
look = l_ibm;
|
|
break;
|
|
case 'a':
|
|
case 'A':
|
|
look = l_ascii;
|
|
break;
|
|
case 'v':
|
|
case 'V':
|
|
usage();
|
|
exit(0);
|
|
default:
|
|
printf ("Unknown option: %s\n\n",argv[1]);
|
|
usage();
|
|
exit(1);
|
|
} // switch
|
|
i=2;
|
|
} // if2
|
|
} // if1
|
|
if (argc > i) {
|
|
char *cwd;
|
|
cwd=getcwd(NULL,maxdepth);
|
|
if (cwd==NULL) {
|
|
printf("Failed to getcwd:\n");
|
|
perror("getcwd");
|
|
exit(1);
|
|
}
|
|
for (;i>argc;i++) {
|
|
if (chdir(argv[i]) == 0) {
|
|
tree();
|
|
if (chdir(cwd) != 0) {
|
|
printf("Failed to chdir to cwd\n");
|
|
exit(1);
|
|
}
|
|
}
|
|
else printf("Failed to chdir to %s\n\n",argv[i]);
|
|
} // for
|
|
free (cwd);
|
|
} else tree();
|
|
}</pre><BR>
|
|
------- Cut Here --------
|
|
<P>Call this tree.cc and run gcc -O2 tree.cc -o /usr/local/bin/tree.
|
|
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
|
|
<a name="rcs"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Managing an Entire Project
|
|
</H3>
|
|
<P>
|
|
|
|
Date: Tue, 26 Aug 1997 16:44:06 -0400 (EDT)<br>
|
|
From: Scott K. Ellis <a href="mailto:storm@gate.net">storm@gate.net</a><br>
|
|
|
|
<p>While RCS is useful for managing one or a small set of files, CVS is a
|
|
wrapper around RCS that allows you to easily keep track of revisions
|
|
across an entire project.
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="find"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Finding what you want with find</H3>
|
|
<P>
|
|
Date: Tue, 2 Sep 1997 21:53:41 -0500 (CDT)<br>
|
|
From: David Nelson <a href="mailto:dnelson@psa.pencom.com">dnelson@psa.pencom.com</a>
|
|
|
|
<P>
|
|
While the <tt>find . -type f -exec grep "string" {} \;</tt> works, it does not
|
|
tell you what file it found the string in. Try using <tt>find . -type f
|
|
-exec grep "string" /dev/null {} \;</tt> instead.
|
|
<p>David /\/elson
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="kermit"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Minicom kermit help</h3><p>
|
|
Date: Wed, 10 Sep 1997 12:21:55 -0400 (EDT)<br>
|
|
From: "Donald R. Harter Jr." <a href="mailto:ah230@traverse.lib.mi.us">ah230@traverse.lib.mi.us</a><p>
|
|
With minicom, ckermit was hanging up the phone line after I exited
|
|
it to return to minicom. I was able to determine a quick fix for this.
|
|
In file ckutio.c comment out (/* */) line 2119 which has <B>tthang()</B> in it.
|
|
<B>tthang</B> hangs up the line. I don't know why ckermit thought that it
|
|
should hang up the line.
|
|
<p> Donald Harter Jr.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="postscript"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Postscript printing</h3><p>
|
|
Date: Sun, 7 Sep 1997 15:12:17 +0200 (MET DST)<br>
|
|
From: Roland Smith <a href="mailto:rsmit06@ibm.net">
|
|
mit06@ibm.net</a><br>
|
|
|
|
|
|
<p>
|
|
Regarding your question in the Linux Gazette, there is a program that
|
|
can interpret postscript for different printers. It's called Ghostscript.
|
|
<p>
|
|
The smartest thing to do is to encapsulate it in a shell-script and then
|
|
call this script from printcap.
|
|
<P>
|
|
<pre><br>
|
|
----- Ghostscript shell script -------<br>
|
|
#!/bin/sh
|
|
#
|
|
# pslj This shell script is called as an input filter for the
|
|
# HP LaserJet 5L printer as a PostScript printer
|
|
#
|
|
# Version: /usr/local/bin/pslj 1.0
|
|
#
|
|
# Author: R.F. Smith <rsmit06@ibm.net>
|
|
|
|
# Run GhostScript, which runs quietly at a resolution
|
|
# of 600 dpi, outputs for the laserjet 4, in safe mode, without pausing
|
|
# at page breaks, writing and reading from standard input/output
|
|
/usr/bin/gs -q -r600 -sDEVICE=ljet4 -dSAFER -dNOPAUSE -sOutputFile=- -
|
|
------- Ghostscript shell script ------</pre><br>
|
|
<p>
|
|
You should only have to change the resolution <tt>-r</tt> and device <tt>-sDEVICE</tt>
|
|
options to something more suitable to your printer. See <tt>gs -?</tt> for a list
|
|
of supported devices. I'd suggest you try the cdeskjet or <tt>djet500c</tt>
|
|
devices. Do a <tt>chmod 755 <scriptname></tt>, and copy it to /usr/local/bin as
|
|
root.
|
|
<p>
|
|
Next you should add a Postscript printer to your /etc/printcap file. Edit
|
|
this file as root.
|
|
<p>
|
|
<pre>
|
|
-------- printcap excerpt -----------<br>
|
|
ps|HP LaserJet 5L as PostScript:\
|
|
:lp=/dev/lp1:\
|
|
:sd=/var/spool/lp1:\
|
|
:mx#0:\
|
|
:if=/usr/local/bin/pslj:sh<br>
|
|
-------- printcap excerpt ------------</pre><br>
|
|
<p>
|
|
This is the definition of a printer called <tt>ps</tt>. It passes everything it
|
|
should print through the pslj filter, which converts the postscript to
|
|
something my Laserjet 5 can use.
|
|
<p>
|
|
To print Postscript, use <tt>lpr -Pps filename</tt>.
|
|
<p>
|
|
change this to reflect your script name.
|
|
<p>
|
|
Hope this helps!
|
|
<p>
|
|
Roland
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="realaudio"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Realaudio without X-windows</h3>
|
|
Date: Sun, 7 Sep 1997 00:45:58 -0700 (PDT)<br>
|
|
From: Toby Reed <a href="mailto:toby@eskimo.com">toby@eskimo.com</a><p>
|
|
This is more of a pointer than a tip, but your readers might want to check
|
|
out traplayer on sunsite, it lets you play realaudio without starting up
|
|
an X server on your screen. Kinda useful if you don't like to use
|
|
memory-hog browsers just to listen to realaudio.
|
|
<p>
|
|
The file is available at sunsite.unc.edu/pub/Linux in the Incoming
|
|
directory (until it gets moved), and then who knows where. It's called
|
|
traplayer-0.5.tar.gz.
|
|
<P> <hr> <P>
|
|
|
|
|
|
<!--================================================================-->
|
|
<a name="dynamic"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Connecting to dynamic IP via ethernet </h3>
|
|
Date: Fri, 12 Sep 1997 13:22:06 +0200<br>
|
|
From: August Hoerandl <a href="mailto:hoerandl@elina.htlw1.ac.at">hoerandl@elina.htlw1.ac.at</a><p>
|
|
in LG 21 Denny wrote:
|
|
<p>
|
|
"Hello. I want to connect my Linux box to our ethernet ring here at my company.
|
|
The
|
|
problem is that they(we) use dynamic IP adresses, and I don't know how to get
|
|
an
|
|
address."
|
|
<p>
|
|
|
|
There is a program called bootpc (a bootp client for linux).
|
|
From the LSM entry (maybe there is a newer version now):<p>
|
|
<pre>
|
|
Title: Linux Bootp Client
|
|
Version: V0.50
|
|
Entered-date: 1996-Apr-16
|
|
Description: This is a boot protocol client used to grab the machines
|
|
ip number, set up DNS nameservers and other useful information.
|
|
Keywords: bootp bootpc net util
|
|
Author: ceh@eng.cam.ac.uk (Charles Hawkins)
|
|
Maintained-by: J.S.Peatfield@damtp.cam.ac.uk (Jon Peatfield)
|
|
Primary-site: ftp.damtp.cam.ac.uk:/pub/linux/bootpc/bootpc.v050.tgz
|
|
Alternate-site:
|
|
sunsite.unc.edu:/pub/Linux/system/Network/admin/bootpc.v050.tgz
|
|
Platform: You need a BOOTP server too.
|
|
Copying-policy: This code is provided as-is, with no warrenty, share and
|
|
enjoy.
|
|
</pre>
|
|
<p>
|
|
The package inludes a shell script to set up the ethernet card, send the
|
|
bootp request,
|
|
receive the answer and set up everything needed.
|
|
<p>
|
|
I hope this helps
|
|
<p>
|
|
Gustl
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="commandx"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Running commands from X w/out XTerm</h3>
|
|
Date: Fri, 26 Sep 1997 18:28:51 -0600<br>
|
|
From: "Kenneth R. Kinder" <a href="mailto:Ken@KenAndTed.com">Ken@KenAndTed.com</a><p>
|
|
I often found myself running XTerm just to type a single shell
|
|
commmand. After a while, you just wish you could run a single command
|
|
without even accessing a menu. To solve this problem, I wrote exec.
|
|
As the program name would emply, the exec program mearly prompts (in
|
|
X11) for a command, and replaces its own process with the
|
|
shell-orriented command you type in. Exec can also browse files, and
|
|
insert the path in the text box, incase you need a file in your command
|
|
line. Pretty simple huh? Exec (of course!) is GPL, and can be
|
|
downloaded at http://www.KenAndTed.com/software/exec/ -- I would
|
|
appreciate it if someone would modify my source to do more! =)
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="asciiftp"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Ascii problems with FTP</h3>
|
|
Date: Wed, 24 Sep 1997 12:42:05 -0400<br>
|
|
From: Carl Hohman <a href="mailto:carl@microserv-canada.com">carl@microserv-canada.com</a><p>
|
|
Andrew, I read your letter to the Linux Gazzette in issue 19. I don't
|
|
know if you have an answer yet, but here's my 2 bits...
|
|
<br>
|
|
If I understand correctly, you are using FTP under DOS to obtain Linux
|
|
scripts. Now, as you may know, the line terminators in text files are
|
|
different between Unix systems and DOS (and Apples, for that matter). I
|
|
suspect that what's happening is this: FTP is smart enough to know about
|
|
terminator differences between systems involved in an ascii mode
|
|
transfer and performs appropriate conversions silently and on the fly.
|
|
This give you extra ^M's on each line if you download the file in DOS
|
|
and then simply copy it (or use an NFS mount) to see it from Unix. I
|
|
suspect that if you use a binary tranfer (FTP> image) the file will
|
|
arrive intact for Linux use if it originates on a Unix server.
|
|
<p>
|
|
Hope this helps.<br>
|
|
Carl Hohman
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name="rhq"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Red Hat Questions</h3>
|
|
Date: Thu, 18 Sep 1997 14:06:08 -0700
|
|
<br>
|
|
From: James Gilb <a href="mailto:p27451@am371.geg.mot.com">p27451@am371.geg.mot.com</a><p>
|
|
Signal 11 crashes are often caused by hardware problems. Check out the
|
|
The Sig11 FAQ on: http://www.bitwizard.nl/sig11/
|
|
<p>
|
|
James Gilb
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<center>Published in Linux Gazette Issue 22, October 1997</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_mail22.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./lg_bytes22.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 © 1997 Specialized Systems Consultants, Inc. </H5>
|
|
<P>
|
|
<!--startcut ==========================================================-->
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|