<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 29, 2020 at 8:15 PM Mark Perkins <<a href="mailto:perkins1724@hotmail.com">perkins1724@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;line-height:1.3;color:rgb(31,73,125)" id="gmail-m_-5106844050359929969nine_body_n1739d0-a08ba" dir="auto">
<div dir="auto"><br>
</div>
</div>
<div id="gmail-m_-5106844050359929969quoted_header_n1739d0-a08ba" dir="auto">
<hr style="border:none;height:1px;color:rgb(225,225,225);background-color:rgb(225,225,225)">
<div style="border:none;padding:3pt 0cm 0cm" dir="auto"><span style="font-size:11pt;font-family:Calibri,Arial,Helvetica,sans-serif"><b>From:</b> "A. F. Cano" <<a href="mailto:afc54@comcast.net" target="_blank">afc54@comcast.net</a>><br>
<b>Sent:</b> Thursday, 30 July 2020 9:25 am<br>
<b>To:</b> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<b>Subject:</b> Re: [mythtv-users] mythtv XMLTV wiki instructions<br>
</span></div>
</div>
<div id="gmail-m_-5106844050359929969quoted_body_n1739d0-a08ba" dir="auto">
<div dir="auto"><br type="attribution">
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div dir="auto">On Wed, Jul 29, 2020 at 04:48:05PM -0400, James Abernathy wrote:</div>
<div dir="auto">>    On Wed, Jul 29, 2020 at 2:20 PM Mark Perkins <[1]<a href="mailto:perkins1724@hotmail.com" target="_blank">perkins1724@hotmail.com</a>></div>
<div dir="auto">>    wrote:</div>
<div dir="auto">> </div>
<div dir="auto">>    ══════════════════════════════════════════════════════════════════════════</div>
<div dir="auto">> </div>
<div dir="auto">>      From: James Abernathy <[2]<a href="mailto:jfabernathy@gmail.com" target="_blank">jfabernathy@gmail.com</a>></div>
<div dir="auto">>      Sent: Thursday, 30 July 2020 2:02 am</div>
<div dir="auto">>      To: Discussion about MythTV</div>
<div dir="auto">>      Subject: [mythtv-users] mythtv XMLTV wiki instructions</div>
<div dir="auto">> </div>
<div dir="auto">>        I noticed the addition of:</div>
<div dir="auto">>        Be sure to read: [3]#MythTV_Setup. Hint: sudo --login --user=mythtv</div>
<div dir="auto">>        in the mythtv xmltv wiki.  I normally just sudo su mythtv and then do</div>
<div dir="auto">>        all the commands to set up the XMLTV.  However today I thought I just</div>
<div dir="auto">>        see how prefacing the normal instructions with the sudo --login --user</div>
<div dir="auto">>        mythtv and got an error message on on the second command in the</div>
<div dir="auto">>        setting up with tv_grab_zz_sdjson_sqlite:</div>
<div dir="auto">>        jim@mythbuntu:~$ sudo --login --user=mythtv tv_grab_zz_sdjson_sqlite</div>
<div dir="auto">>        --configure --config-file $HOME/.mythtv/SD.xmltv</div>
<div dir="auto">>        Failed to write to /home/jim/.mythtv/SD.xmltv.TMP at</div>
<div dir="auto">>        /usr/local/share/perl/5.30.0/XMLTV/<a href="http://Configure.pm" target="_blank">Configure.pm</a> line 187.</div>
<div dir="auto">>        Not sure why and just thought I'd report it. </div>
<div dir="auto">>        I'll stick to my tried and true method of just sudo su mythtv and then</div>
<div dir="auto">>        do all the work. And when I did it this time I just initialized and it</div>
<div dir="auto">>        all worked.</div>
<div dir="auto">>        Jim A</div>
<div dir="auto">> </div>
<div dir="auto">>         </div>
<div dir="auto">> </div>
<div dir="auto">>      What does this return?</div>
<div dir="auto">>      sudo --login --user=mythtv echo $HOME</div>
<div dir="auto">>      And how does it compare to:</div>
<div dir="auto">>      sudo su mythtv</div>
<div dir="auto">>      echo $HOME</div>
<div dir="auto">> </div>
<div dir="auto">>    Yeap, it different:</div>
<div dir="auto">>    jim@mythbuntu:~$ sudo --login --user=mythtv echo $HOME</div>
<div dir="auto">>    [sudo] password for jim:</div>
<div dir="auto">>    /home/jim</div>
<div dir="auto">>    jim@mythbuntu:~$ sudo su mythtv</div>
<div dir="auto">>    mythtv@mythbuntu:/home/jim$ echo $HOME</div>
<div dir="auto">>    /home/mythtv</div>
<div dir="auto">>    mythtv@mythbuntu:/home/jim$</div>
<div dir="auto">>    Jim A</div>
<div dir="auto"><br>
</div>
<div dir="auto">Interestingly, on Debian 10/stable (up to date) I get the same $HOME:</div>
<div dir="auto"><br>
</div>
<div dir="auto"><custom-prompt> sudo --login --user=mythtv</div>
<div dir="auto">$ echo $HOME</div>
<div dir="auto">/var/lib/mythtv</div>
<div dir="auto">$ ^D</div>
<div dir="auto"><custom-prompt> sudo su mythtv</div>
<div dir="auto"><custom-prompt> echo $HOME</div>
<div dir="auto">/var/lib/mythtv</div>
<div dir="auto"><custom-prompt> ^D</div>
<div dir="auto"><custom-prompt></div>
<div dir="auto"><br>
</div>
<div dir="auto">The only difference is that with the --login option it executes a login</div>
<div dir="auto">shell, which does reset the PS1 variable, which is otherwise not changed</div>
<div dir="auto">in the second case.  I set PS1 to a <custom-prompt> in ~/.bash_aliases,</div>
<div dir="auto">called from ~/.bashrc.</div>
<div dir="auto"><br>
</div>
<div dir="auto">This is probably how it's supposed to work.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Augustine</div>
<div dir="auto">_______________________________________________</div>
<div dir="auto">mythtv-users mailing list</div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">Decided to check the wiki - yes it appears the command should be two lines not one.</div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div dir="auto">Or more specifically - the intention (hint) is not to preface the normal instructions with the sudo --login --user mythtv. The intention is to use sudo --login --user mythtv without a command at the end to open an interactive
 shell and enter the commands inside that shell.</div></div></div></div></div></blockquote><div><br></div><div>In my book that's the same as "sudo su mythtv".  You have to exit from that to get my to your normal user as well. I generally start by doing "cd" just to make sure I'm at $HOME. But it works either way.</div><div><br></div><div>Jim A</div><div> </div></div></div>