title: Raspbian script - launch gui as root and open the pdf file for 60 seconds
body: <p>I'm working with a Raspberry Pi B+ with Raspbian installed. I would like to write a script (in <code>/etc/rc.local</code>) which:</p>
  
  <ol>
  <li>Auto launch GUI as root (it's done)</li>
  <li>In the start opens a specific PDF file for 60 seconds, then opens next PDF file and goes again.</li>
  </ol>
  
  <p>I've tried writing anything, but I don't have an idea what to do. </p>
  
  <pre><code>#Auto launch gui as root
  sudo startx
  
  #Open pdf file on full screen
  while true;
  do
      xpdf -fullscreen /home/share/1.pdf
      echo "0"
      sleep 60
      while true;
      do
          DESTDIR = /home/share
          xpdf -fullscreen $DESTDIR/*.pdf
          sleep 60
      done
  done
  exit 0
  </code></pre>
  
  <p>Has someone an idea or can someone please tell me what I should do? Any help pointers?</p>