RPI2 environmental variable with RT Kernel


I need to execute this line on every bootup to get my gstreamer1.4 starting.
export LD_LIBRARY_PATH=/usr/local/lib/

Is there a permanently and safe way of doing this in RT image?
Should i add this line to my startup scipt just before starting gstreamer?
Thx in advice


Could you be a little more elaborate why do you need to set this variable?

RT kernel doesn’t really change much from the user perspective. Thus, you’ll be perfectly fine setting the variable like you’re used to.

To set a environment variable permanently you can stick it into ~/.bash_profile or ~/.bashrc (/etc/rc.local could do also). Where do you need to put it depends on where you launch gstreamer. Keep in mind that /etc/rc.local is not sourced by every shell.

If I were you, I’d set LD_LIBRARY_PATH like that:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
This way you wouldn’t override the variable with the new value if that’d already been set.

Once the variable is set, you might need to run sudo ldconfig