Ask questionskodi-x11 package script defaults to kodi-gbm binary

<!--- Please fill out this template to the best of your ability. You can always edit this issue once you have created it. --> <!--- Read the following link before you create a new problem report: -->

Bug report

Describe the bug

Here is a clear and concise description of what the problem is: <!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug --> <!--- A bug report that is not clear will be closed --> <!--- Put your text below this line --> The shell script /usr/bin/kodi that's part of the kodi-x11 package erroneously points to kodi-gbm as it's app-binary. While the script contains various checks to determine the window manager in use, when called from the command line or remotely for something as simple as version check, it fails.

$ /usr/bin/kodi --version Error: /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm not found $ dpkg -L kodi-x11 /. /usr /usr/bin /usr/bin/kodi /usr/bin/kodi-standalone /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/kodi /usr/lib/x86_64-linux-gnu/kodi/kodi-x11 /usr/lib/x86_64-linux-gnu/kodi/kodi-xrandr /usr/lib/x86_64-linux-gnu/kodi/system /usr/lib/x86_64-linux-gnu/kodi/system/ /usr/lib/x86_64-linux-gnu/kodi/system/players /usr/lib/x86_64-linux-gnu/kodi/system/players/VideoPlayer /usr/lib/x86_64-linux-gnu/kodi/system/players/VideoPlayer/ /usr/share /usr/share/doc /usr/share/doc/kodi-x11 /usr/share/doc/kodi-x11/NEWS.Debian.gz /usr/share/doc/kodi-x11/changelog.Debian.gz /usr/share/doc/kodi-x11/copyright

Expected Behavior

Here is a clear and concise description of what was expected to happen: <!--- Tell us what should happen --> <!--- Put your text below this line --> The expected behaviour is for the shell script part of the kodi-x11 package to refer to the binary that came with it or to be sufficiently flexible as to find the correct one even on the command line without a window manager running. Therefore, for the kodi-x11 package script, the binary /usr/lib/x86_64-linux-gnu/kodi/kodi-x11 should be called and not the non-existing binary /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm.

Actual Behavior

<!--- Tell us what happens instead --> <!--- Put your text below this line --> Script refers to /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm instead of /usr/lib/x86_64-linux-gnu/kodi/kodi-x11

Possible Fix

<!--- Not obligatory, but suggest a fix or reason for the bug --> <!--- Put your text below this line --> Change line 28 in the script from APP_BINARY=$LIBDIR/${bin_name}/kodi-gbm to APP_BINARY=$LIBDIR/${bin_name}/kodi-x11

To Reproduce

Steps to reproduce the behavior: <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> <!--- Put your text below this line -->

  1. Kodi installation via apt-get install kodi kodi-x11
  2. check version from command line via ssh as in kodi --version
  3. see error message


<!--- Put your text below this line --> <!--- A debuglog is always mandatory when creating an issue. Provide one! --> The debuglog can be found here: N/A


Here are some links or screenshots to help explain the problem: <!--- Put your text below this line --> N/A

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help: <!--- How has this bug affected you? What were you trying to accomplish? --> <!--- Put your text below this line --> Not sure if this is the right place to report this bug, I posted this in kodi forum already but got no response from anyone to my question where best to report it:

Your Environment

Used Operating system: <!--- Include as many relevant details about the environment you experienced the bug in --> <!--- Put your text below this line. Checkboxes can easily be ticked once issue is created -->

  • [ ] Android

  • [ ] iOS

  • [X] Linux

  • [ ] OSX

  • [ ] Raspberry-Pi

  • [ ] Windows

  • [ ] Windows UWP

  • Operating system version/name: Ubuntu 18.04.2 LTS / kernel 4.15.0-45-generic

  • Kodi version: 18.1-RC1 Git:20190217-33be1ec Media Center Kodi

<!--- End of this issue --> note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.


Answer questions AnonTester

The script is aware that there are multiple binaries available depending of the configuration. It checks for both the binaries and whether the relevant windowing system is available later. My point is that the script must not default to a particular binary when it may not exist.

Suggested fix, replace line 28 with this and leave the variable empty if nothing can be found. The script will issue an error later if the file in variable doesn't exist: if [ -x $LIBDIR/${bin_name}/${bin_name}-wayland ]; then APP_BINARY=$LIBDIR/${bin_name}/${bin_name}-wayland elif [ -x $LIBDIR/${bin_name}/${bin_name}-x11 ]; then APP_BINARY=$LIBDIR/${bin_name}/${bin_name}-x11 elif [ -x $LIBDIR/${bin_name}/${bin_name}-gbm ]; then APP_BINARY=$LIBDIR/${bin_name}/${bin_name}-gbm else APP_BINARY="" fi

Github User Rank List