Home » Infrastructure » Unix » automatic execution upon logging in
automatic execution upon logging in [message #232305] Fri, 20 April 2007 01:40 Go to next message
beetel
Messages: 96
Registered: April 2007
Member
The following have to be executed before running an ant build on our servers. It loads the library path:

LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

How do I set this automatically such that it gets executed each time we open up a new putty session?

I tried to put this in the .profile file but it still does not work. We're using Solaris.
Re: automatic execution upon logging in [message #232326 is a reply to message #232305] Fri, 20 April 2007 02:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
What is your default shell?
Re: automatic execution upon logging in [message #232328 is a reply to message #232326] Fri, 20 April 2007 03:05 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Good to know that
/etc/profile is the configuration that is read before any user's .profile is getting loaded. This file /etc/profile is read once the user have logged in to the system.
Re: automatic execution upon logging in [message #232330 is a reply to message #232305] Fri, 20 April 2007 03:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>/etc/profile is the configuration that is read before any user's .profile is getting loaded.
Not if one is using the csh, IIRC

HTH & YMMV
Re: automatic execution upon logging in [message #232331 is a reply to message #232330] Fri, 20 April 2007 03:13 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

anacedent wrote on Fri, 20 April 2007 10:10
>/etc/profile is the configuration that is read before any user's .profile is getting loaded.
Not if one is using the csh, IIRC

HTH & YMMV

Who is using csh Razz

Thank's for the correction. Wink
Question, whats YMMV ?
Re: automatic execution upon logging in [message #232333 is a reply to message #232331] Fri, 20 April 2007 03:25 Go to previous messageGo to next message
beetel
Messages: 96
Registered: April 2007
Member
I think it's bash. How do I confirm that? Sorry I'm new to Unix.
Re: automatic execution upon logging in [message #232486 is a reply to message #232305] Fri, 20 April 2007 12:55 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Question, whats YMMV ?
www.acronymfinder.com
Your Mileage May Vary.
(Your actual results may be different from my results.)

[Updated on: Fri, 20 April 2007 12:55] by Moderator

Report message to a moderator

Re: automatic execution upon logging in [message #232736 is a reply to message #232333] Mon, 23 April 2007 02:36 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Hi,

to find out which shell you are in you could use a "who am i" and "finger" :

# who am i
root        pts/1       Apr 23 09:31     ([hostname])
# finger root
Login name: root
Directory: /                            Shell: /usr/bin/ksh
On since Apr 23 09:31:49 on pts/1
    from [hostname]
No Plan.
#
Previous Topic: R12 installation Error
Next Topic: Problem related to file attribute (permissions)
Goto Forum:
  


Current Time: Thu Mar 28 05:54:57 CDT 2024