Comment
Comment by Dominik Fretz on November 7, 2012 at 5:05pm
Comment by Dominik Fretz on November 1, 2012 at 6:14am
Comment by Dan Myers on November 1, 2012 at 5:55am The camera wasn't starting when I was running the app from the /etc/init.d/openrov script. I also kept running into problems with trying to start it via 'node server.js' as the user 'rov' so I did the following:
chown -R root:rov /opt/openrov
chmod -r 775 /opt/openrov
This allowed me to fire up the openrov app via 'node server.js' as the rov user. If I loaded the control stream via http://rov:8080 the camera would not stream but the shell window indicated the stream was starting. If I hit 'ctrl r' and refreshed the window the camera would load into the window.
Next I stopped the session and tried to start it again as the root user (since the permissions on the /opt/openrov where all root:root I assumed the service startup was also trying to fire it up as root. I wasn't able to start the app as a root user and I was receiving an error that said "hey you need to set your LD_LIBRARY_PATH". I was going to grab the path out of the rov user .bashrc but I made an assumption that the startup script was also missing the path and maybe that is why the mjpg_streamer couldn't start? Anyway, I next added the following:
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /etc/profile.d/rov.sh
echo "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/node/bin" >> /etc/profile.d/rov.sh
chmod +x /etc/profile.d/rov.sh
I could of added the LD_LIBRARY_PATH to the root .bashrc but I wanted to see if the script needed the path. I also could of added the same LD_LIBRARY_PATH to the openrov script I suppose. I was going with the plan of setting the PATH and LD_LIBRARY_PATH for everyone so that any user I created or whatever, would have the correct path.
Next I added -l to the shebang ling of /etc/init.d/openrov
#! /bin/sh -l
After that root could start up the server.js, the rov user could start up the server.js and the /etc/init.d/openrov also worked.
Now, the catch is I am still stuck with having to do a refresh after loading the app into the browser. I.E. 'ctrl r'.
Comment by Dominik Fretz on November 1, 2012 at 1:34am © 2013 Created by Eric Stackpole.

You need to be a member of OPENROV to add comments!
Join OPENROV