mythtv-backend-setup fails to add user to group mythtv under XFCE

Bug #1850746 reported by Peter D.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
New
Undecided
Unassigned

Bug Description

Running Mythtv-backend-setup from the XFCE menu looks like it is adding the user to the group "mythtv", but does not. The user has to add himself manually, either by editing /etc/groups or with adduser `whoami` mythtv.

The meta package is mythtv.
The package is mythtv-backend.
The file is called /usr/bin/mythtv-setup.
There is a call to check_groups, which is in
/usr/share/mythtv/dialogue_functions.sh
It has the line;
$SU_TYPE adduser ...
Su type seems to be "gksu" for XFCE and Gnome.

psd@EE:/usr/share/mythtv$ sudo apt-get install gksu
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gksu is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gksu' has no installation candidate

The bug also exists in older versions of Xubuntu; bionic, disco, probably more. I am not sure about other desktops.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: mythtv-backend 2:30.0+fixes.20190817.5cde0578d8-0ubuntu1
ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
Uname: Linux 5.3.0-19-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Oct 31 15:36:16 2019
InstallationDate: Installed on 2019-10-21 (9 days ago)
InstallationMedia: Xubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
Installed_mythtv_dbg: 2:30.0+fixes.20190817.5cde0578d8-0ubuntu1
SourcePackage: mythtv
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Peter D. (0123peter) wrote :
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Sorry, I don't understand what your issue is, but you've made reference to `gksu` which has been depreciated in Debian & Ubuntu.

`gksu` was last available in Ubuntu 17.10, and shouldn't be locatable for any release after that having been replaced by alternatives (`pkexec` for example) (https://jeremy.bicha.net/2018/04/18/gksu-removed-from-ubuntu/)

Revision history for this message
Peter D. (0123peter) wrote :

Mythtv does not work because it calls gksu (and other reasons).

Running Mythtv backend setup does nothing.

The fix will include replacing calls to gksu with something modern, perhaps pkexec. I will leave that to the programmers.

Grepping the source code for depreciated functions is probably a good idea.

Revision history for this message
Peter D. (0123peter) wrote :

Maybe it is XFCE that is setting $SU_TYPE to a depreciated function, but then lots of things would be broken not just Mythtv. I have not found the file to be patched.

Revision history for this message
Peter D. (0123peter) wrote :

Some of the call to gksu are in
/usr/share/mythtv/dialogue_functions.sh
along with a warning that you need gksu or kdesu to run mythtv-frontend.
Kdesu seems inappropriate, since I am not running KDE, also apt-get fails to install it (kdesu).

Revision history for this message
Chris Guiver (guiverc) wrote :

I `sudo apt source mythtv` (20.04) and ...

guiverc@d960-ubu2:~/mythtv-30.0+fixes.20190817.5cde0578d8$ fgrep -r gksu
debian/changelog: * debian/control: Add zenity | kdebase-bin, gksu | kdebase-bin
debian/changelog.in: * debian/control: Add zenity | kdebase-bin, gksu | kdebase-bin
debian/dialog_functions.sh: SU=`which gksu`
debian/dialog_functions.sh: SU_TYPE=gksu
debian/dialog_functions.sh: SU=`which gksu`
debian/dialog_functions.sh: SU_TYPE=gksu
debian/dialog_functions.sh: SU=`which gksu`
debian/dialog_functions.sh: SU_TYPE=gksu
debian/dialog_functions.sh: failure "You need gksu or kdesu installed to run mythfrontend"

Revision history for this message
Peter D. (0123peter) wrote :

Sorry if I got a bit excited.

On a fresh install of Xubuntu, Mythtv backend setup does not work.

If it worked, then when it was first run it would add the user to the group "mythtv", something that requires root access. My guess is that long ago a pop up box would prompt the user for their password before continuing.

The grep above revels multiple places where gksu is expected to exist. Because gksu has been removed from the distribution each of these lines is a bug that leaves a variable empty. I don't know what the correct fix is. It seems a bit to demanding to expect the end user edit /etc/group in a terminal.

The man page for apt does not mention "source", is that documented anywhere? I got a "permission denied".

kdebase-bin seems to be an alternative to gksu it does not have an installation candidate either.

There is a way to do it, gpated has a pop up that prompts for a password.

Revision history for this message
Thomas Mashos (tgm4883) wrote : Re: [Mythbuntu-bugs] [Bug 1850746] Re: mythtv-backend-setup fails to add user to group mythtv under XFCE
Download full text (3.6 KiB)

Tickets for this should probably be forwarded upstream, hopefully with a
patch. As it stands now, there aren't much eyes on this package and I don't
have a way to test this anymore as I don't use MythTV nor Ubuntu.

On Thu, Oct 31, 2019 at 4:55 PM Peter D. <email address hidden> wrote:

> Sorry if I got a bit excited.
>
> On a fresh install of Xubuntu, Mythtv backend setup does not work.
>
> If it worked, then when it was first run it would add the user to the
> group "mythtv", something that requires root access. My guess is that
> long ago a pop up box would prompt the user for their password before
> continuing.
>
> The grep above revels multiple places where gksu is expected to exist.
> Because gksu has been removed from the distribution each of these lines
> is a bug that leaves a variable empty. I don't know what the correct
> fix is. It seems a bit to demanding to expect the end user edit
> /etc/group in a terminal.
>
> The man page for apt does not mention "source", is that documented
> anywhere? I got a "permission denied".
>
> kdebase-bin seems to be an alternative to gksu it does not have an
> installation candidate either.
>
> There is a way to do it, gpated has a pop up that prompts for a
> password.
>
> --
> You received this bug notification because you are a member of Mythbuntu
> Bug Team, which is subscribed to mythtv in Ubuntu.
> https://bugs.launchpad.net/bugs/1850746
>
> Title:
> mythtv-backend-setup fails to add user to group mythtv under XFCE
>
> Status in mythtv package in Ubuntu:
> New
>
> Bug description:
> Running Mythtv-backend-setup from the XFCE menu looks like it is
> adding the user to the group "mythtv", but does not. The user has to
> add himself manually, either by editing /etc/groups or with adduser
> `whoami` mythtv.
>
> The meta package is mythtv.
> The package is mythtv-backend.
> The file is called /usr/bin/mythtv-setup.
> There is a call to check_groups, which is in
> /usr/share/mythtv/dialogue_functions.sh
> It has the line;
> $SU_TYPE adduser ...
> Su type seems to be "gksu" for XFCE and Gnome.
>
> psd@EE:/usr/share/mythtv$ sudo apt-get install gksu
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package gksu is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
>
> E: Package 'gksu' has no installation candidate
>
> The bug also exists in older versions of Xubuntu; bionic, disco,
> probably more. I am not sure about other desktops.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: mythtv-backend 2:30.0+fixes.20190817.5cde0578d8-0ubuntu1
> ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
> Uname: Linux 5.3.0-19-generic x86_64
> ApportVersion: 2.20.11-0ubuntu8.1
> Architecture: amd64
> CurrentDesktop: XFCE
> Date: Thu Oct 31 15:36:16 2019
> InstallationDate: Installed on 2019-10-21 (9 days ago)
> InstallationMedia: Xubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> Installed_mythtv_dbg: 2:30.0+fixes.20190817.5cde0578d8-0ubuntu1
> SourceP...

Read more...

Revision history for this message
Chris Guiver (guiverc) wrote :

Hi @0123peter

The `apt source` command I used is documented in `man apt-get`, ie.
"source causes apt-get to fetch source packages. APT will examine the available packages to decide which source package to fetch. It will then find and download into the current directory the newest available version...". My fingers just typed `apt` that time instead of `apt-get` (`apt` knows how to deal with many `apt-get` commands). Your sources.list also need to have "deb-src" lines present so source can be found & downloaded. If you need help with it, I'd suggest looking at https://discourse.ubuntu.com/t/finding-help/712 which lists many support options.

I'll also give the `mythtv` devs/maintainers time to deal with the issue first.

Revision history for this message
Peter D. (0123peter) wrote :

Thanks for the `man apt-get`.

I thought that the file /usr/share/mythtv/mythtv-setup.sh was an Ubuntu wrapper and therefore any reliance on something removed from Ubuntu was "a bit silly". That file is actually part of Mythtv, so it is an upstream thing. It has had a major rewrite months ago.
https://code.mythtv.org/trac/ticket/13256
We just have to wait for it to make its way though the system.

This bug report is mostly noise, sorry.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.