old-www/LDP/LG/issue66/lg_tips66.html

346 lines
13 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3E.u">
<TITLE>More 2 Cent Tips & Tricks LG #66</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_answer66.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="adam.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
<!-- QUICK TIPS SECTION ================================================== -->
<!-- endcut ======================================================= -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.jpg">
More 2&cent; Tips!</A></H1> <BR>
<!-- BEGIN tips -->
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A></center>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips/1"
><strong>Easy LG browsing 2 cent tip</strong></a>
<li><A HREF="#tips/2"
><strong>vim hot color swapping</strong></a>
<li><A HREF="#tips/3"
><strong>linux version of dos commands</strong></a>
<li><A HREF="#tips/4"
><strong>Booting w/ CD-ROM</strong></a>
<li><A HREF="#tips/6"
><strong>dvi and Deskjet</strong></a>
<li><A HREF="#tips/7"
><strong>how to find an i/o adress for an specific pci slot</strong></a>
<li><A HREF="#tips/8"
><strong>Pam.d questions</strong></a>
<li><A HREF="#tips/9"
><strong>Finding my computer at home from the outside LG #65</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Easy LG browsing 2 cent tip</FONT></H3>
Fri, 20 Apr 2001 20:31:35 +1000 (EST)
<BR>bandido (<a href="mailto:linux-questions-only@ssc.com">bandido from drinkordie.com</a>)
<P>
This handy dandy function is courtasy of Cobratek on <tt>#Mandrake</tt>
on Efnet, it is super kewl, since you can unpack all your LG issues (you
do have all 65 don't you?) and instanty view any one.
</P>
<P>
Simply add this function to either <tt>~/.bashrc</tt> or better yet
<TT>/etc/bashrc</TT> so everyone on your system can read LG.
</P>
<P><code>
function lg () { lynx /home/bandido/docs/Linux.Gazette/$1/index.html ; }
</code></P>
<P>
Remember to change path to whatever you unpack your LG issues to, and do
not use <tt>~/</tt> dirname of course if you put the function in
<TT>/etc/bashrc</TT>
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P>
Personally I unpack all issues like this,
</P>
<P><code>
<br>/home/bandido/doc/Linux.Gazette/1
<br>/home/bandido/doc/Linux.Gazette/2</code>
<br>3 4 5
<br>etc
</P>
<P>
Thus, I type lg 20 or lg 35 etc, to open 20 or 35 instanlty in lynx, and I
am in prior dir when I exit. Nice and handy, never far away from LG
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
Feel feel to drop by <tt>#Mandrake</tt> on Efnet too, unlike most linux
channeols, newbies are very much welcome.
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">vim hot color swapping</FONT></H3>
Thu, 19 Apr 2001 07:37:04 -0700
<BR>Adam Monsen (<a href="mailto:linux-questions-only@ssc.com">meonkeys from hotmail.com</a>)
<P>
Vim's syntax highlighting can be helpful at times at painful at other times.
Add this to your <tt>.vimrc</tt> and you can turn colors on and off with
the tap of a button.
</P>
<Pre>
" map F8 to switch on and off syntax highlighting
function Swapcolor()
if exists("g:syntax_on")
syntax off
set nohlsearch
else
syntax on
set hlsearch
endif
endfunction
map &lt;F8&gt; :call Swapcolor()&lt;CR&gt;
</Pre>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">linux version of dos commands</FONT></H3>
Sun, 01 Apr 2001 15:06:34 -0700
<BR>Steve Winston (<a href="mailto:linux-questions-only@ssc.com">xee from mediaone.net</a>)
<P>
They start with letter "m." They look at a floppy disk as "a:" or "a:\"
as Windoze
does.
<br>To copy one file to another, use "mcopy"
<br>If you want to copy a file "myfile" from <tt>a:</tt>
to your home directory, use this command:
</p>
<blockquote><code>
mcopy a:\myfile /home
</code></blockquote>
<p>If you want to copy myfile from <TT>/home</TT> to <tt>a:</tt> use this
command:
<blockquote><code>
mcopy /home/myfile a
</code></blockquote>
<p>
To check the contents of a file or directory, use mdir.
<br>To check the contents of a:
</P>
<blockquote><code>
mdir a:
</code></blockquote>
<P>
Hope that helps a little bit,
<br>stevew
</P>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Booting w/ CD-ROM</FONT></H3>
Tue, 17 Apr 2001 23:38:57 -0400
<BR>joseph.lalingo (<a href="mailto:linux-questions-only@ssc.com">joseph.lalingo from ablelink.org</a>)
<BR>Tip from Daniel S. Washko
<P><STRONG>
Hello,
</STRONG></P>
<P><STRONG>
How can I use CFDISK from my REDHAT CD-ROM as though it was from a
hard drive linux installation?
</STRONG></P>
<P>
If this is during the install process, I am pretty sure you could hit
&lt;ctrl&gt;&lt;alt&gt;&lt;f1-?&gt; to switch to another terminal. Keep cycling through the
keys until you find a free terminal. You should then be able to use
cfdisk.
</P>
<P>
-- Daniel
</P>
<!-- sig -->
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">dvi and Deskjet</FONT></H3>
Sat, 14 Apr 2001 09:55:53 -0400
<BR>C. Martinet (<a href="mailto:linux-questions-only@ssc.com">email from cmarti.net</a>)
<br>Tip from Ben Okopnik
<P><STRONG>
Dear answer guy,
</STRONG></P>
<P><STRONG>
I would like to print a dvi file on an HP600 deskjet printer. Is it possible ?
I've tried with the commands dvilj, dvilj2p, dvilj4 and dvil4l, but there
are all for LaserJet printers. So I have some strange results.
</STRONG></P>
<P>
Have you tried "dvihp"? It's supposed to convert DVIs to HP PCL (Printer
Control Language.) Or, you could always just run "dvips" - it'll produce a
PostScript file that you should be able to print without any problems.
<br>-- Ben</P>
<!-- end 6 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">how to find an i/o adress for an specific pci slot</FONT></H3>
Thu, 29 Mar 2001 09:35:37 -0800
<BR>Christer Olsen (<a href="mailto:linux-questions-only@ssc.com">christer.olsen from cegal.com</a>)
<br>Tip from Mike Orr
<P><STRONG>
i need to find out the slot adress for my pci network card , how can i
easily track down this
</STRONG></P>
<P><STRONG>
my network card is in slot 1 and i need to find out the adress
(0x0081 or ???)
</STRONG></P>
<P>
Does it say in the boot messages? Run "dmesg | less" to see your boot
messages again. If you don't find the right information, please
send us back a copy of your boot messages (in particular, the portions
beginning with "PCI: " and anything that looks like it may be related
to the network card).
</P>
<P>
Each PCI slot corresponds to a fixed address. Perhaps looking in
<tt>include/linux/pci.h</tt> or <tt>drivers/pci/pci.c</tt>
in the kernel source would help.
<br>-- Mike</P>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Pam.d questions</FONT></H3>
Tue, 3 Apr 2001 15:11:42 +1000
<BR>andrew (<a href="mailto:linux-questions-only@ssc.com">andrewkennedy from optusnet.com.au</a>)
<BR>Tips from Faber Fedor, Ben Okopnik, and Heather Stern
<P><STRONG>
Back for more of your knowledge
</STRONG></P>
<P>
And we're still here dishing it out!
</P>
<P><STRONG>
I have an authlog file &amp; i keep seeing this info within it
</STRONG></P>
<pre><strong>Apr 3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Icore^I0'
Apr 3 11:31:58 echelon pam_limits[27640]: invalid line 'soft^Inproc^I100'
Apr 3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Inproc^I150'
Apr 3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Ifsize^I40000'
</strong></pre>
<P><STRONG>
Pam was installed via an RPM &amp; seems to be working fine within everything else.
</STRONG></P>
<P><STRONG>
I would just like to fix this area of it if possible
</STRONG></P>
<P>
Check your <TT>/etc/security/limits.conf</TT> file. It seems PAM doesn't like it.
Why? I don't know, but I checked my limits.conf file and my columns were
separated by spaces, not tabs.
</P>
<P>
If you do a <tt>cat -v -t -e /etc/security/limits.conf</TT>, you'll see tabs
as <tt>^I</tt> and eon-oflines as <tt>$</tt>. -- Faber
</P>
<P>
Just to be nitpicky, <tt>cat -A</tt> is a combination of those options. -- Ben
</P>
<P>
<tt>cat -T</tt> is enough to see the dratted tabs as <tt>^I</tt> but stray
spaces at the end of the line still won't be obvious. -- Heather
</P>
<!-- end 8 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips/9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Finding my computer at home from the outside LG #65</FONT></H3>
Wed, 11 Apr 2001 11:17:02 -0400
<BR>Ben Walton (<a href="mailto:linux-questions-only@ssc.com">bdwalton from mail.lakeheadu.ca</a>)
<P>
Hi there Linux Gazette Team!
</P>
<P>
I was browsing through LG today, and came across the article 'Finding my
computer at home from the outside'. This is a topic that interests me,
as I like to be able to access my home machine from school. Although
technically accurate, I found that writing these scripts is an extremely
cumbersome way to do the job. (Not to mention that passwordless logins
(secure tunnel or no) are just plain bad form...). I'm not writing this
email to complain (you guys do too much good work), but rather to
inform!
</P>
<P>
If you're in a situation like me, and you either can't get (or can't
afford) a static IP on broadband, there is a much simpler solution.
<A HREF="http://www.dyndns.org"
>http://www.dyndns.org</A>. A free service (they DO accept
donations), DynDNS allows you to register a hostname (within one of
their domains...for now), and run a client to update with them each time
your IP changes. After registering with DynDNS, you can download a
little client utility (I prefer ipcheck.py), and have it run from your
<TT>/etc/ppp/ip-up</TT> script (I'm on DSL, so my connection is still
PPP)...which is run every time that your IP changes.
</P>
<P>
I've found the service to be most valuable.
</P>
<P>
Thanks
<br>-Ben Walton
</P>
<!-- sig -->
<!-- end 9 -->
<!--startcut ======================================================= -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2001
<BR>Published in issue 66 of <I>Linux Gazette</I> May 2001</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
</BODY></HTML>
<!--endcut ========================================================= -->