758 lines
27 KiB
HTML
758 lines
27 KiB
HTML
<!--startcut ==========================================================-->
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
<html>
|
||
<head>
|
||
<title>More 2 Cent Tips & Tricks Issue 17</title>
|
||
</head>
|
||
|
||
<BODY BGCOLOR="#EEE1CC" 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_tips17.html#Xlimitation">X Limitation to 8 Bit Color</a>
|
||
<li><a HREF="./lg_tips17.html#blank">Screen Blanking Under X</a>
|
||
<li><a HREF="./lg_tips17.html#double">Doubleclick Internet User
|
||
Profiles</a>
|
||
<li><a HREF="./lg_tips17.html#mount">How to Mount/Unmount For Users</a>
|
||
<li><a HREF="./lg_tips17.html#zprotocol">File Transfer With the z Protocol
|
||
<li><a HREF="./lg_tips17.html#commands">Using ftp Commands in Shellscript</a>
|
||
<li><a HREF="./lg_tips17.html#asciiart">ASCII-Artwork Translator</a>
|
||
<li><a HREF="./lg_tips17.html#graphic">Including Graphics in Linuxdoc SGML</a>
|
||
<li><a HREF="./lg_tips17.html#xconfig">X Configuration Issues</a>
|
||
<li><a HREF="./lg_tips17.html#display">Multiple X Displays</a>
|
||
<li><a HREF="./lg_tips17.html#colordp">Color Depths with X</a>
|
||
<li><a HREF="./lg_tips17.html#boot">Figuring Out the Boot Process</a>
|
||
<li><a HREF="./lg_tips17.html#ftp">ftping Home</a>
|
||
</ul>
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="Xlimitation"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
X Limitation to 8 Bit Color
|
||
</H3>
|
||
<P>
|
||
From: Gary Masters <a href="mailto:="mailto:gmasters@devcg.denver.co.us">gmasters@devcg.denver.co.us</a>
|
||
|
||
<p>I read your question in Linux Gazette regarding an X limitation to 8 bit
|
||
color when the system has more than 14 megs of RAM.
|
||
|
||
Where did you find that information? I ask because my system has 24 megs
|
||
of RAM, and I run 16 bit color all the time.
|
||
|
||
One difference between our systems is that I am using a Diamond Stealth 64
|
||
video card.
|
||
|
||
<p>The place I tell X to run in 16 bit mode is in the file
|
||
/usr/X11R6/bin/startx. There is a line in this file that begins with
|
||
<tt>serverargs</tt>. I get 16 bit mode by giving "-bpp 16" as an argument in
|
||
this line (e.g. serverargs="-bpp 16").
|
||
|
||
<p>One problem I did have was that the OpenLook Window Manager (olwm) did not
|
||
like 16 bpp mode. I solved this by switching to the OpenLook Virtual
|
||
Window Manager (olvwm)[1]. I also had success using the Tab and FV Window
|
||
Managers (twm & fvwm) in 16 bpp mode.
|
||
|
||
|
||
<p>Coming from a SunOS background, I'm used to OpenLook.
|
||
|
||
|
||
<p>Gary Masters
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="blank"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Screen Blanking Under X
|
||
</H3>
|
||
<P>
|
||
From: Gary Masters <a
|
||
href="mailto:gmasters@devcg.denver.co.us">gmasters@devcg.denver.co.us</a>
|
||
|
||
<p>I read your question in the Linux Gazette regarding unwanted screen
|
||
blanking under X after upgrading to a newer distribution of Linux. I had
|
||
the same frustration. Apparently the X servers included in the Xfree86
|
||
version distributed with current Linux distributions has screen blanking
|
||
compiled as a default behavior.
|
||
|
||
<p>This behavior can be controlled with the -s option to the server. Look in
|
||
the startx script for a line that begins with serverargs and add "-s 0".
|
||
This will disable the X screen blank.
|
||
|
||
|
||
<P>
|
||
Gary Masters
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="double"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Doubleclick Internet User Profiles
|
||
</H3>
|
||
<P>
|
||
From: Kragen Javier Sittler <a href="mailto:kragen@pobox.com">kragen@pobox.com</a>
|
||
|
||
<p>Check out the description of what doubleclick.net does at
|
||
<a href="http://www.doubleclick.net/frames/adinfo/dartset.htm">http://www.doubleclick.net/frames/adinfo/dartset.htm</a>
|
||
|
||
<p>Then decide whether you want to be added to their database of Internet
|
||
user profiles. If not, you can use the script below; I run it in my
|
||
<pre>/etc/rc.d/rc.inet1</pre>. It prevents any DoubleClick banners from being
|
||
displayed, prevents any cookies from being set, and prevents DoubleClick
|
||
from collecting any data on you.
|
||
|
||
<p>It also does the same thing with linkexchange.com, because I find their
|
||
constant banners and requests for cookies annoying. If you'd prefer,
|
||
you can take out the linkexchange lines.
|
||
|
||
<p>However, this will also keep you from receiving *any* information from
|
||
doubleclick or linkexchange directly... so you can't visit their web
|
||
sites either.
|
||
|
||
<p>On my machine, I put the script in <pre>/etc/rc.d/rc.doubleclick</pre> and run
|
||
it from <pre>/etc/rc.d/rc.inet1</pre> at boot time, so I'm always protected from
|
||
DoubleClick.
|
||
|
||
<pre>
|
||
# Script begins below:
|
||
|
||
#!/bin/sh
|
||
# By Kragen Sitaker, 21 April 1997.
|
||
|
||
# Prevent any packets from reaching doubleclick.net
|
||
/sbin/route add -net 199.95.207.0 netmask 255.255.255.0 lo
|
||
/sbin/route add -net 199.95.208.0 netmask 255.255.255.0 lo
|
||
|
||
# And ad.linkexchange.com too!
|
||
/sbin/route add -net 204.71.189.0 netmask 255.255.255.0 lo
|
||
</pre>
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="mount"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
How to Mount/Unmount For Users
|
||
</H3>
|
||
<P>
|
||
From: Kidong Lee <a href="mailto:kidong@shinbiro.com">kidong@shinbiro.com</a>
|
||
|
||
|
||
<p>When I mount/umount file, I have to login as root.
|
||
It's not convenient for me & other users.
|
||
but, I found the solution that user who is not root can do mount/umount
|
||
in mount man page.
|
||
|
||
<p>Take a look at /etc/fstab.
|
||
<pre>
|
||
# <device> <mountpoint> <filesystemtype> <options> <dump>
|
||
<fsckorder>
|
||
/dev/hdb /cdrom iso9660 ro,user 0 0
|
||
</pre>
|
||
<p>Note "user" in options field.
|
||
In options field, if you add "user", users can do mount/umount.
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="zprotocol"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
File Transfer With the z Protocol
|
||
</H3>
|
||
<P>
|
||
From: Gregor Gerstmann, <a href="mailto:gerstman@tfh-berlin.de">gerstman@tfh-berlin.de</a>
|
||
|
||
<p>Regarding Linux Gazette issue16, April 1997, I have some remarks
|
||
regarding the article on file transfer with the z protocol:
|
||
'I type sz <filename> things go along fine, until about 40K
|
||
then I get a couple of different error messages....'
|
||
We have an internal modem with a transfer rate of 2880 cps on
|
||
the telephone line. My son has an account at a Berlin university
|
||
with a limited capacity of 5MB. We found the same error but not
|
||
limited to a special file size! During the night hours, between 1
|
||
and 5h local time, when telephone costs are lowest, we sometimes
|
||
transfered files up to 100KB without errors!
|
||
To avoid any errors at all, I limited the packages to 20 * 1024
|
||
= 20480 bytes, if a CRC occurs, transfer begins once more but with-
|
||
out timeout error, because the parcels are small. I use two proce-
|
||
dures: the first, Chop, generates another procedure that chops the
|
||
file to be transfered with the help of dd into packages and regu-
|
||
lates the transfer and removing of transfered packages. At home we
|
||
concatenate the packages again with cat ... ... > ... and everything
|
||
is ok. The last step could be done by a procedure too.
|
||
Of course, it is rather simple software, but it works until we
|
||
will use ISDN.
|
||
<p>
|
||
<pre>
|
||
first parameter - number of bytes
|
||
second - begin of output names, e.g. p1
|
||
third - name of file to be chopped
|
||
#!/bin/bash
|
||
echo "* Begin of procedure Chop *"
|
||
date
|
||
# rm alte Datei
|
||
if test -e /usr/TFH/EXAMPLE
|
||
then rm /usr/TFH/EXAMPLE
|
||
fi
|
||
# Test auf Parameter
|
||
if test $# -lt 3
|
||
then echo "Incorrect number of parameters !
|
||
Please repeat procedure call !"
|
||
echo "* End of procedure Chop (error) *"
|
||
exit 1
|
||
else echo "Call was ok"
|
||
fi
|
||
#
|
||
BY=$1
|
||
ANZZ=$[(($BY / 20480) + 1)]
|
||
quantity=$ANZZ
|
||
i=1
|
||
recs=0
|
||
while test "$i" -lt "$quantity"
|
||
do
|
||
echo dd if=$3 of=$2_$i bs=1024 skip=$recs count=20 >> /usr/TFH/EXAMPLE
|
||
echo sz $2_$i >> /usr/TFH/EXAMPLE
|
||
echo rm $2_$i >> /usr/TFH/EXAMPLE
|
||
i="`expr $i + 1`"
|
||
recs="`expr $recs + 20`"
|
||
done
|
||
echo dd if=$3 of=$2_$i bs=1024 skip=$recs >> /usr/TFH/EXAMPLE
|
||
echo sz $2_$i >> /usr/TFH/EXAMPLE
|
||
echo rm $2_$i >> /usr/TFH/EXAMPLE
|
||
#
|
||
echo "* End of procedure Chop (ok) *"
|
||
#
|
||
</pre>
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="commands"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Using ftp Commands in Shellscript
|
||
</H3>
|
||
<P>
|
||
From: Walter Harms, <a href="mailto:Walter.Harms@Informatik.Uni-Oldenburg.DE">Walter.Harms@Informatik.Uni-Oldenburg.DE</a><br>
|
||
|
||
|
||
Using FTP as a shell-command with ftplib<br>
|
||
<p>Working on several different networks means that you always
|
||
need to copy your data from net to net. Most ppl use rcp but like most SysOps
|
||
I found this to be a terrible security hole. So as I started this job my first
|
||
business was to rewrite several scripts that were using rsh,rcp etc.
|
||
I replaced them with an ftp based script ftp - <input> out 2> out.err.
|
||
It's easy to
|
||
see that this was not a good idea because ftp was not intended as shell-commando
|
||
like cp,mv and the other guys. So I was happy to find the ftplib on a
|
||
linux-CD. It's a nice lib that I used to build cmds like ftpmv, ftpcp, ftprm..
|
||
This made my scripts much slimmer and simpler. I have some terrible
|
||
copy-scripts running but no problems copying on different systems
|
||
like Ultrix or AIX.
|
||
|
||
<p>Example using ftpget (from the ftplib Author Thomas Pfau)
|
||
<pre>ftpget sunsite.unc.edu -r /pub/Linux ls-lR.gz</pre>
|
||
This command reads the file <pre>/pub/Linux/ls-lR.gz from sunsite.unc.edu</pre>
|
||
|
||
Likewise there are other commands with the lib: ftpdir ,ftpsend, ftprm
|
||
|
||
<p>Who needs ftplib?<br>
|
||
Everybody tired of typing ftp... every evening to
|
||
get the latest patches or whatever. Everyone who is regularly copying
|
||
with ftp the same Datafiles.
|
||
|
||
<p>Why use ftplib?<br>
|
||
Of course you can add it to you own application but more experienced users don't
|
||
have to use these r-commands anymore. An ftpd is available for the
|
||
majority of systems so it is easier to access more of them.
|
||
|
||
<p>Any drawbacks?<br>
|
||
Of course, for any ftp session you need a user/paswdr. I copy into
|
||
public area using anonymous/email@ others will need to surly a
|
||
password at login, what is not very useful for regular jobs or
|
||
you have to use some kind of public login but still I think it's
|
||
easier and better to use than the r-cmds.
|
||
<p>
|
||
-- walter
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="asciiart"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
ACSII-Artwork Translator
|
||
</H3>
|
||
<P>
|
||
|
||
Here is something interesting which you might consider for publication.
|
||
It is a short program written in LEX and C, which takes ASCII-Artwork
|
||
and translates it into HTML 3.0 compliant table data.
|
||
|
||
It is a pretty interesting idea, and as far as I know, I'm the first
|
||
person to try something like this, or automate the process.
|
||
|
||
The translator (a2t) has a few options:
|
||
<p>
|
||
<ul>
|
||
<li>-x : reverse the output
|
||
This is because some ASCII-Artwork is meant to be seen as
|
||
black on white and not white on black.
|
||
|
||
<li>-r value
|
||
<li>-g value
|
||
<li>-b value
|
||
Sets constant r,g, and or b, rgb values, so that the resulting
|
||
"grayscale" output can be altered to shades of a color.
|
||
|
||
<li>-w value
|
||
Sets the width of the resulting table.
|
||
</ul>
|
||
<p>The program was completed just today, so it is very new. I've
|
||
released it under the GNU license agreement.
|
||
|
||
<p>For some examples of the output generated by a2t, see:
|
||
<a href="http://wilkes.edu/~pkeane">http://wilkes.edu/~pkeane</a><br>
|
||
|
||
I think you'll find the results to be pretty amusing, and slightly
|
||
more interesting than the usual bag of HTML table-tricks.
|
||
<p>
|
||
Enjoy--
|
||
|
||
Patrick
|
||
<pre>
|
||
%{
|
||
|
||
/* Ascii-to-Table version 2.0
|
||
**
|
||
** A conversion utility to convert gifscii type ASCII-Artwork into
|
||
** grayscale HTML 3.0 compliant html documents using tables.
|
||
**
|
||
** Copyright(C) 1997 by Patrick J.M. Keane -- All rights reserved.
|
||
** (pkeane@wilkes.edu)
|
||
**
|
||
** This program is free software; you can redistribute it and/or modify
|
||
** it under the terms of the GNU General Public License as published by
|
||
** the Free Software Foundation; either version 2 of the License, or
|
||
** (at your option) any later version.
|
||
**
|
||
** This program is distributed in the hope that it will be useful,
|
||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
** GNU General Public License for more details.
|
||
**
|
||
** You should have received a copy of the GNU General Public License
|
||
** along with this program; if not, write to the Free Software
|
||
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
**
|
||
*/
|
||
|
||
#include <stdio.h>
|
||
#include <stdlib.h>
|
||
#include <unistd.h>
|
||
|
||
char shade1[4], shade2[4], shade3[4] ;
|
||
int reverse=0, widthset=0, width=0 ;
|
||
int shade1set=0, shade2set=0, shade3set=0 ;
|
||
|
||
void maketd(const char *value) {
|
||
printf("<td bgcolor=") ;
|
||
printf("#%s%s%s>",
|
||
((shade1set==0) ? value : shade1),
|
||
((shade2set==0) ? value : shade2),
|
||
((shade3set==0) ? value : shade3)) ;
|
||
printf("<font size=0> </font></td>") ;
|
||
}
|
||
|
||
main(int argc, char *argv[]) {
|
||
int c;
|
||
extern int optind;
|
||
extern char *optarg;
|
||
extern int opterr;
|
||
|
||
while ((c = getopt(argc, argv, "w:r:g:b:xh")) != EOF) {
|
||
switch (c) {
|
||
case 'x':
|
||
reverse = 1 ;
|
||
break;
|
||
case 'h':
|
||
fprintf(stderr, "Usage:\n\tcat asciifile | a2t [-h] [-x] [-[rgb] value] [-w width] > document.html\n\n") ;
|
||
fprintf(stderr, "\t-h : This help screen\n") ;
|
||
fprintf(stderr, "\t-x : Reverse output\n") ;
|
||
fprintf(stderr, "\t-r value : Constant R <R>GB value\n") ;
|
||
fprintf(stderr, "\t-g value : Constant G R<G>B value\n") ;
|
||
fprintf(stderr, "\t-b value : Constant B RG<B> value\n") ;
|
||
fprintf(stderr, "\t-w value : Set width of output table\n") ;
|
||
exit(0) ;
|
||
break;
|
||
case 'r':
|
||
shade1set = 1 ;
|
||
strcpy(shade1, optarg) ;
|
||
break ;
|
||
case 'g':
|
||
shade2set = 1 ;
|
||
strcpy(shade2, optarg) ;
|
||
break ;
|
||
case 'b':
|
||
shade3set = 1 ;
|
||
strcpy(shade3, optarg) ;
|
||
break ;
|
||
case 'w':
|
||
widthset = 1 ;
|
||
width = atoi(optarg) ;
|
||
break ;
|
||
default:
|
||
fprintf(stderr, "Bad option: %c\n", c);
|
||
exit(1) ;
|
||
break;
|
||
}
|
||
}
|
||
|
||
printf ("<title>Table Art!</title>\n") ;
|
||
printf ("<!---Generated by a2t version 2.0 by Patrick Keane--->\n") ;
|
||
printf ("<!---pkeane@wilkes.edu--->\n") ;
|
||
printf ("<body bgcolor=black text=white>\n") ;
|
||
printf ("<center>\n") ;
|
||
printf ("<table border=0 cellpadding=0 cellspacing=1") ;
|
||
if (widthset)
|
||
printf(" width=%d>", width) ;
|
||
else
|
||
printf(">") ;
|
||
printf ("<tr>\n") ;
|
||
yylex() ;
|
||
printf("</table></center>\n") ;
|
||
|
||
}
|
||
|
||
%}
|
||
|
||
%option yylineno
|
||
ws [ ]*
|
||
%%
|
||
|
||
"$"|"@" { (reverse) ? maketd("00") : maketd("ff") ; }
|
||
"W"|"M" { (reverse) ? maketd("20") : maketd("f7") ; }
|
||
"B"|"%"|"8"|"&" { (reverse) ? maketd("20") : maketd("f0") ; }
|
||
"#"|"*"|"9"|"6"|"H" { (reverse) ? maketd("20") : maketd("e7") ; }
|
||
"o"|"h"|"k" { (reverse) ? maketd("27") : maketd("e0") ; }
|
||
"4"|"5"|"S"|"K" { (reverse) ? maketd("30") : maketd("d7") ; }
|
||
"a"|"e"|"s" { (reverse) ? maketd("37") : maketd("d0") ; }
|
||
"b"|"d"|"p"|"q" { (reverse) ? maketd("40") : maketd("c7") ; }
|
||
"w"|"m"|"3" { (reverse) ? maketd("47") : maketd("b7") ; }
|
||
"z"|"O"|"0"|"Q" { (reverse) ? maketd("50") : maketd("b0") ; }
|
||
"L"|"G"|"D"|"C"|"2" { (reverse) ? maketd("57") : maketd("a7") ; }
|
||
"R"|"E"|"U"|"X" { (reverse) ? maketd("60") : maketd("a0") ; }
|
||
"N"|"A"|"Y"|"P" { (reverse) ? maketd("67") : maketd("97") ; }
|
||
"F"|"J"|"Z"|"z"|"c" { (reverse) ? maketd("70") : maketd("90") ; }
|
||
"g"|"y" { (reverse) ? maketd("77") : maketd("85") ; }
|
||
"x"|"v"|"u"|"n" { (reverse) ? maketd("80") : maketd("80") ; }
|
||
"="|"I"|"r"|"j"|"T" { (reverse) ? maketd("87") : maketd("77") ; }
|
||
"f"|"t" { (reverse) ? maketd("90") : maketd("70") ; }
|
||
"|"|"?"|"V"|"/"|"\\"|"7" { (reverse) ? maketd("97") : maketd("67") ; }
|
||
"["|"]"|"{"|"}" { (reverse) ? maketd("a0") : maketd("60") ; }
|
||
"<"|">"|"("|")" { (reverse) ? maketd("c5") : maketd("50") ; }
|
||
"i"|"l"|"1"|"|"|"!" { (reverse) ? maketd("d0") : maketd("40") ; }
|
||
":"|";"|"+"|"~" { (reverse) ? maketd("e0") : maketd("30") ; }
|
||
"^"|"\"" { (reverse) ? maketd("e7") : maketd("27") ; }
|
||
"-"|"_" { (reverse) ? maketd("ff") : maketd("20") ; }
|
||
"'"|"`" { (reverse) ? maketd("ff") : maketd("20") ; }
|
||
"."|"," { (reverse) ? maketd("ff") : maketd("20") ; }
|
||
{ws}"\n" { printf("<td bgcolor=black><font size=0> ") ;
|
||
printf("</font></td></tr>\n") ; }
|
||
" " { maketd("00") ; }
|
||
. { fprintf(stderr, "Warning: Character %s is not recognized.\n",
|
||
yytext) ;
|
||
fprintf(stderr, "Choosing a medium color!\n") ;
|
||
maketd("97") ; }
|
||
%%
|
||
|
||
void yyerror(char *msg) {
|
||
fprintf(stderr, "^GError :\tLine %d: %s at '%s'\n", yylineno, msg, yytext) ;
|
||
}
|
||
|
||
int yywrap() {
|
||
return (1);
|
||
}
|
||
</pre>
|
||
|
||
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="graphic"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Including Graphics in Linuxdoc SGML
|
||
</H3>
|
||
<P>
|
||
|
||
From: Martin Michlmayr<a href="mailto:tbm@cyrius.com">tbm@cyrius.com</a><br>
|
||
Date: Thu, Apr 17, 1997 at 07:48:19PM +0200<br>
|
||
|
||
You can already include PostScript images in Linuxdoc-SGML which
|
||
will get included in TeX output (and consequently in DVI and
|
||
PostScript). Linuxdoc-SGML doesn't support images for HTML,
|
||
however.
|
||
<p>
|
||
An example:
|
||
<pre>
|
||
<figure>
|
||
<eps file = "neuro">
|
||
<caption><label id = "decade">
|
||
Decade of the brain
|
||
</figure>
|
||
</pre>
|
||
|
||
<p>You can make references to the figure with <tt><ref id="decade"></tt>
|
||
|
||
<p>PostScript is already supported and the developer version of SGML-Tools
|
||
(the successor of Linuxdoc-SGML) now supports HTML as well. You
|
||
can specify a PostScript and a GIF file and depending on the output
|
||
(TeX or HTML) the respective image will be included.
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="xconfig"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
X Configuration Issues
|
||
</H3>
|
||
<P>
|
||
|
||
Date: Wed Apr 2 12:15:54 1997<BR>
|
||
From: Michael J. Hammel, <a href="mailto:mjhammel@emass.com">mjhammel@emass.com</a>
|
||
<p>If you get sufficiently tweaked by the X monitor config problems,
|
||
I
|
||
suggest X Inside's AcceleratedX package. Its much simpler to configure
|
||
than the XFree package for both cards and monitors. I used to work
|
||
for them, but haven't in over a year. I still use their package because
|
||
its the easiest to handle all the video card/monitor details.
|
||
|
||
<p>BTW, the monitor setup is menu based. If your monitor is not listed
|
||
you can just use one of the multisync if single frequency generic
|
||
configs. No dot clocks, but you do need to no your monitors frequency
|
||
capabilities. These should be listed in the monitors cdocumetntation.
|
||
|
||
<p>The package is a commercial distribution and runs about $100 (last time
|
||
I checked). They change their name to Xi Graphics recently and the domain
|
||
for xinside.com might not be working right now. Try <a
|
||
href="http://www.xig.com">http://www.xig.com</a>.
|
||
|
||
|
||
<p>--
|
||
Michael J. Hammel
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="display"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Multiple X Displays
|
||
</H3>
|
||
<P>
|
||
|
||
Date: Wed Apr 2 13:38:08 1997<br>
|
||
From: Michael J. Hammel <a href="mailto:mjhammel@emass.com">mjhammel@emass.com</a><BR>
|
||
|
||
<p>Setting up the software is probably fairly straight forward. I've
|
||
never used MetroX (I use AcceleratedX instead), however. Basically
|
||
you'll have two choices:
|
||
<ol>
|
||
<li> Multiple displays (host:0.0 and host:1.0)
|
||
<li> Multiple screens of the same display (host:0.0 and host:0.1)
|
||
</ol>
|
||
<p>The second choice is the one you need if you want to move the mouse
|
||
between the two monitors - like when the mouse goes past the right edge
|
||
of the first monitor it shows up on the left edge of the second monitor.
|
||
You'll have to check with Metro to find out which of these options is
|
||
supported and how to configure for it.
|
||
|
||
<p>The hardware problem is tougher. The problem lies in the fact that PC's
|
||
were not originally designed with the idea that multiple display
|
||
adapters would be installed. The BIOS looks for an adapter at certain
|
||
locations (IRQ, I/O address) and, unless the second card is configurable
|
||
to some other address, the system will find multiple cards. What
|
||
happens next is in-determinant. Some systems won't boot. Some do but
|
||
don't display to either monitor correctly.
|
||
|
||
<p>The trick is to find video adapters that were designed to be used
|
||
in conjunction with other video adapters. Many are not. The easiest
|
||
way for you to find out is check with Metro about what combinations of
|
||
video adapters they know work together. Chances are good the ones you
|
||
have don't. I know X Inside had a list of cards they knew work
|
||
together. You could search their web site (http://www.xinside.com or
|
||
http://www.xig.com) and see if that info is still there.
|
||
|
||
<p>Hope this helps.
|
||
<p>--
|
||
Michael J. Hammel
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="colordp"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Color Depths with X
|
||
</H3>
|
||
<P>
|
||
|
||
Date: Wed Apr 2 13:27:40 1997<br>
|
||
From: Michael J. Hammel <a href="mailto:mjhammel@emass.com">mjhammel@emass.com</a><BR>
|
||
|
||
After fiddling with the xf86config file in a concerted effort to coax X
|
||
into displaying 16 bit color, I was dismayed to learn that with my
|
||
current hardware (16 megs RAM and a Cirrus Logic GL-5426) 16 bit color
|
||
is *impossible*...not because of any hardware in-capability, but because
|
||
of a certain limitation of X Windows itself...a problem with linear
|
||
addressing. Seems that to have 16 bit color under X, one must have
|
||
linear addressing enabled, which only works if the system has *no more
|
||
than 14 megs RAM*.
|
||
|
||
<p>Horse hockeys. 16 bit color is a limitation of the video subsystem and
|
||
has nothing to do with the memory of your system. Linear addressing in
|
||
the XFree86 X servers might be tied to system memory amounts, but that
|
||
would be a limitation in the XFree86 server, not in X. X defines
|
||
"method without policy", so such limitations just aren't built into X.
|
||
|
||
<p>A couple of things you should note: The number of colors available
|
||
under 16bit displays is actually *less* than the number available to
|
||
8bit displays. Why this is true has to do with the way 16bit display
|
||
hardware works. The actual color palette for 8 bit displays can have
|
||
millions of colors - it can only display 256 colors at a time, however.
|
||
Frugal use of colormaps can allow you to have nearly exactly the right
|
||
colors for any given application. 16 bit displays only have a palette
|
||
of 65k (roughly) colors. Once those are used up, you're outta luck.
|
||
|
||
<p>I'm not completely clear on what makes this difference such a problem
|
||
but if you visit the Gimp User's mailing list (see the Linux Graphics
|
||
mini-howto: http://www.csn.net/~mjhammel/linux/lgh.html) and ask this
|
||
question you'll get similar replies. Its been discussed quite at length
|
||
on the developers list, and most of them read the User's list.
|
||
|
||
<p>BTW, if you want to see if Linear Addressing is the real problem, try
|
||
the X Inside AcceleratedX demo server and see if it works in 16 bit
|
||
color for you. Generally, your video card needs at least 1M of on board
|
||
RAM (not system memory - this is video memory on the video card) to
|
||
run in 16Bit mode, but then you'll probably only be able to run in
|
||
640x480 or (at most) 800x600 resolution. To run at higher resolutions
|
||
you'll need more video memory.
|
||
|
||
<p>Hope this helps.
|
||
<p>--
|
||
Michael J. Hammel
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="boot"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
Figuring Out the Boot Process</BR>
|
||
</H3><P>
|
||
|
||
Date: Fri, 04 Apr 1997 13:20:40 -0600<br>
|
||
From: David Ishee <a href=mailto:dmi1@Ra.MsState.Edu">dmi1@ra.MsState.Edu</a><BR>
|
||
|
||
One of the things that is confusing about Linux at first is which files
|
||
Linux uses to load programs and get the system started at bootup. Once
|
||
you figure out which programs are run during the boot process, which
|
||
order are they run? Here is an easy solution.
|
||
|
||
<p>On my Red Hat 4.0 system, the /etc/rc.d directory tree is where
|
||
everything happens. There are a lot of shell scripts in this set of
|
||
directories that are run when the system boots. To give yourself a
|
||
little more info, add some echo statements to the files. For example:
|
||
<pre>
|
||
edit /etc/rc.d/rc.sysinit and add the following lines at the beginning
|
||
|
||
echo " "
|
||
echo "**** Running /etc/rc.d/rc.sysinit ****
|
||
echo " "
|
||
</pre>
|
||
<p>Now when the system is booting you can see exactly when rc.sysinit is
|
||
run, and what programs it launches. Repeat the above process for all the
|
||
scripts you find.
|
||
|
||
<p>Now if the system hangs or gives an error during bootup you have a
|
||
better idea of where to look. If you don't have any problems while
|
||
booting then at least you have more info about what Linux is doing.
|
||
<p>
|
||
David
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
|
||
<a name="ftp"></a>
|
||
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
||
ftping Home</BR>
|
||
</H3><P>
|
||
|
||
Date: Thu, 3 Apr 1997 20:38:02 +0300 (EET DST)<br>
|
||
From: Kaj J. Niemi, <a href="mailto:kajtzu@4u.net">kajtzu@4u.net</a><br>
|
||
|
||
|
||
I read your article about ftping home with dynamic IPs.. Here's
|
||
something you might need if you get tired of looking at the screen every
|
||
time you want to find out the IP.
|
||
<pre>
|
||
ADDRESS=`/sbin/ifconfig | awk 'BEGIN { pppok = 0}
|
||
/ppp.*/ { pppok = 1; next }
|
||
{if (pppok == 1 ) {pppok = 0; print} }'\
|
||
| awk -F: '{print $2 }'| awk '{print $1 }'`
|
||
|
||
</pre>
|
||
<p>Just replace the ppp.* with whatever you want (if you have multiple
|
||
ppps running). The easiest thing would to be write a script called ftphome
|
||
(or similar) and make it first assign the address and then doing ftp or
|
||
ncftp $ADDRESS. The snippet is originally from a local firewall, at the part
|
||
where it needs to know what its' own address is. :-)
|
||
A friend of mine at <a href=mailto:mstr@ntc.nokia.com">
|
||
mstr@ntc.nokia.com</a> wrote this for me.
|
||
<p>
|
||
--
|
||
Kaj J. Niemi
|
||
|
||
|
||
|
||
<P> <hr> <P>
|
||
<!--================================================================-->
|
||
<center>Published in Linux Gazette Issue 17, May 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_mail17.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
|
||
<A HREF="./lg_bytes17.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
||
|
||
<P> <hr> <P>
|
||
<h5>This page maintained by the Assistant 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>
|
||
<!--endcut ============================================================-->
|