what paths/files to add to .bashrc

Asked by neuroStuff

The bottom of my .bashrc file looks like:

. /etc/fsl/fsl.sh
. /opt/nrn/i686/bin/nrngui
. /opt/nrn/i686/bin/nrniv

However the programes nrngui and nrniv open every time I open a terminal.

I don't know what the correct syntax is to make the programs accessible from any directory, but without the programing launching automatically when I open a shell.

I have also tried to export the path such as in:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/nrn/i686/bin/nrngui"

But instead of opening the program automatically when I open a terminal, it just does nothing and doesn't recognise the command.

Thanks for any help.

Rus.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

export PATH=$PATH:/opt/nrn/i686/bin/:/etc/fsl

add that to ~/.bashrc

Should do it. That will add the folders of the programs to path, you can now simply call them by name without needing absolute locations. You will need to delete the 3 lines you added which make the apps run when you open a terminal.

Once added you will need to close all terminals and rerun them or you can type:

source ~/.bashrc

to apply the new settings

Revision history for this message
neuroStuff (colouredstatic) said :
#2

Before I got to read your reply I put this line in .bashrc:

export PATH=$PATH:/opt/nrn/i686/bin

Which worked.

Maybe the effect is the same as what you intended?

I will try what you said too, but I am very tired so will do it tomorrow.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

yes, that will work, you can add any amount of folders to $PATH, it will just take longer to find apps on the end as each folder is checked.