Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

For discussion of topics specific to MythTV on linux
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

Hey everybody,
i am new here and have a problem to Install MythTV on Linux Mint 22 (ubuntu 24.04).
I tried it with the distro MythTV 2:34.0+fixes.20240210.e3e165a1-0ubuntu6.

Did anyone get it to work with Ubuntu 24.04 or LM 22?
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

I have built at least 3 tests mythtv-backends using LM22 and v34 of mythtv. It should be easy.

Assuming you are fine with the mythv user being set to the default UID/GID and you're okay with mysql for the datebase you just need to:

1. Add the ppa

Code: Select all

sudo add-apt-repository ppa:mythbuntu/34
sudo apt update
2. Install mythtv

Code: Select all

sudo apt install mythtv
3. Point browser at

Code: Select all

 localhost:6544
You'll need your sources directories setup with the right permissions, etc.

I use the script below after mythtv is installed but before I try to configure with the web app

Code: Select all

#! /bin/bash

# Globals
mythtv_storagegroup_path=/srv/mythtv/ # using /srv/mythtv in preference to /var/lib/mythtv/,
mythtv_storagegroups="banners coverart fanart recordings streaming videos bare-client db_backups  livetv sports screenshots trailers music musicart"

fn_setup_directories()
{
sudo mkdir -p $mythtv_storagegroup_path
cd $mythtv_storagegroup_path
sudo mkdir -p $mythtv_storagegroups
sudo chown -R mythtv:mythtv $mythtv_storagegroup_path
sudo chmod -R  2775 $mythtv_storagegroup_path

}

#main
# make sure we are not root
RUNNINGAS=`whoami`
if [ $RUNNINGAS = "root" ] ; then
    echo "Please run as ordinary user, not with sudo"
    exit 1
fi

fn_setup_directories
exit 0
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

Thanks for your fast reply. I tried to use the one from LM 22 repository not from extern. Do you know if this will work to?
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

I tried from your ppa:mythbuntu/34
I did not see problems. The Install runs.
but i could not open localhost:6544 or IP:6544

In mysql i can see a new database without tables and a new createt DB user.
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

Try a sequence of save and restart backend on the web app to force it yo upgrade the schema version.

What browse did you use? I used Firefox.
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

I use Firefox.
"save and restart backend on the web app" do you mean MythTV backend setup.
when i start it it says:
Mythbackend must be closed before continuing.
Is it OK to close any currently running mythbackend processes?
After OK it wants a password. Which password?
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

Don't use mythtv-setup. That was killed in version v34. Only use the web app:
http://localhost:6544
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

web app:
http://localhost:6544
no connection to server ....
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
bill6502
Developer
Posts: 2437
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by bill6502 »

Jim,

You may like to add the Storage Groups in the DB with your script. Like this:

Code: Select all

curl --header Accept:application/json --data HostName=example --data GroupName=DeleteMe --data DirName=DirName=/tmp/blah localhost:6544/Myth/AddStorageGroupDir
@diepe, make sure the backend is running. systemctl status mythtv-backend.service (if
you're running systemd.) It will show that it's running in the Web App mode.
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

Hey Jim
systemctl status mythtv-backend.service
× mythtv-backend.service - MythTV Backend
Loaded: loaded (/usr/lib/systemd/system/mythtv-backend.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2024-07-28 17:08:59 CEST; 35min ago
Duration: 52.261s
Docs: https://www.mythtv.org/wiki/Mythbackend
Process: 4308 ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS (code=exited, status=13>
Main PID: 4308 (code=exited, status=130)
CPU: 224ms

Jul 28 17:08:59 dietmar-ESPRIMO-P758 systemd[1]: mythtv-backend.service: Scheduled restart job, restart counter i>
Jul 28 17:08:59 dietmar-ESPRIMO-P758 systemd[1]: mythtv-backend.service: Start request repeated too quickly.
Jul 28 17:08:59 dietmar-ESPRIMO-P758 systemd[1]: mythtv-backend.service: Failed with result 'exit-code'.
Jul 28 17:08:59 dietmar-ESPRIMO-P758 systemd[1]: Failed to start mythtv-backend.service - MythTV Backend.
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

Not sure what is different, but I just did the following.

on a N100 nuc I did a fresh install of linuxmint 22 stable from ISO using Ventoy.

After install I updated all the packages using the update manager button in the Welcome screen

Rebooted

Opened a terminal and did

sudo add-apt-repository ppa:mythbuntu/34
sudo apt update
sudo apt install mythtv

during install it asked one question about other computers using mythtv. I answered yes.

After install of myhtv I did not reboot or anything. I just opened firefox and in the URL address window typed
localhost:6544

That opens the web app. You can see 3 boxes at the bottom of the page that tell you whether you can connected to the database, if mythconverg is present, and if the schema version is 1379.

On first try, all of these will not be correct, so you click save at the bottom and Restart backend at the stop of the same page. You should only have to do this once and you need to wait for 10 seconds or so while the backend updates the schema.

At that point the boxes should be green, green, and blue. Click next to setup language, then on the General tab make sure the Primary IP is selected as the correct IP for the system. Then configure the tuners , etc.
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

What to do for a clean Installation?

Code: Select all

sudo apt update
sudo apt upgrade -y

Code: Select all

sudo apt purge mythtv mythtv-backend mythtv-frontend mythtv-database -y
sudo apt autoremove -y
sudo apt autoclean

Code: Select all

sudo rm -rf /etc/mythtv
sudo rm -rf /var/lib/mythtv
sudo rm -rf ~/.mythtv
sudo rm -rf /usr/share/mythtv
sudo rm -f /etc/mysql/mysql.conf.d/mythtv.cnf

Code: Select all

sudo rm -f /etc/mysql/mysql.conf.d/mythtv.cnf
Delete mysql database and user.
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

I do not believe that it is possible to completely remove mythtv from a system. I've followed a lot of other people's advice and never succeeded. I only put the mythtv-backend on systems that don't have much on them so I can reinstall the whole OS anytime I need to reinstall mythtv.

On one system I run mythtv in an VM using libvirt/qemu but that system has Networked tuners so it works that way.

When I say fresh install I mean reformat the hard drive and boot the install ISO.
diepe
Junior
Posts: 16
Joined: Sun Jul 28, 2024 11:40 am
Germany

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by diepe »

I try to install mythtv on my test machine. here would it be possible to reinstall everything. But not on my real life system. Mythtv would be one part of the software like nas, security cams software, vms etc...
I try to replace tvheadend with mythtv. Cause i thougt it is in the standard repo of linux mint 22 and easy to install.
Trying two days to install standard. Dont get to run.
Is there an way to install from the distro repo?
Linux Mint 22 server
Kodi frontend
Cine S2 dual tv tuner
User avatar
jfabernathy
Senior
Posts: 612
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: Problem to Install MythTV on Linux Mint 22 (ubuntu 24.04)

Post by jfabernathy »

The version in the standard Ubuntu 24.04 repo is 34, but from back in February. I'm told it will stay that way. The PPA is the same thing but updated when needed. I'd run mythtv in a Ubuntu 24.04 VM if I could, that way it's isolated and can be restarted and rebuilt without affecting anything else.
Post Reply