I'm working in Ubuntu 14.04 I have an C++ application which I have compiled. I get the executable which name is "program". Well the thing is that this program use opencv and sockets then if I try to execute it in the terminal like this:
I got this error:
listener: socket: Operation not permitted setsockopt: Bad file descriptor
This error appear because I using socket and I need to run my application as root, so I typed this:
This request my password and the program works property.
The thing is that I want to run this "program" automatically when I start my Ubuntu, but it does not work. I have another application the name is "camera" which only uses opencv, no socket, then I do not need to run as root. So I put this application in the startup application of Ubuntu and the "camera" application start at the beginning without problem.
So how can I automatic start an application which uses sockets in Ubuntu?
I tried to do this:
sudo chown root:root ./program sudo chmod a+s ./program
But my program uses video so then when I try to watch the video the program stops. This is due my program is not free of security holes, so that they're vulnerable to buffer overflow exploits, etc.
Basically I just need to know how can I throw my program as start up without problem.