<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    If it's just the video output that's the problem try checking out
    this flag:<br>
    <br>
    mplayer -vo null<br>
    <br>
    Used this way it will not try to output any video at all and
    hopefully skip the check for a display. If you only want the audio,
    this may keep you from having a repeat issue later if your setup
    changes or you're not logged in when it runs.<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 04/30/2017 07:05 PM, Antonio
      Olivares wrote:<br>
    </div>
    <blockquote
cite="mid:CAJ5UdcMWKqcd18MAJqeYaUVaDHLHS2SvE2o9xcmKOs95WNgBEw@mail.gmail.com"
      type="cite"><br>
      <br>
      On Sunday, April 30, 2017, Dylan Reinhold <<a
        moz-do-not-send="true" href="mailto:dylan@ocnetworking.com">dylan@ocnetworking.com</a>>
      wrote:<br>
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <div dir="ltr">
          <div>
            <div>
              <div>
                <div>mplayer expects to have an x window running.  <br>
                </div>
                You could try in your script to default to to the first
                one with<br>
              </div>
              export DISPLAY=:0<br>
              <br>
            </div>
            Not sure this will work when you are not logged in, but
            could be a start.<br>
            <br>
          </div>
          Dylan<br>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sun, Apr 30, 2017 at 4:46 PM,
            Antonio Olivares <span dir="ltr"><<a
                moz-do-not-send="true"
                href="javascript:_e(%7B%7D,'cvml','olivares14031@gmail.com');"
                target="_blank">olivares14031@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
                <br>
                On Sunday, April 30, 2017, Dylan Reinhold <<a
                  moz-do-not-send="true"
                  href="javascript:_e(%7B%7D,'cvml','dylan@ocnetworking.com');"
                  target="_blank">dylan@ocnetworking.com</a>> wrote:<br>
              </span>
              <div>
                <div>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>Does the command .dalarm exist in the
                            users home directory (and not just roots
                            home)?<br>
                          </div>
                          <div>Can you run ~/.dalarm from the
                            commandline as that user?<br>
                          </div>
                          <div><br>
                          </div>
                          If it does, change your redirections from
                          /dev/null into a file so you can see the
                          errors<br>
                          30 16 * * * ~/.dalarm >>~/dalarm.log
                          2>&1<br>
                          <br>
                        </div>
                        Then look in the log for any errors.<br>
                        <br>
                      </div>
                      Dylan<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Sun, Apr 30, 2017 at
                        4:05 PM, Antonio Olivares <span dir="ltr"><<a
                            moz-do-not-send="true">olivares14031@gmail.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">Dear folks,
                          <div><br>
                          </div>
                          <div>I am having a difficult time getting cron
                            to run a script.  I ran </div>
                          <div>$ crontab -e</div>
                          <div><br>
                          </div>
                          <div>Added the commands</div>
                          <div># min hr mon dom dow command</div>
                          <div>30 16 * * * ~/.dalarm >/dev/null
                            2>&1</div>
                          <div><br>
                          </div>
                          <div>Where ~/.dalarm has a command to call
                            mplayer and play some music files.</div>
                          <div>#!/bin/sh</div>
                          <div><br>
                          </div>
                          <div>/usr/local/bin/mplayer -really-quiet
                            -shuffle -playlist ~/.playlist</div>
                          <div><br>
                          </div>
                          <div>I have setup a crontab for root user and
                            it is working there, but not as regular
                            user.  I have checked and there is no
                            /var/cron/deny for my user. I have read that
                            I need to specify $PATH in crontab file as
                            well in documentation.  Any ideas as to how
                            to fix this?</div>
                          <div><br>
                          </div>
                          <div>Best Regards,</div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>Antonio</div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                </div>
              </div>
              <div>The error is as follows</div>
              <div>/usr/local/bin/xterm:  Xt error:  Can't open display:</div>
              <div>/usr/local/bin/xterm:  DISPLAY is not set</div>
              <div><br>
              </div>
              <div>Best Regards,</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>Antonio </div>
            </blockquote>
          </div>
          <br>
        </div>
      </blockquote>
      <div>I am trying it out to see if it would work or not.  I had
        another xterm shell opened, so maybe that is why it did not
        work?  </div>
      <div>I tried it and it still fails :(</div>
      <div>I have checked</div>
      <div>$ echo $DISPLAY</div>
      <div>and it outputs :13</div>
      <div><br>
      </div>
      <div>I have changed it to :13 and now it works!  Thank you very
        much for your help.</div>
      <div><br>
      </div>
      <div>Best Regards,</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Antonio </div>
    </blockquote>
    <br>
  </body>
</html>