412 lines
16 KiB
HTML
412 lines
16 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<title>More 2 Cent Tips & Tricks LG #54</title>
|
|
</head>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<CENTER>
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.jpg"
|
|
WIDTH="600" HEIGHT="124" border="0"></H1></A>
|
|
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_answer54.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="betancourt.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 *** -->
|
|
<P>
|
|
</CENTER>
|
|
|
|
<!--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>
|
|
|
|
<!-- BEGIN tips -->
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name=""></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
<FONT COLOR="navy">Getting the most from multiple X servers - in the office and at home
|
|
</FONT> </H3>
|
|
Fri, 19 May 2000 10:31:27 +1000
|
|
<BR>From: Bob Hepple <<A HREF="mailto:bhepple@bit.net.au">bhepple@bit.net.au</A>>
|
|
|
|
<P> I wonder how many people know how to get the most from the power of X -
|
|
it really sets Unix apart from simple windowing PC's. Here is a tip that
|
|
I've been using for years - maybe it will be news to others as it's not
|
|
really documented anywhere for the average user, it's rather buried in
|
|
the man pages.
|
|
|
|
<P> To set the scene, poor old dad often has to stand aside to let the rest
|
|
of the family read their email, do their homework etc. This is a bit of
|
|
a fag on certain well known proprietary windowing systems as you would
|
|
have to
|
|
|
|
<P> save your work
|
|
exit all applications,
|
|
log out,
|
|
let them play through,
|
|
log them out,
|
|
log back in
|
|
restore all applications
|
|
|
|
<P> Rather than do all this, I simply create a new X session with the
|
|
following command:
|
|
|
|
<P> X :1 -query raita &
|
|
|
|
<P> where 'raita' is the name of my computer. A new X server starts up and
|
|
the visitor can log in and do their stuff. We can flip between their
|
|
session and my own with Ctrl-Alt-F8 and -F7. When they are finished,
|
|
they simply hit Ctrl-Alt-BackSpace or log out and I warp back to my own
|
|
workspace with Ctrl-Alt-F7.
|
|
|
|
<P> No loss of data, no messy loging in and out.
|
|
|
|
<P> You need to be running an XDMCP session manager (e.g. xdm, gm or kdm)
|
|
for this to work. You are using XDMCP if you get a graphical logon at
|
|
bootup. If you have a text-mode logon and run X with startx then you
|
|
might need to modify this approach.
|
|
|
|
<P> I also use this neat feature of X at work - we have many Unix systems
|
|
that I need to log into from time to time - Linux, Solaris and UnixWare.
|
|
I could use rlogin, rsh or xrsh but for some jobs nothing beats a full X
|
|
session.
|
|
|
|
<P> I can flip from one system to another by creating new X sessions on my
|
|
Linux workstation. Normally at work I use a slightly modified command:
|
|
|
|
<P> X :1 -indirect dun &
|
|
|
|
<P> ... where dun is runnning an XDMCP server (like xdm, gdm or kdm). It
|
|
then gives me a chooser that I can use to pick which system to log into.
|
|
|
|
<P> I often have many such sessions at once - just increment the display
|
|
number for each and they map to different 'hotkeys':
|
|
|
|
<P> X :1 -indirect dun .... Ctrl-Atl-F8
|
|
X :2 -indirect dun .... Ctrl-Atl-F9
|
|
X :3 -indirect dun .... Ctrl-Atl-F10
|
|
|
|
<P> with Ctrl-Alt-F7 being the default X display :0
|
|
|
|
<P> Another ploy is to use Xnest in a similar way. Instead of getting an
|
|
extra X server, Xnest runs a new X session in a window. I use this:
|
|
|
|
<P> Xnest :1 -indirect dun &
|
|
|
|
<P> or, if I want to use a full-sized screen I use:
|
|
|
|
<P> Xnest -geometry 1280x1024+0+0 :1 -indirect dun &
|
|
|
|
<P> There are some minor issues with font sizes when using a smaller window
|
|
but generally not too bad.
|
|
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name=""></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
<FONT COLOR="navy">Starting and stopping daemons
|
|
</FONT> </H3>
|
|
Fri May 26 16:13:11 PDT 2000
|
|
<BR>From: Mike Orr <<A HREF="mailto:mso@mso.oz.net">mso@mso.oz.net</A>>
|
|
|
|
<P> If you get tired of typing "/etc/init.d/apache reload" every time
|
|
you change your Apache configuration, or if you frequently start and stop
|
|
squid (e.g., to free up memory for extensive image editing), use
|
|
shell functions to take the tedium out of typing.
|
|
|
|
<P> The following functions allow you to type "start daemon", "stop daemon",
|
|
"restart daemon", and "reload daemon" to accomplish the same thing. They
|
|
should work on Debian or a
|
|
similar system which has a script for each daemon in
|
|
<STRONG>/etc/init.d/</STRONG>, where each script accepts
|
|
<STRONG>start</STRONG>, <STRONG>stop</STRONG>, <STRONG>restart</STRONG> and
|
|
<STRONG>reload</STRONG> as a command-line argument.
|
|
|
|
<P> I used <CODE>zsh</CODE>, so I put the following in my
|
|
<STRONG>/root/.zshrc</STRONG>:
|
|
|
|
<PRE>
|
|
function start stop restart reload { /etc/init.d/$1 $0 }
|
|
</PRE>
|
|
|
|
This creates four functions, each with an identical body. $0 is the command
|
|
name (e.g.; "start"); $1 is the first argument (the name of the daemon).
|
|
|
|
<P> The equivalent functions in
|
|
<CODE>bash</CODE> look like this:
|
|
|
|
<PRE>
|
|
function start { /etc/init.d/$1 start; }
|
|
function stop { /etc/init.d/$1 stop; }
|
|
function restart { /etc/init.d/$1 restart; }
|
|
function reload { /etc/init.d/$1 reload; }
|
|
</PRE>
|
|
|
|
<CODE>bash</CODE> puts "-bash" into $0 instead of the command name.
|
|
Perhaps there's another way to get at the command name, but I just chose to
|
|
make four functions instead.
|
|
|
|
<P> Debian actually puts the name of the package in
|
|
<STRONG>/etc/init.d/</STRONG>; this may be different than the name of the
|
|
daemon. For instance, the <CODE>lpd</CODE> daemon comes from a package
|
|
called <STRONG>lprng</STRONG>. An enhancement to the functions would be
|
|
to recognize <STRONG>lpd</STRONG>, <STRONG>lpr</STRONG> and <STRONG>lp</STRONG>
|
|
as synonyms for the easily-forgotten <STRONG>lprng</STRONG>.
|
|
|
|
|
|
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<a name=""></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
<FONT COLOR="navy">Disabling the console screensaver
|
|
</FONT> </H3>
|
|
Fri May 26 16:13:11 PDT 2000
|
|
<BR>From: Jim Dennis <<A HREF="mailto:jimd@starshine.org">jimd@starshine.org</A>>
|
|
|
|
<P> Shane Kennedy <<A HREF="mailto:skenn@indigo.ie">skenn@indigo.ie</A>>
|
|
asked the Answer Guy:
|
|
|
|
<BLOCKQUOTE>
|
|
How do I switch off the shell screensaver?
|
|
</BLOCKQUOTE>
|
|
|
|
<PRE>
|
|
setterm -blank 0
|
|
</PRE>
|
|
|
|
<P> It's a feature of the Linux console driver, not the
|
|
shell.
|
|
|
|
<!-- END tips -->
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<H4><font color="maroon">
|
|
Tips in the following section are answers to questions printed in the Mail
|
|
Bag column of previous issues. These tips were compiled with help from
|
|
<A HREF="mailto:iamalsogod@hotmail.com">Michael Williams</A> (Alex).
|
|
</font></H4>
|
|
|
|
<!-- BEGIN tips.answers -->
|
|
|
|
<hr>
|
|
<!--================================================================-->
|
|
<p align="center"> </p>
|
|
<!--================================================================-->
|
|
<p><img src="../gx/lil2cent.gif" width="126" height="51">
|
|
<a
|
|
name="kernelsplit"><font color="#000080"><strong>Linux Kernel Split</strong></font></a></p>
|
|
|
|
<p>Thu, 04 May 2000 08:34:09 -0500<br>
|
|
From: Christopher Browne <<a href="mailto:cbbrowne@hex.net">cbbrowne@hex.net</a>><br>
|
|
<br>
|
|
<br>
|
|
This can refer to to things:<br>
|
|
<br>
|
|
a) The fact that Linux kernel releases are split into
|
|
"stable" and "experimental" releases.<br>
|
|
<br>
|
|
Thus, versions numbered like 1.1.n, 1.3.n, 2.1.n, 2.3.n represent
|
|
"experimental" versions, where addition of new
|
|
functionality is solicited, whilst those numbered 1.0.n, 1.2.n,
|
|
1.4.n, 2.0.n, 2.2.n, 2.4.n represent "stable" versions,
|
|
where changes are intended to only be made to fix problems.<br>
|
|
<br>
|
|
Occasionally, "experimental" functionality gets
|
|
backported to the "stable" releases, but this is not
|
|
the norm.<br>
|
|
<br>
|
|
b) There is a theory that, at some point, development of Linux
|
|
could "split" to multiple independent groups.<br>
|
|
<br>
|
|
For instance, there are some people working on functionality
|
|
intended to support big servers (e.g. - SMP, various filesystem
|
|
efforts). And there are others building functionality supportive
|
|
of tiny embedded systems (Lineo, Embeddix, ...)<br>
|
|
<br>
|
|
The theory essentially goes that since their purposes are
|
|
different, there may be some point at which the needs may diverge
|
|
sufficiently that it will not make sense for there to be a single
|
|
point of contact (e.g. Linus Torvalds) to decide the direction of
|
|
development of _THE_ official<br>
|
|
Linux kernel.<br>
|
|
<br>
|
|
What might happen is that a group would take a particular version
|
|
of the Linux kernel source code, and start developing that quite
|
|
independently of another.<br>
|
|
<br>
|
|
For instance, there might be a "split" where the
|
|
embedded developers start developing the kernel in a way attuned
|
|
to their needs.<br>
|
|
<br>
|
|
This is _essentially_ what happened when OpenBSD
|
|
"split" off of the NetBSD project; the developers
|
|
concluded that they could not work together, and so a new BSD
|
|
variant came into being.<br>
|
|
<br>
|
|
The use of the GNU General Public License on the Linux kernel
|
|
does mean that it would be legally permissible for a person or a
|
|
group to perform such a "split." <br>
|
|
<br>
|
|
It would, however, be quite _costly_, in that it would mean that
|
|
the new group of developers would no longer have much benefit
|
|
from the efforts of people on the other side of the split. It is
|
|
a costly enterprise (whether assessed in terms of money, or,
|
|
better, time and effort) to keep independent sets of source code
|
|
"in sync" once they are purposefully taken out of sync.<br>
|
|
<br>
|
|
Hope this helps provide some answers to the question...</p>
|
|
|
|
<p align="center"> </p>
|
|
|
|
<hr>
|
|
<!--================================================================-->
|
|
<p align="left"><img src="../gx/lil2cent.gif" width="126"
|
|
height="51"> <a name="128ram"><font color="#000080"><strong>Incorrect
|
|
Tip....</strong></font></a></p>
|
|
|
|
<p align="left">Date: Sat, 13 May 2000 15:57:49 -0400<br>
|
|
From: Tony Arnett <lkp@bluemarble.net><br>
|
|
<br>
|
|
Tip given on Linux systems that do not recognize the total
|
|
almount of available ram.<br>
|
|
<br>
|
|
The tip given was to insert the following param into
|
|
"lilo.conf"<br>
|
|
<br>
|
|
<strong>append="ram=128M"</strong><br>
|
|
<br>
|
|
I had no such luck with this param. I think the proper param to
|
|
use is:<br>
|
|
<br>
|
|
<strong>append="mem=128M"</strong><br>
|
|
<br>
|
|
This worked for me on my Gentus Lunux 1.0 System.<br>
|
|
<br>
|
|
Here is my entire<font color="#FF0000"> <strong>lilo.conf</strong></font><br>
|
|
<br>
|
|
<br>
|
|
<strong>boot = /dev/hda<br>
|
|
timeout = 50<br>
|
|
prompt<br>
|
|
default = linux<br>
|
|
vga = normal<br>
|
|
read-only<br>
|
|
map=/boot/map<br>
|
|
install=/boot/boot.b<br>
|
|
image = /boot/vmlinuz-2.2.13-13abit<br>
|
|
label = linux<br>
|
|
initrd = /boot/initrd-2.2.13-13abit.img<br>
|
|
root = /dev/hda5<br>
|
|
append="hdc=ide-scsi hdd=ide-scsi mem=128M"<br>
|
|
other = /dev/hda1<br>
|
|
label = win</strong><br>
|
|
<br>
|
|
<br>
|
|
I hope this will help someone.<br>
|
|
<br>
|
|
Lost Kingdom Productions<br>
|
|
Tony Arnett<br>
|
|
<br>
|
|
<!--============================Editor=============================--></p>
|
|
|
|
<blockquote>
|
|
<p><em>[It is definitely </EM><CODE>append="mem=128M"</CODE></EM> as you
|
|
say. I use it myself. The only instance of "ram=" I
|
|
could find was in </em><a
|
|
href="http://www.linuxgazette.com/issue44/tag/46.html"><em>http://www.linuxgazette.com/issue44/tag/46.html</em></a><em>,
|
|
and it is quoted in part of the question, not as the answer.
|
|
If there are any other places where it says
|
|
"ram=128M", please let me know where and I'll fix
|
|
them immediately.<br>
|
|
<br>
|
|
I looked in the Bootprompt-HOWTO </em><a
|
|
href="http://www.ssc.com/mirrors/LDP/HOWTO/BootPrompt-HOWTO.html"><em>http://www.ssc.com/mirrors/LDP/HOWTO/BootPrompt-HOWTO.html</em></a><em>
|
|
and did not see a "ram=" parameter. There are some
|
|
"ramdisk_*=" parameters, though, but that's a
|
|
different issue. -Ed.]</em></p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
|
|
<!--================================================================-->
|
|
<p><img src="../gx/lil2cent.gif" width="126" height="51"><font
|
|
color="#000080"><strong>Re: Command line editing</strong></font></p>
|
|
|
|
<p><font color="#000000">Wed, 17 May 2000 08:38:09 +0200<br>
|
|
From: Sebastian Schleussner </font><a
|
|
href="mailto:Sebastian.Schleussner@gmx.de"><font color="#000000">Sebastian.Schleussner@gmx.de</font></a></p>
|
|
|
|
<blockquote>
|
|
<font color="#000000">I have been trying to set
|
|
command line editing (vi mode) as part of<br>
|
|
my bash shell environment and have been unsuccessful so far. You
|
|
might<br>
|
|
think this is trivial - well so did I.<br>
|
|
I am using Red Hat Linux 6.1 and wanted to use "set -o
|
|
vi" in my<br>
|
|
start up scripts. I have tried all possible combinations but it
|
|
JUST DOES<br>
|
|
NOT WORK. I inserted the line in /etc/profile , in my
|
|
.bash_profile, in<br>
|
|
my .bashrc etc but I cannot get it to work. How can I get this
|
|
done? This<br>
|
|
used to be a breeze in the korn shell. Where am I going wrong?</font>
|
|
</blockquote>
|
|
|
|
<p align="left"><font color="#000000">Hi!<br>
|
|
I recently learned from the SuSE help that you have to put the
|
|
line<br>
|
|
set keymap vi<br>
|
|
into your /etc/inputrc or ~/.inputrc file, in addition to what
|
|
you did<br>
|
|
('set -o vi' in ~/.bashrc or /etc/profile)!<br>
|
|
I hope that will do the trick for you.<br>
|
|
<br>
|
|
Cheers,<br>
|
|
Sebastian Schleussner<br>
|
|
</font></p>
|
|
|
|
<!-- END tips.answers -->
|
|
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <P>
|
|
<H5 ALIGN=center>
|
|
This page written and maintained by the Editor of the <I>Linux Gazette</I>.
|
|
Copyright © 2000, <A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A><BR>
|
|
Published in Issue 54 of <i>Linux Gazette</i>, June 2000</H5>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<!-- startcut ============================================================-->
|
|
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_answer54.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="betancourt.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>
|
|
|
|
</BODY></HTML>
|
|
<!-- endcut ============================================================-->
|
|
|