title: Finding out what boots on startup for Raspberry Pi/Linux
body: <p>apologies for the long question, but I need to be as specific as possible.</p>
  
  <p>I am creating a project that allows me to control the functionality of a camera with a remote control. This project is run from a Python program, and pipes its output into another program, called chdkptp (which is the program that allows me to control the camera). A little bit ago I was trying to figure out how to get this project started on bootup (so I could plug my Raspberry Pi in, and have everything working without the need of the desktop). I tried a couple different things (such as adding the command I wanted to the rc.local file, etc), but ended up adding an autostart to </p>
  
  <pre><code>~/.config/autostart
  </code></pre>
  
  <p>and this is what's inside of the file I made:</p>
  
  <pre><code>[Desktop Entry]
  Encoding=UTF-8
  Name=Terminal autostart
  Comment=Start a terminal and boot remote_function.py piped into chdkptp.sh
  Exec=/usr/bin/lxterm -e 'cd chdkptp-r735 &amp;&amp; ./remote_function.py|./chdkptp.sh'
  </code></pre>
  
  <p>Basically this opens lxterm and executes the command that I need to start up my python program that pipes its output to chdkptp, and this works.</p>
  
  <p><strong>But my question is this:</strong>
  I believe I may have accidentally started my Python program in a different location while trying to figure out what I needed to do <strong>because my python program boots up twice</strong>. I know this because I have an LED flash once when the program is up and running, but it flashes twice and I cannot figure out where else I had my program boot up. How do I go about figuring this out?</p>
  
  <p>I may already have an answer, but don't know what it means... I typed this command suggested by someone:</p>
  
  <pre><code>ps -ax | grep 'remote_function.py'
  </code></pre>
  
  <p>and got this response: </p>
  
  <pre><code>875 ?        S      0:00 xterm -class UXTerm -title uxterm -u8 -e cd chdkptp-r735 &amp;&amp; ./remote_function.py|./chdkptp.sh
  1026 pts/0    Ss+    0:00 bash -c cd chdkptp-r735 &amp;&amp; ./remote_function.py|./chdkptp.sh
  1028 pts/0    S+     0:00 python ./remote_function.py
  2169 pts/1    S+     0:00 grep --color=auto remote_function.py
  </code></pre>
  
  <p>Is this the answer? If so, what exactly does this mean? Does it have anything to do with the shebang at the beginning of my python program? I am a a newbie when it comes to that. If that is not the answer, how to I go about finding where else my program is starting on bootup?</p>
  
  <p>The shebang is this, for reference:</p>
  
  <pre><code>#!/usr/bin/env python
  </code></pre>