.profile file on each terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users .profile file on each terminal
# 8  
Old 02-15-2011
I would suggest dropping the .profile in oracle's home directory and starting again. Generally speaking, /etc/profile should be relatively simple. I have come across too many systems where /etc/profile has been used to code up all sorts of wonderful things that make sense to one person and cause a nightmare elsewhere. The way we get around that is to add the following code ONLY to the default /etc/profile:-
Code:
if [ -r /usr/loca/bin/`id -gn`.startup ]
then
   . /usr/local/bin/`id -gn`.startup
fi

Basically it determines if there is a startup file for your primary group and you can use that to set some general things for that group there. You can also then add in a few lines to a personal .profile, such as:-
Code:
#!/bin/ksh
set -o vi
umask 002

ORACLE_BASE=/data/oracle/ora11g
ORACLE_HOME=${ORACLE_BASE}/product/11.2.0/dbhome_1
ORACLE_DOC=${ORACLE_HOME}/doc
ORA_NLS33=${ORACLE_HOME}/ocommon/nls/admin/data

PATH=$PATH:${ORACLE_HOME}/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/etc:/usr/lbin:/usr/openwin/bin:/usr/ucb:/sbin
LIBPATH=${ORACLE_HOME}/lib32

export PATH ORACLE_BASE ORACLE_HOME ORACLE_DOC ORA_NLS33 LIBPATH LD_LIBRARY_PATH=$LIBPATH

Does this help at all? If it runs through normally, then each login (assuming you are using ksh (or a varient that also reads the .profile) should get it all set up. It might be worth putting in a quick echo "Hello!" somewhere in .profile to make sure it really is being called at all.


It's always better to enable segragation of environments with relative variable names rather that have to some how unpick it all later. I'm having that trouble myself with an inherited set of Cobol applications all on the one server with the "Development/Production support/Test/DR/anything else" environement all blended on the other server. We onely have the two HP-UX server, so we're a bit limited on how to split them up for a Cobol & Informix upgrade project, especially as the software is not used together and we want to separate the upgrades to production. Smilie





Robin
Liverpool/Blackburn
UK
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. UNIX for Dummies Questions & Answers

Modify .profile file

Hi there, I am really new to unix (about 3 days using it). In my assignment spec i have been told to modify my .profile file and create an environmental file. Until now all tasks have been file manipulation, etc learn how to use chmod or grep etc. I literally can't find this .profile file, I... (1 Reply)
Discussion started by: paulbuckley221
1 Replies

3. UNIX for Dummies Questions & Answers

No .profile file

Hi All, I just have a small question. I was wondering what would happen if there was no .profile file. I understand that the aliases and my path related commands wouldnt work, however i wanted to know if i would still be able to use the ls,cp,mv.... commands without a .profile file. If... (3 Replies)
Discussion started by: raghu_shekar
3 Replies

4. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

5. AIX

Which file has the user profile?

It's been a long time since I've done this and I can't remember which file is needed to edit. I would like to change the prompt for a user on my AIX 5.3 box, but I don't see a .profile file or a rc.ksh file to edit. Which file do I need to edit to get this? (1 Reply)
Discussion started by: bbbngowc
1 Replies

6. Shell Programming and Scripting

Profile File in Unix

Hi, I have to run a sqr program. In the profile file everything is set. e.g APPLID=personel APPPATH=/${ENVIRONMENT}/${APPPATH} and so on.. SQRDIR=/opt/sqr/bin/syb Still when I'm running this script,its giving error APPLID not set and SQRDIR not set. Any idea,why? TIA (5 Replies)
Discussion started by: autosys_nm
5 Replies

7. Shell Programming and Scripting

Can I modify the .bashrc file instead of .profile file to customize my login?

Hello, I got this question which tells me to customize my login script. Some people in the forums suggested to modify the .profile file in my home directory. I did so, but none of my customizations show up when I open the terminal after. So, I tried to modify other files in my home directory,... (1 Reply)
Discussion started by: Hyunkel
1 Replies

8. UNIX for Dummies Questions & Answers

xterm or terminal profile

Hi all I want to customize my terminal or xterminal profile for background color font color and font face etc. As far as I know for login .profile must be placed on top your home directory and I did it and worked. But I am not sure for terminal; what is the name of profile that I've to... (6 Replies)
Discussion started by: xramm
6 Replies

9. Shell Programming and Scripting

Invoke Terminal Without Profile

Hey, I need to open a terminal via a shell script, but i need it to not read any of the start up files. So far I was thinking something along the lines of this but it was unsuccessfull !#bin/sh /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal --noprofile any ideas on how to... (0 Replies)
Discussion started by: meskue
0 Replies

10. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question