Subject: FVWM_USERHOME bug & fvwm start without config

From: Olivier Chapuis <[email-masked]>
Date: Wed, 05 Apr 2000 23:04:16 +0200

Hello,

I think that there is a FVWM_USERHOME bug:
In some sense fvwm know FVWM_USERHOME even if it
is not set: in this case fvwm consider that $HOME
is $FVWM_USERHOME and some time (I do not understand
when and why) it is really set to HOME (try
the FvwmScript:
Set $F = (GetOutput {echo $FVWM_USERHOME} 1 -1)
Do {Echo } $F
with $FVWM_USERHOME not set the result is:
[FVWM][Echo]: $HOME   !!??!!?

I think that if the user do not set FVWM_USERHOME then
fvwm have to set it. Moreover, I think that the better
idea is to set it to ~/.fvwm in this case. Why ? because
imagine a user which start fvwm2 without config, then
he use the Setup Form and the Form copy 10 (non cached) 
files: DefaultFvwmBacker, Default* ... in ~/  !? 

Moreover, we can imagine a Welcome Script or Form that 
gives the choice between 

1. Setup Form
2. the future Setup95 Script
3. loading a .fvwm2rc from somewhere

and which is started if no configuration file is
found (E.g., FVWM_CONFIGDIR/system.fvwm2rc may contain
one line which start this Script/Form).

I'm ready to do a Welcome script.

Olivier

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

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 6 Apr 2000 05:54:38 +0200

> [FVWM][Echo]: $HOME   !!??!!?

For modules (and currently only for them) $FVWM_USERHOME is always set
and defaults, like in Read, to $HOME.

If we are speaking about this, here is an explanation why defining
  env FVWM_USERHOME=$HOME/.fvwm fvwm2 ...

as the WM command of a session menager is not enough. fvwm is restarted
by SM, and in the new process $FVWM_USERHOME is not set. So for "env ..."
to have effect, it should be added before gnome-session or xsm instead.

> fvwm have to set it.

I was among ones arguing setting any global environment in all spawned
processes. Now I think it is ok to have $FVWM_USERHOME to be explicitly
set if needed, for consistency, because now scripts may do the work of
modules (like fvwm-menu-* scripts). But this is not really a problem.
The problem is the $HOME default.

> Moreover, I think that the better

I will post a patch doing this correctly (i.e. without breaking anything).
I had this in my queue of things to do, from the time we decided on
~/.fvwm default (before feature freeze).

> I'm ready to do a Welcome script.

I have no an opinion here yet.

If you want to do something like this, you can write a Setup Wizard using
FvwmScript, prompting about downloading the latest fvwm-themes (which is
probably not small enough to be included in fvwm itself), then installing
it to the system or user space, and restarting fvwm with the new configs.
I can provide you with all needed shell commands to do this.

> Olivier

Regards,
Mikhael.

---

From: Dan Espen <[email-masked]>
Date: Thu, 06 Apr 2000 09:32:55 -0400

> I'm ready to do a Welcome script.

I don't understand what you are proposing.

We already have a setup form, "modules/FvwmForm/FormFvwmSetup.in".
Is that the same thing you are referring to in "1" above?

We don't really use anything from system.fvwm2rc  anymore, all of that
has been moved into a number of installable config files starting with
fvwm/ConfigFvwmSetup which gets installed as $FVWM_USERHOME/.fvwm2rc
by the setup form.  (Is'nt that the same thing you are describing in
"3" above?)

If you want to extend this to install a "95" type setup,
FormFvwmSetup would be the logical place to do it.

If you want to rewrite FormFvwmSetup using FvwmScript, I don't see
any problem with that.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Olivier Chapuis <[email-masked]>
Date: Thu, 06 Apr 2000 21:14:54 +0200

> Is that the same thing you are referring to in "1" above?

Yes.

> by the setup form.  (Is'nt that the same thing you are describing in

No, imagine that a user upgrade from 2.2.x to 2.4.X but now the default
installation for the config file is ~/.fvwm/.fvwm2rc. Then, with 3 he
can install the old ~/.fvwm2rc file in ~/.fvwm/ (and get some little pbs).
About the system.fvwm2rc my idea is that if a new user start fvwm without
config then fvwm gives some feedback: a welcome Script/Form is started
that give some instruction to install a config file (if not with some
new unix user it is: Ctl-Alt-F1, killall -9 fvwm2 because he see only
a grey screen). So my proposition for system.fvwm2rc is a one line config:
AddToFunc StartFunction I FvwmForm/Script Form/ScriptWelcome

> FormFvwmSetup would be the logical place to do it.

I suggest that the default config and sample-95 (and may be
other configs) have its own config script/form. For example,
for sample-95 I do a quite elaborated script that allows the
user to set some preferences (as the FormFvwmSetup ask the
user about adding modules configs). I will try to commit
as soon as possible my work on sample-95 for clarification.

Olivier

---

From: Dan Espen <[email-masked]>
Date: Thu, 06 Apr 2000 15:32:06 -0400

> AddToFunc StartFunction I FvwmForm/Script Form/ScriptWelcome

If a new user starts fvwm without a config file, almost anything
he does should cause the default menu to pop up.
(F1, Help, or any button press.)