Rosanswers logo

every time I open the terminal try to run the package launch file but it always have to source the file first before to launch the file.

does there any way can source the file permanently?

Originally posted by Zero on ROS Answers with karma: 104 on 2016-04-19

Post score: 0


1 Answer 1


Rosanswers logo

This is explained in the Installation tutorial, section 1.6 - Environment setup (here from the Jade tutorial):

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

echo "source /opt/ros/jade/setup.bash" >> ~/.bashrc
source ~/.bashrc

Note also the warning:

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

If you just want to change the environment of your current shell, you can type:

source /opt/ros/jade/setup.bash

Btw: sourceing is never 'permanent'. It will always only update the shell in which it was invoked.

Originally posted by gvdhoorn with karma: 86574 on 2016-04-19

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by Zero on 2016-04-19:
Thank you! it work for me.

Comment by ranjeet on 2021-01-31:
It does not work, there must be some error in the syntax.

Comment by gvdhoorn on 2021-01-31:
If you're using a different ROS release, you'll have to update the command and replace jade with whatever ROS release you're using.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.