Subject: Re: FVWM: continued line patch (Finding central/user system.fvwmrc)

From: [email-masked] (Jan-Erik Borg)
Date: Wed, 6 Mar 96 08:39:55 +0100

Hello!

Andrew "Alf" Leahy writes:
> 
> We run fvwm(version 1.24r) in a DEC labs (and have been for the past 3
> years). I am finally getting around to putting fvwm2 in our labs...
> problem is how can I setup a global ".fvwmrc". With fvwm1, I could define
> a "system.fvwmrc" which was read if a users' $HOME/.fvwmrc was not found.
> fvwm2 doesn't seem to let me do this?  I have tried playing with the
> Xsession script so it does something like: 
> 
>  if ($HOME/.fvwmrc exists) then
>     exec fvwm
>  else
>     exec fvwm -f /apps/fvwm/system.fvwmrc
>  endif
> 
> But I think I'm getting the syntax wrong for telling fvwm to use another
> fvwmrc file. 
> 
> I could certainly hardcode the location of the system.fvwmrc file, but I
> want to let student setup their own .fvwmrc if they want. 

My experience with FVWM 2 is that it looks for a central file named .fvwmrc
or .fvwm2rc (depending on your compilation set-up) in the directory were the
modules are located, e.g. in your case in /apps/fvwm/  . I used a link pointing
to the place were I store our central system.fvwmrc file. To override the 
central file each user just adds ~/.fvwmrc or ~/.fvwm2rc (the name depends on 
the compilation set-up).

I'am running FVWM 2.0.39 on SUN Sparc Solaris 1 with Openwindows 3.0 used
as X-server and have my modules installed in /usr/openwin/lib/fvwm2 with a 
link fvwm in /usr/openwin/lib/ pointing to fvwm2. I'm not 100% sure wether this 
link is required or not. I don't think it's important for me to find out as 
long as it works.

I hope this can be of any help to you.

Jan-Erik Borg

E-mail: [email-masked]
--
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: <[email-masked]> (Charles Hines)
Date: Wed, 6 Mar 1996 09:10:25 -0500

>>>>> "jeb" == Jan-Erik Borg <[email-masked]> writes:
>>>>> "AL" == Andrew "Alf" Leahy <[email-masked]> writes:

AL> We run fvwm(version 1.24r) in a DEC labs (and have been for the past 3
AL> years). I am finally getting around to putting fvwm2 in our labs...
AL> problem is how can I setup a global ".fvwmrc". With fvwm1, I could define
AL> a "system.fvwmrc" which was read if a users' $HOME/.fvwmrc was not found.
AL> fvwm2 doesn't seem to let me do this?  I have tried playing with the
AL> Xsession script so it does something like:

AL> if ($HOME/.fvwmrc exists) then
AL> exec fvwm
AL> else
AL> exec fvwm -f /apps/fvwm/system.fvwmrc
AL> endif

AL> But I think I'm getting the syntax wrong for telling fvwm to use another
AL> fvwmrc file.

Just slightly:

               fvwm -f "Read /apps/fvwm/system.fvwmrc"

I think I have to specify this in the docs a little better.

AL> I could certainly hardcode the location of the system.fvwmrc file, but I
AL> want to let student setup their own .fvwmrc if they want.

Understandable.

jeb> My experience with FVWM 2 is that it looks for a central file
jeb> named .fvwmrc or .fvwm2rc (depending on your compilation set-up)

Just a note here, I *HIGHLY* recommend keeping the defaults to be
fvwm2 for the exec and .fvwm2rc for the rc file, since fvwm will
probably coredump if it reads an rc file meant for 1.xx.  Plus that
way you can keep both of them installed on your system, in case
someone is more than happy using 1.xx.

jeb> in the directory were the modules are located, e.g. in your case
jeb> in /apps/fvwm/ . I used a link pointing to the place were I store
jeb> our central system.fvwmrc file. To override the central file each
jeb> user just adds ~/.fvwmrc or ~/.fvwm2rc (the name depends on the
jeb> compilation set-up).

That just about sums it up.  From the man page (as of 2.0.41):

     INITIALIZATION
          During initialization, fvwm will search for a configuration
          file which describes key and button bindings, and a few
          other things.  The format of these files will be described
          later.  First, fvwm will search for a file named .fvwm2rc
          (or .fvwmrc based on how it was compiled - .fvwm2rc is the
          default) in the users home directory.  Failing that, it will
          look for /usr/lib/X11/fvwm/.fvwm2rc for system-wide
          defaults.  If that file is not found, fvwm will be basically
          useless.

This is only slightly wrong.  /usr/lib/X11/fvwm/ will actually be
whatever you set FvwmDir set to in the Fvwm.tmpl file, or most likely
something like the above ($LIBDIR/fvwm2) if you don't have it set.

Also, I'm going to try and put more basic defaults hard coded into
fvwm's init process, to help nullify that last line about it being
useless without a config file...

jeb> I'am running FVWM 2.0.39 ...

You may want to pick up 2.0.41 as it fixes some bugs and should be
slightly faster at reading the rc file and processing events, plus has
improved docs and install process.

Chuck

*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

IBM Internal email:                        "Go back to sleep, Chuck.  You're
  [email-masked],              just havin' a nightmare--of course,
  HINESC at FISHKILL, HINESC at FSHVMFK1    we are still in Hell." Gary Larson
*******************************************************************************
--
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: <[email-masked]> (Charles Hines)
Date: Wed, 6 Mar 1996 10:16:15 -0500

>>>>> "jarl" == jarl  <[email-masked]> writes:

>> fvwm -f "Read /apps/fvwm/system.fvwmrc"

jarl> Forgive me for rushing in on this, but isn't this very little
jarl> (ahem) elegant?  I realize its value in having a consistent
jarl> syntax in which to run preprocessors, but IMHO it's not an
jarl> unreasonable request to be able to have fvwm understand the
jarl> intuitive

jarl>   fvwm -f /a/path/with/.fvwmrc_in_it

jarl> and I see no problem in making fvwm understand that it is a
jarl> simple filename when it fails to be a fvwm command. The '-f', to
jarl> most unix users, _implies_ that its argument is a file, so if
jarl> you want to give an fvwm command it should rather be something
jarl> like fvwm -cmd "an fvwm command line" (Which is indeed
jarl> supported).

jarl> I guess there is legitimate reason for not letting fvwm
jarl> understand a simple filename, so would someone please enlighten
jarl> me?
....
jarl> Forgive me if there is some point in this I've completely failed
jarl> to grasp, it just seems so silly not to support "fvwm -f
jarl> filename".

Rob changed that in 2.xx for some reason long before I took over, so I
can't answer "why" with any certainty other than what you mentioned
above (consistent syntax to run the preprocessor modules).  1.xx used
to behave the way you would like.  I've been thinking about changing
that back and it would be easy to do so.

I believe I put the -cmd parameter in there one day when toying with
the idea of changing that behavior of -f back to what you suggest (the
1.xx behavior) but I never finished.

So, for the sake of being/remaining consistent with other window
managers, I may do this for the next release.  Does anyone have any
serious objections to this?  I know it may mess people up for a few
moments until they read the ChangeLog, but I see no real problems
here.

Hey, it's still beta code so things like this are bound to happen. ;^)

Chuck

---

From: Tomas Vanhala <[email-masked]>
Date: Wed, 06 Mar 1996 18:02:32 +0200

> moments until they read the ChangeLog, but I see no real problems

Please do change this. I don't think I have seen any other UNIX program
with a "hidden" system-wide configuration file, so changing fvwm so that
it follows file naming conventions would be a good thing imho.

---

From: Jean-Marc Lasgouttes <[email-masked]>
Date: Wed, 6 Mar 1996 17:03:00 +0100

>>>>> "Chuck" ==   <[email-masked]> writes:

>>>>> "jarl" == jarl  <[email-masked]> writes:

    jarl> Forgive me if there is some point in this I've completely
    jarl> failed to grasp, it just seems so silly not to support "fvwm
    jarl> -f filename".

    Chuck> So, for the sake of being/remaining consistent with other
    Chuck> window managers, I may do this for the next release.  Does
    Chuck> anyone have any serious objections to this?  I know it may
    Chuck> mess people up for a few moments until they read the
    Chuck> ChangeLog, but I see no real problems here.

There has been a proposition on the list a while ago to make fvwm to
recognize a statement similar to #! in shell scripts and use the
correct command. This would allow to use Fvwm[M4][Cpp] when
appropriate.

Maybe it is time to add this. It should not be too complicated.

Jean-Marc

---

From: Gary Roberts <[email-masked]>
Date: Thu, 7 Mar 1996 08:29:09 +1000 (EST)

....
> it follows file naming conventions would be a good thing imho.

Strongly seconded!!  :-).

Cheers,
-- 
Gary Roberts  ([email-masked]) (Ph +617 3844 0400  Fax +617 3844 0444)
Director, ODCAA Well Control School, The University of Queensland,
4th Floor, South Bank House, 234 Grey St, South Bank  QLD 4101  Australia.
--
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].