Subject: FVWM: Best place to set the environment?

From: "Felix E. Klee" <[email-masked]>
Date: Wed, 11 Feb 2004 19:50:40 +0100

Hi,

I wonder what is the best place to initialize environment variables.

Until recently, I let them be initialized with a line
    source .environment 
in my .xinitrc right before the window manager is started
(".environment" contains lines of the kind "export VAR=..."). An
advantage of this method is that .environment can, via ~/.bash_profile,
also be used to initialize a BASH login shell. A disadvantage is that I
have to restart the X server in order to reinitialize environment
variables "globally".

This disadvantage made me think of initializing the environment in my
FVWM config. I just tried the following setup which seems to work fine
("environment" contains lines of the type "setenv VAR ...",
"FVWM_ORIG_PATH" is used in order to reinitialize the path in
"environment").

AddToFunc StartFunction
...
+ I SetEnv FVWM_ORIG_PATH $[PATH]
AddToFunc InitFunction
+ I Read environment
AddToFunc RestartFunction
+ I Read environment

I wonder if this solution has any major drawbacks and if there is an
even better way to accomplish what I want (e.g. a way that lets me keep
my original ".environment").

Also, where do others initialize their environment?

Felix

PS: To contact me off list don't reply but send mail to "felix.klee" at
the domain "inka.de". Otherwise your email to me might get automatically
deleted!
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Dan Espen <[email-masked]>
Date: Wed, 11 Feb 2004 14:08:21 -0500

> "FVWM_ORIG_PATH" is used in order to reinitialize the path in

If the variable is just for fvwm, the fvwm config file is fine.
If it's for all your X applications, the .xinitrc makes sense,
especially if you might run another window manager.
Similar logic might lead you to your your .profile, or .kshrc
or .bashrc.

-- 
Dan Espen                           E-mail: [email-masked]