Difference between revisions of "Mythfrontend"

From MythTV Official Wiki
Jump to: navigation, search
(Debugging MythFrontend Problems: MythFrontend -> mythfrontend, "Mythtv frontend" -> mythfrontend, "backend" -> "mythbackend", etc.)
m (alter category)
Line 80: Line 80:

Latest revision as of 15:17, 15 March 2012

Clean.png Cleanup: This article or section may require cleanup. Discuss the issue on the talk page

The core MythTV functionality is divided between the frontend(s) and the backend(s).

The frontend process (mythfrontend) is responsible for anything that requires interaction such Watching Recorded Programs or Watching TV. It provides the GUI you use on your TV or monitor as well as the LiRc, keyboard, or other input handling for Frontend Navigation. In addition, any MythTV Modules, or plugins, that are installed execute on the same machine that the user is interacting with. As such, the hardware requirements for a frontend are those necessary to support these features. Underpowered machines may not have enough processing power to decode recordings in software while the same machine could perform these functions if hardware decoding is available.

The MythTV architecture supports a theoretically unlimited number of frontend processes connecting to backends. A frontend process can run on the same machine as a backend in the instance of a combined machine, but is often found running on smaller, quieter, more stylish hardware since it the piece of equipment that usually sits within view of the user. When used on a separate machine from a backend, the frontend process connects over a network, either wired or wireless. It communicates with the backend to retreive the Electronic Program Guide and recorded content which is either streamed to the machine or directly accessed if the frontend has access to the same hardware and file storage the backend does.

The frontend process also has the widest platform support. Frontends have been ported to the Xbox and Mac OS X (see the Myth On Mac OS X guide) as well as the standard Linux Distros with additional work being done to port it to Windows under Cygwin.

Debugging mythfrontend Problems

Check the logs. They are by default written to stdout. To save them to a file, run mythfrontend -l file.log

Controlling the verbosity level of messages output from mythfrontend

More or less verbose logging output can be generated by passing options via the -v flag to the mythfrontend command. Here is an example to display all messages related to playback and channel:

    mythfrontend -v playback,channel

To list all available options, using the following command:

    mythfrontend -v help

Allowing mythfrontend on a remote machine to access mythbackend running on a second machine

If mythfrontend is not being run on the same machine as mythbackend, there is some additional configuration required to allow remote access to mythbackend.

Two separate issues related to MYSQL on the mythbackend host may be at work:

First, ensure that networking is enabled in the my.cnf file '/etc/mysql/my.cnf' on the mythbackend host machine. In this file, by default there exists either the following (depending on version) which prevents a remote mythfrontend from accessing the info on the database on the mythbackend host.



    bind-address localhost



Instead of skip-networking the default is now to listen only on localhost which is more compatible and is not less secure.

So a suggested solution is to change 'bind-address' to the machine's LAN IP address - although this will only work if the IP address is static and not dynamically assigned.


If bind-address is used, it can only be configured to use 1 IP address.



    #bind-address localhost






No '#' on the final example

Second, it may be necessary to alter the privileges table for the MythTV database to allow the frontend to access the mythbackend (NB; The mythfrontend communicates with the mythbackend by logging on to its mysql database -- generally as the user mythtv. On some systems by default mysql will not allow a user on another machine to login. The following grants users with id mythtv from any machine access to the mythtv databases).

This can be done by executing the following from the command line on the mythbackend machine (thanks to Torfinn Ingolfsen, Norway for this).


The 'passwd' in the command below should be the password listed in MythTV's configuration, which is also found in ~/.mythtv/mysql.txt

By default, the mysql database root user has no password, so this also should be changed by securing the default mysql accounts, refer to: http://dev.mysql.com/doc/refman/5.1/en/default-privileges.html

    mysql -u root -p mysql
    mysql> grant all on mythconverg.* to 'mythtv'@'%' identified by 'passwd';
    mysql> flush privileges;
    mysql> exit;