I saw a similar thread on this.
https://www.unix.com/shell-programmin...gin-shell.html
The OP asked my question but stopped responding to clarifying questions, so it got closed before the question was clearly understood.
What I have is a case where a user will start an xterm, run several commands that change lots of environment variables and such.
Then they will run my script (before this point I have no control over what they do)
My script is a gui that launches some other programs. But those things need to start with the initial environment that existed before the user ran those commands that change lots of env variables.
I have tried launching new shells, new xterms and things like that. They all seem to inherit the env variables. I have found one solution... I can ssh to the same machine they are on, and that will get me a clean shell, but I really want to avoid ssh'ing for this. I swear there was some flag to tcsh and xterm that would get you the same thing as a fresh login, but all my searching has turned up nothing.
Anyone know how to launch a new shell or xterm that doesn't inherit the environment of the current shell, but does run all the dot files like a fresh ssh would?
Thanks...
Randell