title: Run my executable automatically as root ubuntu
body: <p>I am 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:</p>
  
  <pre><code>./program
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>listener: socket: Operation not permitted
  setsockopt: Bad file descriptor
  </code></pre>
  
  <p>This error appear because I using socket and I need to run my application as root, so I tyoe this:</p>
  
  <pre><code>sudo ./program
  </code></pre>
  
  <p>This request my password and the program works propertly.</p>
  
  <p>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 use 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 begining without problem.</p>
  
  <p>So I guess that my problem is that I need to run as root my "program", but I can not get it.</p>
  
  <p>Someone could help me?</p>
  
  <p>Many Thanks</p>