Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-11 Thread pixotec
thank you all for your tips. I had success in two ways. first way: changed path and added setenv in default-class in /etc/login. did not work first , had to change .profile of my user, because setting of PATH in .profile eliminated setting in login.conf. also /etc/skel/.profile had to be changed

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-10 Thread Lars Hansson
On 8/10/07, Edd Barrett <[EMAIL PROTECTED]> wrote: > Is there a global Xdefaults file which can be made to source every > users .profile and /etc/profile for xdm logins? Yes and no. There's a global defaults for X but they deal with X resources, not enviroment variables. You can set xterm to alway

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-10 Thread Pierre-Yves Ritschard
On Fri, 10 Aug 2007 09:11:55 +0100 "Edd Barrett" <[EMAIL PROTECTED]> wrote: > On 09/08/07, Lars Hansson <[EMAIL PROTECTED]> wrote: > > If you're using xdm things are different though. The Xsession script > > does not source any global files so you'll have to modify it to > > source /etc/profile. >

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-10 Thread Edd Barrett
On 09/08/07, Lars Hansson <[EMAIL PROTECTED]> wrote: > If you're using xdm things are different though. The Xsession script > does not source any global files so you'll have to modify it to source > /etc/profile. Is there a global Xdefaults file which can be made to source every users .profile and

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-09 Thread J.C. Roberts
On Wednesday 08 August 2007, Will Maier wrote: > > 4. change /etc/ksh.kshrc and create .kshrc sourcing /etc/ksh.kshrc > > for all users (and in /etc/skel...) > > And this. ummm. I don't think so. The .profile is read only *once* on initial login. Everything that is spawned from your initial logi

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-09 Thread Clint Pachl
Lars Hansson wrote: On 8/9/07, Clint Pachl <[EMAIL PROTECTED]> wrote: Or you could programatically change each user's .profile. Uhm, why? Markus is correct that both /etc/profile and $HOME/.profile are sourced when you log in so to set up global variables you set them in /etc/profile.

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Lars Hansson
On 8/9/07, Darren Spruell <[EMAIL PROTECTED]> wrote: > ~/.profile overrides /etc/profile. Yes and both are processed. > $ echo 'var1=a' >> /etc/profile > $ echo 'var1=b' >> ~/.profile > $ /bin/ksh -l > $ echo $var1 > b Of course, because .profile is processed after /etc/profile. Variables set in

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Darren Spruell
On 8/8/07, Lars Hansson <[EMAIL PROTECTED]> wrote: > On 8/9/07, Clint Pachl <[EMAIL PROTECTED]> wrote: > > Or you could programatically change each user's .profile. > > Uhm, why? Markus is correct that both /etc/profile and $HOME/.profile > are sourced when you log in so to set up global variables

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Lars Hansson
On 8/9/07, Clint Pachl <[EMAIL PROTECTED]> wrote: > Or you could programatically change each user's .profile. Uhm, why? Markus is correct that both /etc/profile and $HOME/.profile are sourced when you log in so to set up global variables you set them in /etc/profile. If you're using xdm things are

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Clint Pachl
pixotec wrote: I want to set the environment variables PATH=$PATH:/usr/local/jdk-1.5.0/bin JAVA_HOME=/usr/local/jdk-1.5.0 globally. for one user I can change therefor .profile like this: PATH=/usr/local/jdk-1.5.0/bin:/bin:... ... export PATH HOME TERM but I want it for all users: 1. could cha

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Markus Lude
On Wed, Aug 08, 2007 at 06:09:16AM -0700, pixotec wrote: > I want to set the environment variables > > PATH=$PATH:/usr/local/jdk-1.5.0/bin > JAVA_HOME=/usr/local/jdk-1.5.0 > > globally. > > for one user I can change therefor .profile like this: > PATH=/usr/local/jdk-1.5.0/bin:/bin:... > ... > ex

Re: howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread Will Maier
On Wed, Aug 08, 2007 at 06:09:16AM -0700, pixotec wrote: > but I want it for all users: > 1. could change all .profile-files of all users: no thanx ;-( (and > change /etc/skel/.profile for future new users) This would work. > 2. change /etc/login.conf ??? This would also work (see login.conf(5))

howto set global environment variable (e.g. PATH, JAVA_HOME)

2007-08-08 Thread pixotec
I want to set the environment variables PATH=$PATH:/usr/local/jdk-1.5.0/bin JAVA_HOME=/usr/local/jdk-1.5.0 globally. for one user I can change therefor .profile like this: PATH=/usr/local/jdk-1.5.0/bin:/bin:... ... export PATH HOME TERM but I want it for all users: 1. could change all .profile-