Coder Social home page Coder Social logo

Comments (11)

solsticedhiver avatar solsticedhiver commented on August 20, 2024 1

I have not made extensive testing so far, because it is a second device, that I will not be using myself.

But yeah, it boots straight into kodi. That was the goal

from kodi-standalone-service.

graysky2 avatar graysky2 commented on August 20, 2024

Not sure about RPiOS. These files are only tested on Arch Linux and Arch ARM. On Arch ARM: https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/kodi-rpi/PKGBUILD#L210-L217

from kodi-standalone-service.

solsticedhiver avatar solsticedhiver commented on August 20, 2024

So I added kodi to the sudo group (with NOPASSWD :-() and to render and dialout group
Then I noticed the polkit rules were not installed by the Makefile, so I added them manually, and ...

It is still not started at boot. And manually (with systemctl start kodi-gbm), the console flashed (three times) like the number of times kodi is started i guess
So wrong permission or something like that

I think this could be closed if this is archlinux only then

from kodi-standalone-service.

solsticedhiver avatar solsticedhiver commented on August 20, 2024

There is something weird like sudo openvt -sw -- su -c ${KODI_BINARY} $SAVED_ARGS in /usr/bin/kodi; That's why it needs sudo right.
If I change it to ${KODI_BINARY} $SAVED_ARGS &, it works when lauching manually. Still not working at boot though.

Never mind, I found a simple kodi.service that just launch kodi-standalone as main user. But I still need the changes I made in /usr/bin/kodi for that to work too....

from kodi-standalone-service.

graysky2 avatar graysky2 commented on August 20, 2024

So I added kodi to the sudo group (with NOPASSWD

That is a really REALLY bad idea and totally unnecessary.

There is something weird like sudo openvt -sw -- su -c ${KODI_BINARY} $SAVED_ARGS in /usr/bin/kodi

To be clear, this is the RPiOS version of kodi which I believe ships with a modified version of that file, see this and https://github.com/popcornmix/xbmc/commits/gbm_matrix/tools/Linux/kodi.sh.in

They could have a totally different method of starting kodi that is not a systemd unit. I do not know.

For Arch ARM, I revert the changes made to that file when we build. See: graysky2/xbmc@9c15731

from kodi-standalone-service.

popcornmix avatar popcornmix commented on August 20, 2024

On RPiOS, the openvt method of starting kodi is required for launching kodi from a running X desktop (e.g. from desktop start menu).
X is a DRM master, and it needs to relinquish this in order for kodi to launch. openvt (or chvt) is a method of achieving this. It unfortunately requires sudo, but the pi user (on RPiOS) is already in the sudo group.

I did try starting kodi from systemd and it seemed to work fine if you use kodi-standalone, and set the boot preference to boot to console (so the chvt step isn't required).

You can alternatively add @kodi to /etc/xdg/lxsession/LXDE-pi/autostart, and have boot to desktop, and it will be launched after desktop is started.

from kodi-standalone-service.

graysky2 avatar graysky2 commented on August 20, 2024

@popcornmix - Thanks for the explanation.
@solsticedhiver - Can you post your modified working /usr/bin/kodi so it can be shared with others?

from kodi-standalone-service.

solsticedhiver avatar solsticedhiver commented on August 20, 2024

I just used yours. I mean I applied the patch manually.
kodi.txt

from kodi-standalone-service.

graysky2 avatar graysky2 commented on August 20, 2024

Thanks. And everything is working as expected for you on RPiOS?

from kodi-standalone-service.

graysky2 avatar graysky2 commented on August 20, 2024

6e0aedb

from kodi-standalone-service.

solsticedhiver avatar solsticedhiver commented on August 20, 2024

oh . I forgot, I had to change the default boot target to graphical systemctl set-default graphical.target (because your .service set it as display manager I think). I had set it up to console or I don't what it was before

[Edit] and it works fine with your kodi.service. No problem there

I am using raspiOS Lite.

from kodi-standalone-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.