Subject: FVWM: .fvwmrc or .fvwm2rc

From: "Michael Yick" <[email-masked]>
Date: Mon, 7 Dec 1998 15:05:58 +0800

Hi,

I am confused which config file should I use. I have installed the RedHat 5.1 and configured the XF86.
I find that .fvwmrc is for ver.1.xx and .fvwm2rc is for ver.2.xx, right?
How can I find out which version I am running (beside looking at xinitrc because I cannot interpret it properly)?
Do I then use the appropriate configure file in my home directory?

Many thanks and regards,
Michael

---

From: "Frank Wilcox" <[email-masked]>
Date: Mon, 7 Dec 1998 02:23:51 -0500

> I find that .fvwmrc is for ver.1.xx and .fvwm2rc is for ver.2.xx, right?

right

> Do I then use the appropriate configure file in my home directory?

go ahead and look at your .xinitrc.  At the bottom there should be a 
line saying "fvwm &" or maybe "fvwm2 &".  To be sure of which 
version your running, find the shortcut ("fvwm" or "fvwm2") and do an 
"ls -l".  That'll tell you where the link points.  I'm afraid i can't be any 
more specific 'cause i'm in windoze right now.  I'll get Linux configured 
during Christmas break.  Right now exams are my major priority.

Since your running RH 5.1, i'd wager to guess that you are running 
fvwm 2.0.xx (i've got 2.0.46 around here somewhere...haven't gotten 
around to installing it yet).  If u get a "windoze-ish" interface, then 
your probably running fvwm95 (a hacked config of 2.0.45...i think).

bon chance ("good luck")

--
Frank Wilcox, Jr ([email-masked])
----------------------------------------------------
Safe upon the solid rock the ugly houses stand;
Come and see my shining palace built upon the sand.
              -"Second Fig" Edna St. Vincent Millay

Matthew 7:24-7
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: David Shochat <[email-masked]>
Date: Mon, 07 Dec 1998 06:18:53 -0500

Ah, but xinitrc is the key. I ran into the same problem myself, so I'll
tell you what I found out. I have RedHat 5.2 which has numerous window
managers, but the one that comes more or less pre-configured is fvwm2.
It
uses what you could call a "configuration scheme" called AnotherLevel,
which works as follows:

If you don't have your own ~/.xinitrc, the one that runs things is   
/etc/X11/xinit/xinitrc (no dot).
That in turn invokes Xclients (assuming no ~/.Xclients).
That looks for ~/.wm_style to see if you like things to look Windows
95-ish or Motif-ish (defaults to W 95 if no .wm_style). Then it invokes:
/usr/X11R6/bin/RunWM --Fvwm95 (assuming the W 95 case).
RunWM is actually a script which you can look at.

Here's where things get inconsistent. RunWM looks to see if you have 
~/.fvwm2rc.m4. If not, it's going to use
/etc/X11/AnotherLevel/fvwm2rc.m4
instead. Lets say you don't have ~/.fvwm2rc.m4 for example. Then the key 
next thing it does is:

exec fvwm2 -cmd FvwmM4 -debug /etc/X11/AnotherLevel/fvwm2rc.m4

You won't see that literally, but if you look at what all
the variables evaluate to, that's what you've got. Now what the "-cmd
FvwmM4" means is that the file specified is written in the m4 macro
language and is going to be preprocessed by m4 before being fed to
fvwm2.
To go further, you must learn the basics of the m4 language (although
you
are free to throw out the whole AnotherLevel scheme if you want to in
which case you could forget about m4). Can't find the m4 man page?
Neither
could I. That's because it's documented using the "info" system. If
you're
an Emacs user, you know all about that. You can also just invoke "info
m4"
from the command line. This is much better than a man page. It is
essentially a hypertext tutorial.

Once you come back from learning m4, you can look at fvwm2rc.m4. Now
remember, if you want your own customized version, you have to copy it
to 
your home directory as .fvwm2rc.m4 (add the dot). But if you look at
what
IT does, you'll find a glaring inconsitency. It "includes" a whole host
of
m4 special-purpose configuration files. The default ones are all in
/etc/X11/AnotherLevel. But if you want to customize, say,
fvwm2rc.defines.m4 (you probably do), should you copy it to
~/.fvwm2rc.defines.m4? No, that would be too logical. Instead, you have
to
copy it to ~/.fvwm2rc.defines (NO .m4 SUFFIX!). Whoever came up with all
this obviously didn't want you to figure it out. The same goes for all
the
other subsidiary configuration files.

The -debug after the FvwmM4 above, does something very valuable. It
causes
much of (but not all) the output from the m4 preprocessing of all those
files into a file in /tmp. for instance the one created most recently
for
me is:
/tmp/fvwmrca02670. It's instructive to look at this and the m4 "source" 
files side by side. It is this that gets fed to fvwm2.

Well, hopefully that's enough to get you started. I have not found any
place where the AnotherLevel scheme is documented!

-- David

> Michael Yick wrote:
> How can I find out which version I am running (beside looking at
> xinitrc because I cannot interpret it properly)?