Hello Everyone, Can someone please help me with a problem setting my PATH variable? (note cuda/bin in the first PATH environment variable) /etc> printenv | grep -w "PATH=" PATH=/usr/local/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin /etc> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin So what is the "real" path. Why is it that when I run setenv the PATH var is not updated? /etc> setenv PATH "${PATH}:/what/the/eff" /etc> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin This used to always work. There's nothing else getting sourced or happening in between my commands that would explain it either. Thanks a million Nick -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Nick Jones
Can someone please help me with a problem setting my PATH variable? (note cuda/bin in the first PATH environment variable)
/etc> printenv | grep -w "PATH=" PATH=/usr/local/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin
/etc> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin
So what is the "real" path. Why is it that when I run setenv the PATH var is not updated?
mine agree don't know where you got "setenv" for openSUSE/linux. I seem to recall a unix cmd. Have you possibly ran a program in this environment that might have changed the path?
/etc> setenv PATH "${PATH}:/what/the/eff" /etc> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin
This used to always work. There's nothing else getting sourced or happening in between my commands that would explain it either.
16:35 wahoo:~ > PATH=$PATH:no-path 16:35 wahoo:~ > echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib/hxtools/bin:/usr/X11R6/bin:/opt/gnome/bin:/opt/kde3/bin:/home/pat/bin:no-path 16:35 wahoo:~ > setenv If 'setenv' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf setenv 16:36 wahoo:~ > cnf setenv setenv: command not found -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday, December 07, 2010 04:41:35 PM Patrick Shanahan wrote:
don't know where you got "setenv" for openSUSE/linux. I seem to recall a unix cmd.
It is a csh builtin
/etc> setenv PATH "${PATH}:/what/the/eff" /etc> echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin :/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin
This works for me in csh in 11.3. $PATH gets updated correctly Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Anders, Thanks for confirming that it works for you (I'm also using 11.3 64bit and it does work when logging in locally). I've determined that the problem is only when ssh is used. Furthermore, there is something strange going on with lowercase path. I quote: ""tcsh maintains equivalent values with the shell variable $path and the environment variable $PATH $path is a whitespace delimited list of dirs $PATH is a colon delimited list of dirs "" Ok makes sense, however this is not correct in my case with ssh, because clearly my PATH and path vars are not equivalent.
echo $path /usr/local/cuda/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/bin/X11 /usr/X11R6/bin /usr/games /usr/lib64/jvm/jre/bin /usr/lib/mit/bin echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin
My goal is to have an /etc/csh.cshrc.local file that updates environment variables for all users regardless of how they log in. There are possibly some workarounds (ie. using /etc/csh.login.local instead, but this introduces another issue, where logging in locally this file gets sourced twice by OpenSuse. Anything I set there is sourced (ie. if I echo the path after setting it in the csh.cshrc.local file, I see the changes are made). Then another shell is invoked that does not source the file, or something like that. Thanks Nick -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Anders Johansson
-
Nick Jones
-
Patrick Shanahan