how do I set a global PATH?
- Inicie sesión o regístrese para enviar comentarios
Hello, I have added the following lines to ./bashrc:
export PATH=/usr/local/bin:/usr/bin:/bin
PATH=$PATH:/usr/local/texlive/2012/bin/i386-linux
INFOPATH=$INFOPATH:/usr/local/texlive/2012/texmf/doc/info
MANPATH=$MANPATH:/usr/local/texlive/2012/texmf/doc/man
so all LaTeX programms are found correctly from the terminal.
Now an Emacs plugin doesn't work correctly and I have to set these paths globally. I think I have to configure /etc/environment. Is this correct? And how?
I have wrecked my system once by messing around with PATH settings so I would be very grateful for a detailed explanation. fool-proof, so to speak.
Thanks in advance.
> export PATH=/usr/local/bin:/usr/bin:/bin
System-wide files should already do it, maybe with more directories.
> Now an Emacs plugin doesn't work correctly and I have to set these
> paths globally. I think I have to configure /etc/environment. Is this
> correct? And how?
You probably don't have to do this, you might add a file to
/etc/profile.d/ setting this variable (there should be existing similar
files there).
I have ~/.bash_profile setting the variables I need and Emacs can use
them.
Thank you very much to both of you.
I'm a beginner. What I understand is:
PATH is defined on several levels. "Child" processes inherit PATH from their "parents".
I suppose:
~/.bash* belongs to a child process of the one defined in
/etc/profile.d.
the /etc/profile.d belongs to a child of /etc/environment .
Is this correct?
I like the solution with the extra fil in /etc/profile.d, but I have some questions first.
1. on what level is PATH defined here?
2. can the file have any name?
3. what should be in the file? Just the same as I have added to by ~/.bashrc? (See above)
thanks for your reply, but I can't read a single letter...
It is available at
http://listas.trisquel.info/pipermail/trisquel-users/2012-September/012068.html
which should have the same text.
Thank you for the detailed explanation.
I have done it with a .sh-file in /etc/profile.d/ and it works just fine!
Thanks again for the support.
- Inicie sesión o regístrese para enviar comentarios