
I'm trying to set up a prompt to dynamically change environment variables (say, http_proxy). I'm using Prompt.Input (inputPrompt) to query for values such as "VAR=val" and passing those along to putEnv. The problem is when I start a new terminal using the standard mod+shift+enter the environment does not have VAR=val in it. Is there something I'm missing about how XMonad forks processes and passes along exported values? The only place putEnv seems to work is main, which is not dynamic. updateEnvVar :: String -> X () updateEnvVar s = catchIO $ putEnv s defaultConfig { ... } `additionalKeysP` [ ("M-e", inputPrompt myPromptConfig "set env" ?+ updateEnvVar) ] Thanks for any help

On Tue, Dec 23, 2014 at 4:16 PM, Eric Mrak
I'm using Prompt.Input (inputPrompt) to query for values such as "VAR=val" and passing those along to putEnv. The problem is when I start a new terminal using the standard mod+shift+enter the environment does not have VAR=val in it.
What kind of terminal are you starting? If it's based on a terminal factory (e.g. urxvtc+urxvtd, or xfce4-terminal, etc.) then it won't get any environment variables from anything but the invocation that starts the factory backend. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

I'm using straight st (when testing this I was using it without tmux or any
other multiplexer). I also tested with xterm and urxvt (no client-daemon)
On Tue, Dec 23, 2014 at 1:31 PM, Brandon Allbery
On Tue, Dec 23, 2014 at 4:16 PM, Eric Mrak
wrote: I'm using Prompt.Input (inputPrompt) to query for values such as "VAR=val" and passing those along to putEnv. The problem is when I start a new terminal using the standard mod+shift+enter the environment does not have VAR=val in it.
What kind of terminal are you starting? If it's based on a terminal factory (e.g. urxvtc+urxvtd, or xfce4-terminal, etc.) then it won't get any environment variables from anything but the invocation that starts the factory backend.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Can you provide the actual code you're running?
On Tue, Dec 23, 2014 at 4:34 PM, Eric Mrak
I'm using straight st (when testing this I was using it without tmux or any other multiplexer). I also tested with xterm and urxvt (no client-daemon)
On Tue, Dec 23, 2014 at 1:31 PM, Brandon Allbery
wrote: On Tue, Dec 23, 2014 at 4:16 PM, Eric Mrak
wrote: I'm using Prompt.Input (inputPrompt) to query for values such as " VAR=val" and passing those along to putEnv. The problem is when I start a new terminal using the standard mod+shift+enter the environment does not have VAR=val in it.
What kind of terminal are you starting? If it's based on a terminal factory (e.g. urxvtc+urxvtd, or xfce4-terminal, etc.) then it won't get any environment variables from anything but the invocation that starts the factory backend.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
Eric Mrak