LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   environment variables change in X (https://www.linuxquestions.org/questions/slackware-14/environment-variables-change-in-x-42032/)

Baloney Pete 01-19-2003 12:34 PM

environment variables change in X
 
Hi all,

When I start up X, many of my environment variables change. The one that is currently causing the problem is my SHELL variable. When I'm not in X, my shell is bash, but in X, my shell changes to sh.

Questions:
1) Where do environment variables come from? (Is it /etc/profile?) More specifically, where does X get its environment variables from? I assume it's from a different place, because my env. vars. are different in X.

2) How do it set it so that bash is my default shell in X?

One interesting thing: when I "su" in X to become root, my environment variables change again, and bash becomes my shell again. What's going on?

If you know of any good links that describe this stuff in detail, I'd love to have them. Thanks for any assistance.

Excalibur 01-19-2003 02:40 PM

There can be many scripts that can init a user session. The /etc/profile sets the system wide defaults. The /etc/profile.d constians some more specific scripts. In addition each user home directory can contain a .bashrc script or practically any other script the system could be setup to use. The "su" command provides the use of the "-" argument to create an environment as if the user actually logged in. Use like "su - root".

However, bash and sh are the same thing. bash is the actual shell, the sh is just a symlink to bash.

The KDE desktop uses it's own program called konsole. The KDE docs might provide more info. If you are running another desktop then investigate the program that it executes to provide the shell command prompt.

And welcome to LQ. Hope the info will be of some help.


All times are GMT -5. The time now is 07:24 PM.