old-www/LDP/LG/issue30/clue30.html

177 lines
8.4 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Clueless at the Prompt Issue 18</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><H2>Clueless at the Prompt</H2>
<H4>By Mike List,
<a href="mailto:troll@net-link.net">troll@net-link.net</a></H4>
</center>
<P> <HR> <P>
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>
<h4>Welcome to installment 11 of Clueless at the Prompt:</h4>
<p>
How's it goin'? This month I'm going to go into some basic admin
ideas that you can use to make your home linux box a little
easier to deal with, especially in an emergency.
<p>
I'm also going to hit xdm on a couple of points, although I've got
the merest understanding of all the differences between it and
running from "startx"
<hr><p><h4>
*Boot/Rescue Disks:</h4> If you make a mockery of your filesystem
by typing for instance a space between "/" and the file you were
trying to rm as root, or your extraordinarily gifted child
discovers how to cold boot your computer while you're in X and have
a dozen windows open, or you accidentally kick the power strip
while you're stretching, or geez, need I go on? You may discover
one of the handiest things (two, actually) is a Boot/rescue/root
disk combo.
<p>
To use these , you simply reboot or cycle offthe computer as
"gracefully" as possible. Insert the boot disk, which can be your
install boot disk and start the bootup. instead of using your
install root disk, you drop a rescue disk in when prompted.
These disks can be gotten from your distribution's ftp site or
more conveniently, if you have linux on CDROM, guess where you
might get it, most likely wherever you got your boot image. You can
also roll your own, or use Yard to make a custom rescue disk. As a
side note, you can use this method to make a usable, if not very
flexible, minilinux system, something like xdenu.<p>
To use your rescue disk, boot up with your installation bootdisk,
and when you are prompted to insert root disk, just pop it in and
hold tight a second. when you get a prompt, you are almost ready to
fix your problems.You can run fsck on a disk partition without
mounting it, in fact that's the safest way to use it. If you
bollixed any init files, you can mount the /dev/?partition to "/mnt"
cd /mnt and using vi, edit the mistaken lines or even recreate them
if need be. One important note; your hard drive will be mounted
below /mnt, so don't do anything to "/" or you risk hosing your rescue
disk, not a nice thng to do when it's all that stands between you
and your linux system.There is even a defrag utility that you can
use after you fsck your filesystems, but you must make sure that
you only run it on UNMOUNTED filesystems or you'll be subject to a
REAL LEARNING EXPERIENCE!, as in learning to reinstall your box
from scratch, or practice on your backup routine.
<hr><p><h4>
*Xdm:</h4> If you ever thought it would be cool to be able to
start your linux box in X mode and logging in from an X screen, it
isn't too hard to do, using xdm, the X Display Manager. You can
easily start it by simply typing:
<pre>
xdm
</pre>
if you have X configured. It should start with a login screen, and
look like the twm window manager, tweed background and all, and
when you login for the first time, it probably will be twm,
particularly if you got your XFree86 distribution from xfree86.org,
although I'm really only accustomed to Slackware so another window
manager might come as default in say, RedHat or SuSe, or Debian
distributions. that can be changed, as can the tweed root window,
and the login message, and a great many other small details.
You should be aware that because of the way xdm invokes X, the path
will not be the same as if you run startx. That means that you must
either specify the full pathnames for executables or change your
path in the" " file.Your access to remote xhosts will be different
as well, a problem I haven't licked yet but by the time you finish
reading this I might(or you might, or we both might or ...).
<p>
Better yet break out your favorite editor, save your /etc/inittab file in
case of disaster and find the line that starts with id?:default
runlevel? and read the file down a few lines to where it describes
the runlevels and change to the one that describes X11R6 in Slackware
it would be runlevel 4, so change the id and the runlevel description
if you are a slacker, it may be different on other distributions,
since they mostly use BSD style init and have their rc.files directly
in /etc. That's enough to start Linux in a login screen.You could run
<pre>
locate xdm</pre>
to find the xdm files, and give them a good lookover. The files
you'll want to look at are the Xresources, Xsession, and Xsetup_0.
There are other files to work over but let's start with our local
desktop.
<p>
If you look at your Xsession file you'll see you need
these files in your home directory:.xinitrc and .Xresources. The
.xinitrc you may have in your home directory is a reasonable
default, and you can copy the system Xresources to your home
.Xresources. If you would like to use other files as your startup
and resources file, you'll need to specify them in the Xsession
file, at the lines that read:
<pre> startup=$HOME/.xinitrc
resources=$HOME/.Xresources
</pre>
you might use .openwin, instead of .xinitrc and .Xdefaults instead
of .Xresources, you'll have to lok at what X related dotfiles are
present in your home directory.
<p> Your Xsetup_0 fle can be used to start a background image in
the login screen using a command like:
<pre>
xv -root -quit /your/image/here
</pre>
assuming that you have xv installed on your system. You can use
other viewers to start the image, but you will have to read up on
the appropriate command line options for them. You can also enable
or disable the xconsole log, which can be used to notify you of
errors in execution, etc, by piping the xdm-errors file to it in
this file, although I haven't done it and am not real familiar with the
the specifics.
<hr><p><h4>
If you have any starting out type questions, or any tips you you
think would be handy for the newbie reader, please email me
at:</h4>
<center><a href="mailto:troll@net-link.net">troll@net-link.net</a><p>
<b>See you next month!</b></center>
<!--===================================================================-->
<P> <hr> <P>
<center><H4>Previous "Clueless at the Prompt" Columns</H4></center>
<p>
<A HREF="../issue14/clueless.html">Clueless at the Prompt #1 - February 1997</A><br>
<A HREF="../issue15/clueless.html">Clueless at the Prompt #2 - March 1997</A><br>
<A HREF="../issue16/clueless.html">Clueless at the Prompt #3 - April 1997</A><br>
<A HREF="../issue17/clueless.html">Clueless at the Prompt #4 - May 1997</A><br>
<A HREF="../issue18/clueless.html">Clueless at the Prompt #5 - June 1997</A><br>
<A HREF="../issue19/clue.html">Clueless at the Prompt #6 - July 1997</A><br>
<A HREF="../issue21/clue.html">Clueless at the Prompt #7 - September 1997</A><br>
<A HREF="../issue23/clue.html">Clueless at the Prompt #8 - December 1997</A><br>
<A HREF="../issue25/clueless.html">Clueless at the Prompt #9 - February 1998</A><br>
<A HREF="../issue26/clueless.html">Clueless at the Prompt #10 - March 1998</A>
<P><HR><P>
<center><H5>Copyright &copy; 1997, Mike List<BR>
Published in Issue 30 of the Linux Gazette, July 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./vrenios.html"><IMG SRC="../gx/back2.gif"
ALT=" Back"></A>
<A HREF="./bennet.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->