Enviroment problem

Asked by Michal Dziczkowski

I have following problem. Each time I want to do something thru terminal, I need to export the PATH at new. I do this by typing:

export PATH=`cat /etc/environment`

My question is: How can I do that my system do this for me (for all profiles) at system start?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

modify your .bash_profile, and st gnome-terminal to use a login shell

eg:
export PATH=$PATH:`cat /etc/environment/`

Note that using /etc/environment like that on my system would break my PATH variable, as there are comments and assignments in my /etc/environment file, which would not work. PATH needs to be a list of dirs separated by a colon.

to set login shell in gnome-terminal
Edit->profiles->edit->Title & command->Run command as login shell.

Revision history for this message
Michal Dziczkowski (mdziczkowski) said :
#2

And how can I do that permanent and global for whole system, that this problem get solved for all users at once ?

Revision history for this message
mycae (mycae) said :
#3

If you need it for all users, you can modify either /etc/profile.local or /etc/bash.bashrc.local .

Can you help with this problem?

Provide an answer of your own, or ask Michal Dziczkowski for more information if necessary.

To post a message you must log in.