The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do i set environment variable ahjiefreak Linux 4 01-20-2008 08:21 PM
sed on an environment variable ? lumix Shell Programming and Scripting 3 12-15-2007 06:30 PM
Using Environment Variable kaiser Shell Programming and Scripting 3 05-01-2006 08:28 AM
set environment variable? kohoutek UNIX for Advanced & Expert Users 3 12-21-2005 05:23 PM
Environment Variable karyn1617 Shell Programming and Scripting 2 02-04-2005 03:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-28-2002
jacobsa jacobsa is offline
Registered User
  
 

Join Date: Oct 2001
Location: Queens, NY
Posts: 12
Environment Variable

Hello,

I need some help to understand system and user environment files, such as .profile and others. I can edit my .profile file in my home directory. What I only touch in this file is the $PATH variable and when I am logged in under a telnet session, the PATH that I specify is used and confirmed by the set command. When I am logged into the CDE, however, that $PATH variable is different. I looked at the .dtprofile file, but I do not see the entries that I see when I run "set". I would like to change for example the MANPATH variable.. What and where are all the environment config files? Does anyone know of a resource on the net so I can read about these files?

-Thanks

-AJ
  #2 (permalink)  
Old 05-29-2002
jyotipg jyotipg is offline
Registered User
  
 

Join Date: Oct 2001
Location: Bangalore
Posts: 95
the default environment settings can be found at /etc/profile
  #3 (permalink)  
Old 05-29-2002
jacobsa jacobsa is offline
Registered User
  
 

Join Date: Oct 2001
Location: Queens, NY
Posts: 12
I know of this file and what it does, but I do not think it answers the question that I posted, fully. There is a lot more info offered by the "set" command other than the default generated profile file. Can you provide more info or sources to research?
  #4 (permalink)  
Old 05-29-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
I believe that CDE will not source your .profile when you open a dtterm / xterm / etc...

Look in the .dtprofile for a variable that can be set to tell it to source your .profile as well (at least on modern HP-UX variants - CDE / VUE). Between the /etc/profile, .profile, the contents of $ENV (if it's set), and the .dtprofile, you should find most of the variables, although a good-sized chunk of them may be set by your shell, or have default values set by the shell ($USER, $LOGNAME, $PWD, etc...).
  #5 (permalink)  
Old 05-29-2002
bionicfysh bionicfysh is offline
Registered User
  
 

Join Date: May 2002
Posts: 21
Lightbulb Possible solution in these urls

To jacobsa

I hope that these answer your request:

http://www.ncl.ac.uk/ucs/unix/environment_.html
http://www.princeton.edu/~unix/Solaris/CDE.html
http://www.bme.unc.edu/studnt_facult.../chapter5.html

regards,

Da Bionic one
  #6 (permalink)  
Old 05-29-2002
jacobsa jacobsa is offline
Registered User
  
 

Join Date: Oct 2001
Location: Queens, NY
Posts: 12
Thanks to you all. Great information. One last question, when I do su, where is the superusers profile read from?

-AJ
  #7 (permalink)  
Old 05-30-2002
bionicfysh bionicfysh is offline
Registered User
  
 

Join Date: May 2002
Posts: 21
su profile

To jacobsa


by default, if you do [su + login] the shell will drop you in the current directory, the same profile as you were before.
In order to keep the correct profile, you need to add a 'tilda' after the [su]

e.g
try this:
1- login as: john
2- do a pwd
3- do a printenv


4- now do a su (say) jack
5- do a pwd
6- do a printenv
... you should find that:
pwd and printenv values are the same

now try:
4- su ~jack
5- pwd
6- printenv


Et voilia....

I hope that it helps

May da force be with you...

Da Bionic one
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0