<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 9:06 PM, Mark Perkins <span dir="ltr"><<a href="mailto:perkins1724@hotmail.com" target="_blank">perkins1724@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple"><div><div><div>
<div><div><div><p class="" style="margin-bottom:12pt"><span lang="EN-US" style="font-size:10pt;font-family:Tahoma,sans-serif;color:rgb(31,73,125)">//snip//</span><u></u><u></u></p></div></div><div class="im"><div><p class="">
<u></u> <u></u></p></div><div><p class="">I made some changes, but I don't think I "chmod" ed properly:<u></u><u></u></p></div><div><p class=""> daryl@daryl-A780L3C:~$ cd /usr/local/bin<u></u><u></u></p></div>
<div><p class="">daryl@daryl-A780L3C:/usr/local/bin$ ls -al<u></u><u></u></p></div><div><p class="">total 20<u></u><u></u></p></div><div><p class="">drwxr-xr-x 2 root root 4096 Aug 13 13:55 .<u></u><u></u></p></div><div>
<p class="">drwxr-xr-x 10 root root 4096 Feb 13 17:07 ..<u></u><u></u></p></div><div><p class="">-rwxrwxr-x 1 root root 486 Aug 12 15:10 change-channel.sh<u></u><u></u></p></div><div><p class="">-rwxrwxr-x 1 root root 2088 Aug 12 14:13 change-channel.sh~<u></u><u></u></p>
</div><div><p class="">-rw-r--r-- 1 root root 1590 Aug 13 13:55 check_stb<u></u><u></u></p></div><div><p class="">daryl@daryl-A780L3C:/usr/local/bin$ <u></u><u></u></p></div></div><div><p class=""><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Daryl – I’m about as far away from being an expert in these things as you can be and not be still using a stone axe but will give a quick response on this one in case it helps you move to the next step. I think the ‘</span>rw-r--r--<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">’ next to the ‘</span>check_stb<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">’ means:<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">rw- (first group of 3 characters) owner (root) can read and write but not execute<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">r-- second group of 3 characters) group (root) can read but not write or execute<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">r--(third grouping of 3 characters) other can read but not write or execute<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">To change the permissions of owner to allow it to execute would need to:<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">chmod 744 /usr/local/bin/check_stb<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">This should give ‘</span>rwxr--r--<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">’ but would need to execute the file as owner (root) in your case most likely using sudo.<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Note for me chmod can also only be run by superuser so I need to preface with sudo and then enter password, you might need to do the same:<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">sudo chmod 744 /usr/local/bin/check_stb<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I tend to use 755 when setting a file to execute which should give permissions of ‘</span>rwxr-xr-x<span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">’. If the script is going to be called by other users (for example the mythtv user) then that would probably be recommended.<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">sudo chmod 755 /usr/local/bin/check_stb<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">You should then be able to execute as per the original command below.<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">//snip//<u></u><u></u></span></p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
</div><div class="im"><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><p class="">To test the script, you can simply run it manually from a terminal<br>
prompt:<br><br> /usr/local/bin/check_stb<u></u><u></u></p></blockquote><div><p class=""><u></u> <u></u></p></div><div><p class="">results of test:<u></u><u></u></p></div><div><p class=""><u></u> <u></u></p></div><div><p class="">
daryl@daryl-A780L3C:/usr/local/bin$ cd ~<u></u><u></u></p></div><div><p class="">daryl@daryl-A780L3C:~$ /usr/local/bin/check_stb<u></u><u></u></p></div><div><p class="">bash: /usr/local/bin/check_stb: Permission denied<u></u><u></u></p>
</div><div><p class="">daryl@daryl-A780L3C:~$ sudo /usr/local/bin/check_stb<u></u><u></u></p></div><div><p class="">[sudo] password for daryl: <u></u><u></u></p></div><div><p class="">sudo: /usr/local/bin/check_stb: command not found<u></u><u></u></p>
</div><div><p class="">daryl@daryl-A780L3C:~$ <u></u><u></u></p></div><div><p class=""><u></u> <u></u></p></div></div><div><p class=""><span style="color:rgb(31,73,125)">//snip//</span><u></u><u></u></p></div></div><p class="">
<u></u> <u></u></p></div></div></div></div><br>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a></blockquote><div><br></div><div>Thanks Mark, I now seem to be "chmod" ed properly, but as you pointed out Stephen, there is no display command:</div>
<div><br></div><div> daryl@daryl-A780L3C:~$ /usr/local/bin/check_stb</div><div>irsend: command failed: SEND_ONCE DCT700 DISPLAY</div><div>irsend: unknown command: "DISPLAY"</div><div>daryl@daryl-A780L3C:~$ </div>
</div><br></div></div>