LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-19-2003, 01:34 PM   #1
Baloney Pete
LQ Newbie
 
Registered: Dec 2002
Distribution: Slackware 8.1
Posts: 1

Rep: Reputation: 0
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.
 
Old 01-19-2003, 03:40 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change environment variables of a parent envrionment from a child one. pulsez Linux - Software 1 11-09-2005 07:24 AM
environment variables in c++ s3b0 Programming 6 08-27-2004 10:19 AM
environment variables kakridge Linux - Newbie 1 07-14-2003 07:25 PM
environment variables moeminhtun Linux - General 4 01-15-2003 10:50 AM
Must change environment variables rw Linux - General 6 07-11-2001 12:17 PM


All times are GMT -5. The time now is 01:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration