[svlug] Major help on x

Karsten M. Self kmself at ix.netcom.com
Sat Jan 9 10:46:18 PST 1999

Judi Mouser wrote:

> I have almost no experience in configuring a Linux box. I killed my x
> window manager by editing some text files. Didn't have backup. I use
> Redhat Linux so it installed everything I needed during the install
> process. How do I just reconfigure the x window manager thing back to
> default configuration or how to I install it. Any help would be greatly
> appreciated. Thanks

Matt, it would help to know which text files you edited.  I'm suspecting
one of them was /etc/X11/XF86Config.  Silly rabit, don't do that.  It
would also help to know what happens when you attempt to start X. 
Assuming you don't boot directly into an X session (usually runlevel 5,
aka xdm), you would normally type "startx" or "startx <arguments>" at
the command line to initiate an X session.  You can save the error
output from this as follows:

  # startx 1> startx.log 2>&1

Look at the file created (startx.log) and see what it tells you.  Often
it's something along the lines of "no available video mode" (I'm making
this up from memory, haven't had a bad X session recently).

All is not lost.  You have at least two options:
 - Run Xconfigurator (/usr/share/Xconfigurator) to build a new 
   XF86Config file.  It will prompt you through a series of 
   screens according to your HW and display preferences.

 - Re-install RH.  This is drastic, but it should fix the problem.
   *Before* you do this, back up any user files, downloads, *and the
    /etc directory*.  You won't want to restore everything from
    your old /etc configuration, but you will use these files to
    help establish your new settings.

Once you've created a working XF86Config, *BACK IT UP*.  I routinely do
the following with my /etc files:

 - tar /etc to floppy.  It fits easily, and is quick and painless to do.
 - Use RCS to control changes to files.  RCS is a basic version control 
   system, and is the backbone of more serious systems such as CVS.  
   For system administration, where typically only one user is involved
   in modifications, RCS is sufficient.  The commands you need are:

   # mkdir RCS 	

Create an RCS subdirectory of /etc.  rcs uses this to store its archive
files.  You might also want to create RCS subdirectories of other RCS
directories, including /etc/X11.

   # ci -u *

Checks in all files in the current directory.  rcs will skip over
directories with an error message.  You will be prompted for information
on each file.  A line with a single '.' will end this field.

To work with a file:

  # co -l file

Check out (and lock) "file".  Make your changes to it with your favorite
editor or random value generator <g>

  # ci -u file

Check in file and leave an "unlocked" version in the directory.

You can also commit changes while continuing to edit the file with:

  # ci -l file

Note that a "locked" rcs file has _write_ permission _enabled_ -- it is
"locked" for use by a particular user.  An "unlocked" rcs file is
_read-only_.  It is available to _be locked_ by a user.

The basic rcs commands are:  

 - rcs      -- general admin
 - co       -- check out
 - ci       -- check in
 - rlog     -- provide information on rcs file(s) queried.

See man pages for more information.  O'Reilly has a book "Applying RCS
and SCCS" which is a good introduction, though I've got some complaints
about it in other regards.  There is an upcoming book which covers CVS
and might be a better reference.  The "UNIX in a Nutshell" book includes
a section on RCS and SCCS commands.  This is _not_ included in the
"Linux in a Nutshell" version (for shame!).

Karsten M. Self (kmself at ix.netcom.com)

    What part of "Gestalt" don't you understand?
    Welchen Teil von "Gestalt" verstehen Sie nicht?

web:       http://www.netcom.com/~kmself
SAS/Linux: http://www.netcom.com/~kmself/SAS/SAS4Linux.html    

 10:11am  up 7 days, 11:24,  9 users,  load average: 0.24, 0.16, 0.10

echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe
see http://www.svlug.org/mdstuff/lists.shtml for posting guidelines.

More information about the svlug mailing list