LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   How to remove a "single dot" entry in $PATH on openSuSe 11.4 ? (https://www.linuxquestions.org/questions/linux-distributions-5/how-to-remove-a-single-dot-entry-in-%24path-on-opensuse-11-4-a-4175439837/)

giui_977 12-03-2012 12:42 PM

How to remove a "single dot" entry in $PATH on openSuSe 11.4 ?
 
Hello @ all !

Iīm using openSuSE 11.4 and would like to remove the entry " . " in $PATH.
I donīt know how it came in there :(...

by searching several files in the /etc dir like bash.bashrc, profile... i did not find the entry for the single dot ( that is to make any programs / scripts executable from the working directory)

May anybody help me up to find the entry that loads the . in $PATH ?

greetings

giui

schneidz 12-03-2012 01:08 PM

you can maybe look in the home dir for files like .profile, .bash_profile, .bashrc, ...

else maybe you can re-assign $PATH by adding a line to the end of your .bash_profile.

Habitual 12-03-2012 01:38 PM

per the man page:
check /etc/profile

I found one, YMMV:
Code:

# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then
 PATH="$PATH:."
fi


linosaurusroot 12-03-2012 01:58 PM

See /etc/profile.d/profile.sh which reads from /etc/sysconfig/suseconfig
Code:

CWD_IN_USER_PATH="no"

giui_977 01-04-2013 11:28 AM

@linosaurusroot
Exactly that was it. In /etc/sysconfig/suseconfig they ( the suse people) say that was the standard setting since years. I didn`t know that.

Thank you very much for all replies !!!

bye
giui


All times are GMT -5. The time now is 01:03 PM.