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
I was thinking to use the System > Preferences > Start Applications method.
but If I link in the start applications the file clickToLaunchApp_Debug.sh I have the problem that it doesn’t find opencvExample_debug. I tried editing the clickToLaunchApp_Debug.sh 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: libfmodex.so: cannot open shared object file: No such file or directory
try editing the script so it changes to the directory where the program is:
#!/bin/sh cd path_to_application/bin echo $(pwd) export LD_LIBRARY_PATH=$(pwd)/libs/ ./opencvExample_debug
edit: the cd command should be the first thing in the script
now is working perfectly