QML based frontend for MythTV

Post Install Hints & Tips

NOTE: Ubuntu 20.10 Groovy users must upgrade VLC to

VLC that comes with Groovy is know to segfault while playing some videos so it is recommended to upgrade to VLC

First add the required PPA's

sudo add-apt-repository ppa:savoury1/vlc3
sudo add-apt-repository ppa:savoury1/ffmpeg4

Now install VLC
sudo apt install vlc

This is a summary of the instructions found here

Disable wayland and Install XFCE4

If you use MythQML in a way that it's intended as a standalone HTPC then there is no need for a fancy window manager so use a lightweight one like XFCE4. If you are starting from scratch then just install XBuntu 19.10 Eoan which comes with XFCE4 as standard. If you are re-purposing any other Ubuntu without XFCE4 then use these instruction to switch to it

First disable wayland if it is enabled.
sudo nano /etc/gdm3/custom.conf
Now install XFCE4.
sudo apt install xfce4
Reboot your Ubuntu system once the xfce desktop is installed. This will also disable Wayland Then Click on * icon and select Xfce Session.

This is a summary of the instructions found here

Make sure MythTV's Security pin is correct

MythQML requires access to the mythprotocol so you need to set the :-
Setup -> Myth Backend -> Security Pin
setting in MythQML to match that in MythTV's mythtv-setup settings :-
1. General -> Host Address Backend Setup -> Security PIN (required).

You can use the Services API to quickly get the MythTV Security PIN by using something like this in a web browser (change the IP and hostname of the backend as required

Make sure MythQML can find the master backend by hostname

Some things like recordings, video and music files are linked to the backend by the name of the host they are stored on so make sure looking up the IP address from the hostname works correctly.
This is what I do there may be other better ways.
Make sure /etc/hosts has a line for the master backend so if its IP address is and it's hostname is 'mallard' you would add mallard

Install remote

This section needs elaborating on but here's a few hints to get you started.
sudo apt install ir-keytable
to test the remote use
sudo ir-keytable -t
Edit /etc/rc_maps.cfg
sudo nano /etc/rc_maps.cfg

Add hauppauge key map to /etc/rc_keymaps/

Edit /etc/rc_keymaps/hauppauge so it sends the correct keypresses

Add or edit /etc/rc.local
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# set the ir key auto repeat delay and period
ir-keytable -D 2000 -P 1000 -s rc0

# load the keymap for the hauppauge remote
/usr/bin/ir-keytable -w /etc/rc_keymaps/hauppauge

exit 0

Make sure it is executable
sudo chmod +x /etc/rc.local

This is a summary of instructions found here

Fix audio output

Open Pulse Audio Volume Control
Make sure the correct HDMI device is selected under output
Make sure it's unmuted
Select as fallback?
Lock channels

On Profile enable the HDMI profile and disable the builtin audio profile

Disable compositor

For me running with the compositor turned off in XFCE4 resulted in QML running a lot smoother.
Right click desktop -> Applications -> Settings -> Window Manager Tweaks -> Switch to Compositor Tab. Uncheck 'Enable display composing'

Check NVIDIA Settings

If you are using an NVIDIA graphics card or builtin graphics make sure 'Sync to VBlank' is turned on to reduce tearing.
Right click desktop -> Applications -> Settings -> NVIDIA X Server Settings. Under OpenGL Settings make sure 'Sync to VBlank' is checked.

Disable screen locker

Having the screen locker kick in is very annoying and undesirable on an HTPC so disable it completely. Right click desktop -> Applications -> Session and Startup. Switch to 'Application Autostart' and uncheck 'Screen Saver/Screen Locker (Launch screen locker program)'
We can disbale the update notifier while we are here - Uncheck 'Update Notifier (Chech for available update automatically)' and same for Power Manager (Power management for the Xfce desktop).

This is a summary of instructions found here

Start mythlauncher_qml at boot time

Right click the desktop -> Applications -> Settings -> Session and Startup - > Switch to 'Application Autostart'. Add a new program, give it a name (MythLauncher), use mythlauncher_qml for the command, give it a description if you want, Trigger should be 'On Login'.

Disable annoying 'System program problem detected' popup dialog

Having the 'System program problem detected' kick in is very annoying and undesirable on an HTPC so disable it completely. If you want to disable these alerts permanently you need to disable apport. To do so, open the /etc/default/apport file by
sudo nano /etc/default/apport
and change the line enabled=1 to enabled=0

Disable the panels in XFCE4

This is purly cosmetic but I prefer the screen background to be clean of any junk since I want the system to purely be an HTPC and nothing else.
To disable xfce panel and/or Thunar from starting in XFCE:
Start a clean xfce session with no application started.
Open XFCE settings manager > Session and Startup > Session tab.
Set “Never” under Restart Style for xfce4-panel and Thunar. Click Quit Program on each one. DO NOT do this for the desktop though or you will be left without any way to make further changes.
Click Save Session.
Logout and login again to test.
You can also remove the icons on the desktop while we are cleaning it up. Right click and select Desktop Settings, click the Icons tab and untick all the Default Icons.

Enable ssh access

If you want to remotely access your MythQML system using ssh to do some administration work then you may have to install it (XUbuntu doesn't install it by default).
sudo apt install ssh

Enable wake on lan using magic packet

If you let your MythQML system shutdown when idle and you sometimes need to wake the system up remotely to do some administration then one way is to enable wake-on-lan and use something like
wakeonlan 12:34:56:78:ab:cd
to wake it up.
First install ethtool which is used to enable the LAN interface to wake on magic packet and wakonlan which is used to do the actual wakeup
$ sudo apt install ethtool wakeonlan
edit /etc/rc.local and add
# enable WOL
ethtool -s eth0 wol g

The above assumes your network interface is called 'eth0'. You can get the actual name by running ifconfig where you can also get the MAC address which wakeonlan needs to know to which interface to send the magic packets. You may also have to check the BIOS settings to enable Onboard LAN Power On which is usually under the ACPI settings in the BIOS.

Allow the Shutdown and Reboot Commands to be run by sudo without a password

If you want your system to shutdown automatically after being idle for a while then you should use the launcher and check the settings on the 'Shutdown Settings' page.

The defaults will exit mythfrontend_qml after 90 minutes of in activitly and the mythlauncher_qml will wait a further 10 minutes before attempting to shutdown.

The default shutdown and reboot commands should be good on Ubuntu but by default sudo needs a password to execute them. You can fix this by editing /etc/sudoers to allow your user to execute those command without a password so shutdown will work unattended.
sudo visudo -f /etc/sudoers
and add a line something like this (change the user name paul to whatever you use to run mythlauncher_qml and mythfrontend_qml)
%paul ALL = NOPASSWD: /sbin/poweroff, /sbin/reboot