Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: A bit of Linux advice yet again??
>>>>> "Howard" == Howard J Rogers <howardjr2000_at_yahoo.com.au> writes:
Howard> OK, maybe I should post this in a Linux newsgroup, but... Howard> Against all the odds, I've gotten 9.2 to run on Mandrake 9.0 Howard> (which, I have to say, is the first Linux distro I've seen Howard> that's persuaded me there are viable alternatives to Howard> Windows). I have a "DB9" instance/database and an OEMREP Howard> instance/database. Log on as the Oracle user, and there's not Howard> a problem. Howard> But I want to log on as me. So, I create a .profile in myHoward> home directory that sets all the usual variables, including Howard> path.
Howard> I reboot the machine, just because I'm a former Windows user Howard> and we're used to that sort of thing. I log on as me. I open Howard> a terminal window, and type 'sqlplus', and I get the error Howard> 'command not found'.
Howard> I then type ". ./.profile", and the 'sqlplus' command works Howard> perfectly.
Howard> Now, I realise I only know the backend of batch files, but I Howard> was rather under the impression that .profile would be Howard> invoked the moment I logged in. So why isn't it? What am I Howard> doing wrong (try and keep the list modestly short!). Howard> Oh -one other thing. I know all about oratab, and I *do* get Howard> both my instances starting automatically at reboot. But how Howard> does one automate the intelligent agent and listener? oratab Howard> doesn't seem syntactically capable of doing these, so I guessHoward> I must look elsewhere. Am I deep into shell scripting at this Howard> point??
Howard> Forebearance for a Windows user, please. I am at least Howard> trying!!
Howard> Regards HJR
Howard,
Good to hear your comming over to the dark side :-).
I bet your logging in using X windows?
I suspect what is happening is your X windows has been configured so that when you open an xtern it opens it as a non-login shell. The .profile (or .bash_profile - assuming you are using bash) is only sourced for login shells.
There are two solutions for this.
#!/bin/sh --login
or
#!/bin/bash --login
I like the second approach because all your environment variables ar set in the parent shell of your X session, so all programs spawned from that shell, including other shells will have all your .profiel environment settings.
Tim
P.S. Once we hae you converted to linux, we will have to convince you of the wonders of emacs and sql-mode!
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!Received on Sat Feb 01 2003 - 23:15:29 CST