running an OF app in linux automatically on startup

hi all.
I would like to know what is the best way to run an OF application automatically when my Ubuntu startup.
I was thinking of using some sh script but I dont know how to do it properly. Can somebody help me?

if you need to run it at the very beginning of the startup you should create a script in /etc/init.d and link it from /etc/rcS.d with a certain naming rules: it must start with S and then a number that indicates the order in which it’s going to be executed.

take a look at /etc/init.d/README and /etc/rcS.d/README

if you need to execute it when the desktop session starts then you can configure it through the System > Preferences > Start Applications (Aplicaciones al inicio :slight_smile:


hi arturo
I was thinking to use the System > Preferences > Start Applications method.
but If I link in the start applications the file I have the problem that it doesn’t find opencvExample_debug. I tried editing the file with the obsolute path of the opencvExample_debug but I got the same problem.

if I link directly to the opencvExample_debug I got this error… with the shared libraries
: error while loading shared libraries: cannot open shared object file: No such file or directory


try editing the script so it changes to the directory where the program is:

cd path_to_application/bin  
echo $(pwd)  
export LD_LIBRARY_PATH=$(pwd)/libs/  

edit: the cd command should be the first thing in the script

hi arturo
many thinks
now is working perfectly