LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Chainging the PATH on login shells (https://www.linuxquestions.org/questions/debian-26/chainging-the-path-on-login-shells-333860/)

cliff76 06-15-2005 09:57 AM

Chainging the PATH on login shells
 
I have an issue on Mepis that I believe is Debian related. I'm trying to add a folder to my login shell PATH and it doesn't seem to work. In Fedora 3 I would just edit bash_profile and add/remove folders to the PATH there. This doesn't work on Mepis. I add a folder to my path in ~/.bash_profile and the extra folder is available whenever I start a new konsole window but it does not appear to be available globally. For example, other programs like my Java IDE don't see the modified path. Does Debian use a different shell (eg. csh) than Fedora? Where does the path get set for all X programs?

Dead Parrot 06-15-2005 11:12 AM

The usual place to set the system-wide default PATH for users is /etc/login.defs. You should see in this file lines beginning with "ENV_SUPATH" and "ENV_PATH" -- the former sets PATH for users when they "su" to root and the latter when they remain normal users. You need to log out and login again before any changes in /etc/login.defs will take effect.

cliff76 06-15-2005 01:27 PM

Thanx but...
 
Thanx Parrot,

But I don't think you understand. I'm not trying to change the path for all users only for my user ID. I want the path to be global to all apps that run when I log in. That doesn't seem to work when I edit ~/.bashrc or ~/.bash_profile or ~/.bash_login. I know something is wrong here I just don't know what. Please help.

Dead Parrot 06-15-2005 03:11 PM

Hmm... I think your problem is that kdm overrides the normal startup files in your home directory and sets your $PATH. You need to find the file where you can change kdm's behaviour. Unfortunately I don't use kde myself, so I cannot help you there but Debian's X FAQ seems to suggest that kdm's config files might be found from /etc/kde3/kdm/.

cliff76 06-16-2005 09:53 AM

I did some tracing, starting from the /etc/kde3/kdm folder as suggested. I saw no hint of the PATH being overwritten. There is one file, Xstartup, where the PATH is appended to. something is off here and I still can't find it. I also know that it (what ever it is that's off) is not something I changed at all. What I don't understand is where the profile scripts get sourced. I did not see that anywhere in my tracing, though I did not look into every possible script. I compared the scripts with equivalents I found on my Fedora partition and I didn't see any profiles being sourced there either. It might help if I knew where the profile scripts should be sourced typically so I can try to trace what happend after that point. Thanx for all of your help and I'm still struggling to figure this out.

Dead Parrot 06-16-2005 03:52 PM

It is quite possible that I'm wrong about kdm overriding your local startup files. Actually, I have no idea why changing $PATH in .bash_profile and .bashrc doesn't work. ;)

Anyway, I did a Google search and, although I didn't actually find anything about kdm overriding local startup files, I did find out that the kdm settings file is called kdmrc. So I guess you could try adding your executable folder to $PATH in /etc/kde3/kdm/kdmrc by adding a line like this:

UserPath="$PATH:/path_to_your_executable_folder"


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