<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 26/06/2013 10:46, Martin Moores wrote:<br>
    <blockquote
cite="mid:CAEBYFR+43_44+schVpKrjj2x8VRTar4fBejMeY3n_+AJmm8ikQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On 26 June 2013 01:51, Phil Wild <span
              dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:phil@holobyte.com.au" target="_blank">phil@holobyte.com.au</a>&gt;</span>
            wrote:<br>
            <blockquote style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"
              class="gmail_quote">
              <div dir="ltr">
                <div class="im">
                  <div class="gmail_extra">
                    <div class="gmail_quote">
                      <blockquote style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"
                        class="gmail_quote">
                        <div dir="ltr">
                          <div class="gmail_extra">
                            <div class="gmail_quote">
                              <div>
                                <div>
                                  <blockquote style="margin:0px 0px 0px
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"
                                    class="gmail_quote">
                                    <div dir="ltr">
                                      <div class="gmail_extra">
                                        <div class="gmail_quote">
                                          <div><br>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </blockquote>
                                  <div><br>
                                  </div>
                                </div>
                              </div>
                              <div>I would use irexec to run
                                "xscreensaver-command -deactivate".
                                &nbsp;Can't think of any reason not to use
                                irexec.</div>
                              <div><br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div>&nbsp;</div>
            <div>Just wanted to hop on the end of this question.&nbsp; I have
              an irexec command mapped to a button on my remote,&nbsp; It
              works fine, but only if I&nbsp;start irexec manually first.&nbsp;
              What's the best way to get this running on boot in Ubuntu,
              so it is ready and listening for commands?</div>
            <div>&nbsp;</div>
          </div>
        </div>
      </div>
    </blockquote>
    Ubuntu has some magic in the X session startup to automatically
    start irexec if it detects that you're using is in your lirc
    config.&nbsp; To do this, It looks at all the files in ~/.lirc to see if
    they have a command using irexec.&nbsp; I don't think it looks in the
    top-level ~/.lircrc file though.<br>
    <br>
    Actually, this may be a Mythbuntu specific thing.&nbsp; The code is in
    the script at /usr/share/mythbuntu/session.sh, and contains:<br>
    <br>
    <tt>&nbsp;&nbsp;&nbsp; #check if irexec is needed, and start if need be<br>
      &nbsp;&nbsp;&nbsp; if [ -x /usr/bin/irexec ] &amp;&amp; [ ! -f ~/.noirexec ]
      &amp;&amp; [ -f ~/.lircrc ]; then<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ -n "$(cat ~/.lirc/* | grep --invert-match "#" | grep
      irexec | grep prog)" ]<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; killall irexec<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; irexec -d<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>
      &nbsp;&nbsp;&nbsp; fi</tt><br>
    <br>
    For me I have ~/.lirc/irexec containing:<br>
    <br>
    <tt>begin<br>
      &nbsp;&nbsp;&nbsp; prog = irexec<br>
      &nbsp;&nbsp;&nbsp; button = KEY_POWER<br>
      &nbsp;&nbsp;&nbsp; config = /usr/share/mythtv/suspend.sh<br>
      &nbsp;&nbsp;&nbsp; repeat = 0<br>
      end<br>
      <br>
    </tt>and an additional include line in ~/.lircrc to pull it in.&nbsp;
    irexec starts when I login to X without me having to do anything
    extra.<br>
    <br>
    thanks,<br>
    Alex<br>
    <pre class="moz-signature" cols="72">-- 
Alex Tomlins
Email/Jabber: <a class="moz-txt-link-abbreviated" href="mailto:alex@tomlins.org.uk">alex@tomlins.org.uk</a>

There are two kinds of people in the world: those who finish what they started
</pre>
  </body>
</html>