Re: FVWM: FVWM Environment variables
On Sat, 2007-07-14 at 19:14 +0100, Thomas Adam wrote: And how might you be starting FVWM? Are you relying on the use of ~/.xsession? Is FVWM even being told where to look for the config file? (Assuming it's not already /root/.fvwm/config, or one of the other seven different varieties the man page lists as being part of its search procedure.) /root/.Xclients: #!/bin/sh exec fvwm It's the same way I'm starting FVWM from my user account. For the root account, FVWM finds the configuration file in `fvwm-config -d`/config. Xterm uses options set by 'SetEnv', ImagePath is set that way, as well as others, so I know the variables are getting set... The only issue I'm seeing is that when I open a shell and do an 'env', I see none of my variables.
Re: FVWM: FVWM Environment variables
[ Grumbles about stupid shed-painting... ] On 13/07/07, Ryan Daly [EMAIL PROTECTED] wrote: On Thu, 2007-07-12 at 20:43 -0400, Gautam Iyer wrote: Erm. This is a feature of su and not fvwm. I think su clears most variables before starting a root shell. For instance if I do env ASDF=hello su - on my system, then root still can not see the environment ASDF. You might be able to do some pam magic to disable this... I AM NOT DOING AN 'su' TO ROOT. I am logging in from XDM as root and not seeing the environment that I'm specifying in my configuration. And how might you be starting FVWM? Are you relying on the use of ~/.xsession? Is FVWM even being told where to look for the config file? (Assuming it's not already /root/.fvwm/config, or one of the other seven different varieties the man page lists as being part of its search procedure.) -- Thomas Adam
Re: FVWM: FVWM Environment variables
On Thu, 2007-07-12 at 20:43 -0400, Gautam Iyer wrote: Erm. This is a feature of su and not fvwm. I think su clears most variables before starting a root shell. For instance if I do env ASDF=hello su - on my system, then root still can not see the environment ASDF. You might be able to do some pam magic to disable this... I AM NOT DOING AN 'su' TO ROOT. I am logging in from XDM as root and not seeing the environment that I'm specifying in my configuration.
Re: FVWM: FVWM Environment variables
On Fri, 2007-07-13 at 10:04 +1000, Cameron Simpson wrote: If they're in your personal .fvwmrc file, of course root doesn't see them. Only you run your personal .fvwmrc file. Root has his own FVWM environment. I'm aware of /etc/profile and the like...
Re: FVWM: FVWM Environment variables
On 11Jul2007 21:14, Harald Kirsch [EMAIL PROTECTED] wrote: | Changing a variable in a parent process, can never influence variable in | a child process *which is already running*. | | Consequenly your only options are | a) indeed completely start FVWM anew or | b) use the built in functionality SetEnv. I take the latter approach myself. Of course, normally I don't need to feed environment updates to FVWM. But sometimes I want to change a setting across the board, for all new windows and shells etc. To this end I have two special arrangements in my shell environment. First, at each prompt my shell contrives to source ~/var/env.sh, a file with VERY FEW variable assignments that I really want to stick everywhere. Second, I have a shell function called setenv() (I don't use csh so this name is available) that sometimes I invoke like the csh setenv command. If I give it a -g option (global) it also appends the setting to the env.sh file _and_ passes the setting to my active FVWM. Regarding the latter, I have FVWM start the FvwmCommandS module thus: Module FvwmCommandS and have setenv() pass the variable to FVWM by saying: FvwmCommand SetEnv $var $value where $var is the variable name and $value its new value (suitably quoted). Cheers, -- Cameron Simpson [EMAIL PROTECTED] DoD#743 http://www.cskk.ezoshosting.com/cs/ These peoples' daily routines have subtly altered. Where before they would have performed the following actions on reaching the department: a. Enter building; b. scurry along corridoor; c. turn on terminal in passing; d. approach office; e. turn on kettle; f. run back to computer; g. logon; h. run back to kettle; i. pour coffee; j. return to computer with coffee; k. read news; l. start work; they have now inserted a new command into the program at point b. pull Babs' ponytail - Babs [EMAIL PROTECTED] in alt.peeves
Re: FVWM: FVWM Environment variables
On 7/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [snip] Doing the above, can you then use those environment variables in shells started by FVWM, or is their use limited to FVWM? -- You CAN actually use them in shells and all other programs started from FVWM. (FVWM is the parent and propagates its environment to its children). I even use fvwm to set some environment variables for my shells instead of in .bashrc or some-such. -- Met vriendelijke groeten / With kind regards Hans Voss --- * Senior Consultant Open Source, Networking and Security * google talk enabled * General Open Sourcerer.
Re: FVWM: FVWM Environment variables
Hans Voss said: You CAN actually use them in shells and all other programs started from FVWM. (FVWM is the parent and propagates its environment to its children). I even use fvwm to set some environment variables for my shells instead of in .bashrc or some-such. I have converted my config to use the FVWM SetEnv instead of via .cshrc or the like. One issue I appear to be having, though, is that when the root user logs in, I do not see the various environment variables if I issue an 'env'. However, I do feel they're getting set because various settings (ImagePath for one) relies on these environment variables. Is there any reason why root wouldn't see these variables?
Re: FVWM: FVWM Environment variables
On 7/12/07, Ryan Daly [EMAIL PROTECTED] wrote: Hans Voss said: You CAN actually use them in shells and all other programs started from FVWM. (FVWM is the parent and propagates its environment to its children). I even use fvwm to set some environment variables for my shells instead of in .bashrc or some-such. I have converted my config to use the FVWM SetEnv instead of via .cshrc or the like. One issue I appear to be having, though, is that when the root user logs in, I do not see the various environment variables if I issue an 'env'. However, I do feel they're getting set because various settings (ImagePath for one) relies on these environment variables. Is there any reason why root wouldn't see these variables? If the vars are set by a user then root can't see them, and the same applies the other way round. (I guess, can't test that now..) Renato
Re: FVWM: FVWM Environment variables
seventh guardian said: If the vars are set by a user then root can't see them, and the same applies the other way round. (I guess, can't test that now..) Let me clarify... When I'm logged in as root, I see no variables. I then completely log out and log back in again as a regular user and I can see the variables.
Re: FVWM: FVWM Environment variables
On 12Jul2007 17:42, Ryan Daly [EMAIL PROTECTED] wrote: | seventh guardian said: | If the vars are set by a user then root can't see them, and the same | applies the other way round. (I guess, can't test that now..) | | Let me clarify... | | When I'm logged in as root, I see no variables. | | I then completely log out and log back in again as a regular user and I | can see the variables. If they're in your personal .fvwmrc file, of course root doesn't see them. Only you run your personal .fvwmrc file. It is unusual to have to modify root's environment; it is fairly important that it stays as normal as possible. System wide settings belong in /etc/profile (urr, /etc/login for csh). But root should not have csh as its shell on most systems. (BSD systems often ship with csh for root, and it's the first thing I change if I set up such a box.) -- Cameron Simpson [EMAIL PROTECTED] DoD#743 http://www.cskk.ezoshosting.com/cs/ There's no trick to being a humorist when you have the whole government working for you.- Will Rogers
Re: FVWM: FVWM Environment variables
On 12Jul2007 12:26, Ryan Daly [EMAIL PROTECTED] wrote: | Hans Voss said: | You CAN actually use them in shells and all other programs started | from FVWM. (FVWM is the parent and propagates its environment to its | children). | | I even use fvwm to set some environment variables for my shells | instead of in .bashrc or some-such. | | I have converted my config to use the FVWM SetEnv instead of via .cshrc | or the like. | | One issue I appear to be having, though, is that when the root user logs | in, I do not see the various environment variables if I issue an 'env'. | However, I do feel they're getting set because various settings | (ImagePath for one) relies on these environment variables. | | Is there any reason why root wouldn't see these variables? When you say root user logs in, exactly what procedure takes place? A GUI login? An su -? Etc. -- Cameron Simpson [EMAIL PROTECTED] DoD#743 http://www.cskk.ezoshosting.com/cs/ You can't have everything... where would you put it? - Charles Robinson, [EMAIL PROTECTED]
Re: FVWM: FVWM Environment variables
On 12Jul2007 08:42, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: | Regarding the latter, I have FVWM start the FvwmCommandS module thus: |Module FvwmCommandS | and have setenv() pass the variable to FVWM by saying: |FvwmCommand SetEnv $var $value | where $var is the variable name and $value its new value (suitably | quoted). | | Doing the above, can you then use those environment variables in shells | started by FVWM, or is their use limited to FVWM? Yes, they are perfectly normal environment variables. Therefore new shells started from FVWM will inherit them. -- Cameron Simpson [EMAIL PROTECTED] DoD#743 http://www.cskk.ezoshosting.com/cs/
Re: FVWM: FVWM Environment variables
On 12Jul2007 17:42, Ryan Daly [EMAIL PROTECTED] wrote: If the vars are set by a user then root can't see them, and the same applies the other way round. (I guess, can't test that now..) Let me clarify... When I'm logged in as root, I see no variables. I then completely log out and log back in again as a regular user and I can see the variables. Erm. This is a feature of su and not fvwm. I think su clears most variables before starting a root shell. For instance if I do env ASDF=hello su - on my system, then root still can not see the environment ASDF. You might be able to do some pam magic to disable this... GI -- Does the name Pavlov ring a bell?
Re: FVWM: FVWM Environment variables
On 12Jul2007 20:43, Gautam Iyer [EMAIL PROTECTED] wrote: | On 12Jul2007 17:42, Ryan Daly [EMAIL PROTECTED] wrote: | If the vars are set by a user then root can't see them, and the same | applies the other way round. (I guess, can't test that now..) | | Let me clarify... | When I'm logged in as root, I see no variables. | | I then completely log out and log back in again as a regular user and I | can see the variables. | | Erm. This is a feature of su and not fvwm. I think su clears most | variables before starting a root shell. For instance if I do | | env ASDF=hello su - | | on my system, then root still can not see the environment ASDF. su - does a login style su, and discards the callers environment to produce a clean login environment. su without the - argument preserves the caller's environment. Personally, when I need a root shell for random admin work I do a plain su (and a little minor fiddling). But when I need to install stuff or restart services etc I do an su - to do that work from a pristine environment. | You | might be able to do some pam magic to disable this... Nope, but also not needed either. Cheers, -- Cameron Simpson [EMAIL PROTECTED] DoD#743 http://www.cskk.ezoshosting.com/cs/ From the New York Times: DOS Computers ... are by far the most popular, with about 70 million machines in use wordwide. On the other hand, cockroaches are far more numerous than humans, and numbers alone do not denote a higher life form.
FVWM: FVWM Environment variables
All: I'm using v2.5.21. I have environment variables being set from users' .cshrc files. FVWM is therefore started with that specific environment. However, if an environment variable changes, the user needs to logout and back in again for FVWM to see that new value. Is there a way to have FVWM re-read that value without logging out and back in again? I have tried a FVWM restart, but that doesn't pick it up. Thanks for any help.
Re: FVWM: FVWM Environment variables
Hi, this sounds truly odd somehow. For a start, a process on Linux or Unix inherits all environment variables from its parent process. Afterwards some programs have their own means of chaning the inherited set bash uses an assignment like X=1 csh uses setenv fvwm uses SetEnv Changing a variable in a parent process, can never influence variable in a child process *which is already running*. Consequenly your only options are a) indeed completely start FVWM anew or b) use the built in functionality SetEnv. A third possibility might be that the whole story above is irrelevant for your problem if you are referring to shells started from within FVWM and they, for whatever reason, do not read .cshrc as you may be thinking. Put an 'echo here is .cshrc' at the top of .cshrc and check under which circumstances it is indeed read. Cheers, Harald. Am 11.07.2007 19:59 schrieb [EMAIL PROTECTED]: All: I'm using v2.5.21. I have environment variables being set from users' .cshrc files. FVWM is therefore started with that specific environment. However, if an environment variable changes, the user needs to logout and back in again for FVWM to see that new value. Is there a way to have FVWM re-read that value without logging out and back in again? I have tried a FVWM restart, but that doesn't pick it up. Thanks for any help. -- --+- Harald Kirsch | pifpafpuf bei gmx punkt de