How To - Making a Raspberry Pi into a MythTV client

Pieced together from the MythTV Wiki, links on the Wiki, and my own knowledge/testing/experience/preferences.

Starting from a new, clean image of NOOBS:

  1. Boot NOOBS
  2. Open the Terminal
    • sudo apt update
      sudo apt upgrade
      sudo apt autoremove
      sudo rpi-update
  3. Reboot
  4. Open Menu → Preferences → Raspberry Pi Configuration
    1. Main Tab
      1. Change the password (to something secure)
      2. Set the hostname
      3. Auto Login: Off
      4. Splash Screen: Disabled
      5. Set Resolution (if necessary - Pi usually auto-configures the correct resolution)
      6. Underscan: Disabled
    2. Interfaces tab
      1. SSH: Enabled
      2. Everything Else: Disabled
    3. Performance tab
      1. GPU Memory: 256
    4. Localisation tab
      1. Set Timezone
        1. Area: Europe
        2. Location: London
      2. Set Wi-Fi Country
        1. GB - Britain (UK)
  5. Reboot
  6. Turn off Wi-Fi and Bluetooth via the System Tray (this should be the last time you need the mouse)
  7. Open the Terminal
    • sudo su
      nano -w /etc/apt/sources.list.d/mythtv-light.list
  8. Enter the following text:
    • deb http://dl.bintray.com/bennettpeter/deb/ stretch myth29
  9. Save and exit with Ctrl+X, Y, Enter
    • wget -O - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | apt-key add -
      apt update
      apt install mythtv-light cpufrequtils ratpoison autofs
      adduser mythtv
      adduser mythtv dialout
      adduser mythtv cdrom
      adduser mythtv audio
      adduser mythtv video
      adduser admin
      adduser admin adm
      adduser admin dialout
      adduser admin cdrom
      adduser admin sudo
      adduser admin audio
      adduser admin video
      adduser admin plugdev
      adduser admin games
      adduser admin users
      adduser admin input
      adduser admin netdev
      adduser admin spi
      adduser admin i2c
      adduser admin gpio
      systemctl disable raspi-config
      nano -w /etc/default/cpufrequtils
  10. Enter the following text:
    • GOVERNOR="performance"
  11. Save and exit with Ctrl+X, Y, Enter
    • visudo
  12. Add the following to the bottom of the file:
    • mythtv ALL = NOPASSWD: /sbin/shutdown, /sbin/reboot
  13. Save and exit with Ctrl+X, Y, Enter
    • nano -w /etc/lightdm/lightdm.conf
  14. Find the line
    • [Seat:*]
  15. Uncomment and modify these two parameters:
    • autologin-user=mythtv
      autologin-user-timeout=5
  16. Save and exit with Ctrl+X, Y, Enter
    • nano -w /etc/auto.master
  17. Comment out these two lines:
    • #+dir:/etc/auto.master.d
      #+auto.master
  18. Add the following line to the bottom of the file:
    • /- auto.direct --timeout=60 --ghost
  19. Save and exit with Ctrl+X, Y, Enter
    • nano -w /etc/auto.direct
  20. Enter the following text:
    • /mnt/nfsshare -fstype=nfs4,_netdev,exec,timeo=10,fg                           nfsserver:/mnt/share
      /mnt/smbshare -fstype=cifs,uid=mythtv,user=remoteuser,password=remotepassword ://192.168.1.10/share
  21. Save and exit with Ctrl+X, Y, Enter
    • mkdir /mnt/share
      su mythtv
      cd ~
      nano -w .xsession
  22. Enter the following text:
    • /usr/bin/xset -dpms s off
      /usr/bin/ratpoison &
      /usr/bin/mythwelcome -O libCECEnabled=0
  23. Save and exit with Ctrl+X, Y, Enter
    • nano -w .ratpoisonrc
  24. Enter the following text:
    • bind c exec /usr/bin/lxterminal
  25. Save and exit with Ctrl+X, Y, Enter
    • mkdir .mythtv
      nano -w .mythtv/config.xml
  26. Enter the following text:
    • <Configuration>
        <Database>
          <PingHost>1</PingHost>
          <Host>mythtv.server</Host>
          <UserName>mythtv</UserName>
          <Password>password</Password>
          <DatabaseName>mythconverg</DatabaseName>
          <Port>3306</Port>
        </Database>
        <WakeOnLAN>
          <Enabled>0</Enabled>
        </WakeOnLAN>
      </Configuration>
  27. Save and exit with Ctrl+X, Y, Enter
  28. Reboot
  29. Wait for the MythTV Frontend to start
  30. Exit the Frontend (Escape or Left Arrow)
  31. Press i
  32. Uncheck 'Automatically start mythfrontend'
  33. Go to Finish and press Enter
  34. Press F11
  35. Change 'Command to run Xterm' to:
    • /usr/bin/lxterminal
  36. Go to Finish and press Enter
  37. Press Enter to start the Frontend
  38. Go to Setup and press Enter or Right Arrow
  39. Go to Setup Wizard and press Enter or Right Arrow
  40. Go to Next and press Enter
  41. Change the 'Audio Device' with the arrow keys to:
    • ALSA:default:CARD=ALSA
  42. Change the 'Number of Speakers' to: Stereo
  43. Next
  44. Change the 'Video Playback Profile' to:
    • OpenMAX High Quality
  45. Go to 'Test High Definition' to confirm everything works as expected
  46. Finish
  47. General
  48. Remote Control
  49. Change 'Enable Network Remote Control Interface' to: On
  50. Back
  51. AirPlay
  52. Enable AirPlay: Off
  53. Back
  54. Back
  55. Save and Exit
  56. Appearance
  57. Theme/Screen Settings
  58. Menu Theme: Media Center Menu Theme
  59. Back
  60. Localisation
  61. Date Format: Sun 8 Jul 2018
  62. Short Date Format: Sun 8/7
  63. Time Format: 14:10 (the 2nd one for leading zeroes)
  64. Back
  65. Back
  66. Save and Exit
  67. Wait for the Frontend to reload
  68. Advanced
  69. Setup
  70. Theme Chooser
  71. Mythbuntu 28.21
  72. Wait for the Frontend to reload
  73. Advanced
  74. Setup
  75. Audio
  76. Use internal volume controls (press Right Arrow)
  77. Master mixer volume: 100
  78. Back
  79. Back
  80. Save and Exit
  81. TV Settings
  82. Playback
  83. General Playback
  84. Action on playback exit: Save position and exit
  85. Back
  86. View Recordings
  87. Start in group: Off
  88. Recording Groups
  89. Save current group filter when changed: Off
  90. Back
  91. Include the 'Watch List' group (press Right Arrow)
  92. Start from the Watch List view: On
  93. Days to exclude weekly episodes after delete: 0
  94. Back
  95. Back
  96. Seeking
  97. Reverse direction in Fast Forward/Rewind: Off
  98. Back
  99. Back
  100. Save and Exit
  101. Playback OSD
  102. Enable interactive TV: Off
  103. Back
  104. Save and Exit
  105. Back
  106. Media Settings
  107. Videos Settings
  108. General Settings
  109. Directories that hold videos:
    • /mnt/share/videos
  110. Video Tree remembers last selected position: On
  111. Back
  112. Save and Exit
  113. Metadata Settings
  114. Perform metadata update after: Off
  115. Display unknown file types: On
  116. OK
  117. Back
  118. Back
  119. Back
  120. Edit Keys
  121. Main Menu
  122. Exit Prompt
  123. Remove Binding: Escape
  124. Exit
  125. Bind Key: Escape
  126. Conflict OK
  127. TV Playback
  128. Pause
  129. Bind: Media Play
  130. Escape
  131. Save Changes
  132. Back
  133. Back (Exit MythFrontend)
  134. Press 'M' to open the menu
  135. Exit
  136. MythWelcome will restart
  137. Enter (to start MythFrontend)
  138. Watch Videos
  139. Press the Menu key
  140. Change View
  141. Switch to List View
  142. Job done!