Do kodi on raspbian need X server?
#1
I installed kodi on raspbian jessie, using the raspbian jessie lite image and then "apt-get install kodi".

I then tried to set up kodi as a systemd service, as outlined here.

Startup of the systemd service failed because I didn't have xinit installed.

However, I had tried starting kodi-standalone earlier and that seemed to work, so I replaced the command line in the systemd script with just /usr/bin/kodi-standalone, and that seemed to work: at least kodi came up on the TV after reboot of the r-pi.

So my question is: is an X server needed for kodi on raspbian? Or isn't it actually needed, and I can proceed with just using kodi-standalone? (or will I run into problems using just kodi-standalone without X...?)

Thanks!


- Steinar
Reply
#2
I see now that the Autostart Kodi for Linux page is marked as outdated, so that may be the answer to the X server question: no it is not needed anymore (but it would be good to have this confirmed).

Nevertheless what's in the outdated page, is useful information: creation of the kodi user and group, and setup of the systemd script (both of which I did expect the .deb package to do).
Reply
#3
No, X server is not needed for Kodi. Dont know why Kodi wouldn't autostart for you, more information would be required, but it works for me, although I dont use a systemd script. This is both kodi and kodi-standalone.
There is no need to create a user and group to run Kodi also. You can run it with the user pi or any other user with the right priveleges.
A systemd or a init script isn't included anymore either on Raspbian packages or other debian based systems, like for example Ubuntu for x86 machines. You have to create your own if you want it.
Reply
#4
(2017-07-27, 15:04)rascas Wrote: No, X server is not needed for Kodi.

Ah, OK. Thanks!

(2017-07-27, 15:04)rascas Wrote: Dont know why Kodi wouldn't autostart for you, more information would be required, but it works for me, although I dont use a systemd script. This is both kodi and kodi-standalone.

OK, so kodi was supposed to autostart after "apt-get install kodi"?

(2017-07-27, 15:04)rascas Wrote: There is no need to create a user and group to run Kodi also. You can run it with the user pi

I prefer not to use the pi user. Actually I would prefer to remove it, but I worry that this would break too many assumptions.
For now the only change I've done is to replace the default password.

Is this what breaks kodi?

I ran "apt-get install kodi" as user root and from a remote login session (a "mosh" session).

(2017-07-27, 15:04)rascas Wrote: or any other user with the right priveleges.

Setting up such a user is described in the page marked obsolete. It's how my kodi user has been set up.

(2017-07-27, 15:04)rascas Wrote: A systemd or a init script isn't included anymore either on Raspbian packages or other debian based systems, like for example Ubuntu for x86 machines. You have to create your own if you want it.

Ok, but if init or systemd isn't used, I'm curious about how kodi autostarts...?

Thanks!
Reply
#5
If you're just wanting a dedicated Pi for Kodi (or a dedicated uSD card for it at least) then why not consider a dedicated distro like LibreElec or OSMC?

or are you wanting other stuff there in parallel (then maybe OSMC or a dual-boot could still perhaps be worth a look).
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#6
(2017-07-27, 15:43)DarrenHill Wrote: If you're just wanting a dedicated Pi for Kodi (or a dedicated uSD card for it at least) then why not consider a dedicated distro like LibreElec or OSMC?

I am deeply familiar with debian so running kodi on raspbian will (in the long run) be the simplest approach for me.

If I was to run a canned distro I have no knowledge of, I might as well have bought a chromecast instead of an r-pi for this.

(2017-07-27, 15:43)DarrenHill Wrote: or are you wanting other stuff there in parallel (then maybe OSMC or a dual-boot could still perhaps be worth a look).

Maybe I'll put other stuff on this r-pi. I haven't decided yet. :-)
Reply
#7
OSMC is based on debian. It's optimized a bit to increase Kodi performance, but otherwise, would be quite similar to everything you are already used to, including apt and all the available debian packages there.

https://osmc.tv/wiki/general/frequently-...questions/
Reply
#8
(2017-07-27, 16:15)ActionA Wrote: OSMC is based on debian. It's optimized a bit to increase Kodi performance, but otherwise, would be quite similar to everything you are already used to, including apt and all the available debian packages there.

https://osmc.tv/wiki/general/frequently-...questions/

Is OSMC based directly on debian? Or is it based on raspbian?

(Note: being based directly on debian is not a bad thing in my view)
Reply
#9
OSMC is based directly on Debian not Raspbian, and Raspbian is based on Debian, with optimizations for the Pi.

Like DarrenHill said, if you just want to use Kodi, LibreELEC and OSMC are better since they are designed for it, autostart directly to Kodi and are easier to setup.
If you want to do more with the Raspberry Pi, like use graphical programs within a Desktop Environment, like web browsing, email/text writing, etc without the need to reboot to use another system, try to configure Raspbian to your likings. That's why I use it Wink
If you want help to configure autostart in Raspbian I can help.
Reply
#10
(2017-07-27, 16:41)rascas Wrote: OSMC is based directly on Debian not Raspbian, and Raspbian is based on Debian, with optimizations for the Pi.

Ok, thanks for the info!

(2017-07-27, 16:41)rascas Wrote: Like DarrenHill said, if you just want to use Kodi, LibreELEC and OSMC are better since they are designed for it, autostart directly to Kodi and are easier to setup.
If you want to do more with the Raspberry Pi, like use graphical programs within a Desktop Environment, like web browsing, email/text writing, etc without the need to reboot to use another system, try to configure Raspbian to your likings. That's why I use it Wink

Well, I don't plan to use the r-pi as a general computer.

I'm already running a raspberry pi as my router/firewall, and this r-pi runs raspbian, so that's why I started with raspbian here as well. I started with the small raspbian image and started setting it up like I would set up any debian computer (ssh setup, adding my own user, installing emacs, git and mosh, setting up logging to tmpfs etc.).

Then I installed kodi and started trying to get it to start.

(2017-07-27, 16:41)rascas Wrote: If you want help to configure autostart in Raspbian I can help.

Well, even if I decide to try out OSMC I'm still curious as to how kodi was supposed to start on raspbian if init or systemd wasn't used...? :-)
Reply
#11
You can still use an init.d script, a systemd script or other ways, if well configured.

Kodi needs to be run as a user with certain permissions to run fine, in every Linux system, and more on the Pi. The user has to be part of certain groups and also need some udev rules to be set.
For more information, check this topic:
https://www.raspberrypi.org/forums/viewt...6&t=109088

The default user "pi" has now all this set, so I recommend that you first try with it, to be easier for you if you have problems.

I use a Linux distribution based on Raspbian for the Pi, which I am the creator and maintainer called PiPplware and we have a script for the users to setup the boot mode automatically, according to their preference, and this is how we do for a boot directly to Kodi:
Basically we set Raspbian to boot to terminal with autologin (thats probably what you have now in Raspbian Jessie Lite, if not run raspi-config, you have an option there for that), and we create a file named /etc/profile.d/10-kodi with the following content, which is run automatically when a user logins:
Code:
cat /etc/profile.d/10-kodi.sh
# launch our autostart apps (if we are on the correct tty)
if [ "`tty`" = "/dev/tty1" ]; then
    kodi
fi

We currently use this way, because it is the way used currently by RetroPie (which is part of our system also), so it makes things simpler for us to change, instead of using a init.d/systemd script and our aim is not a fast boot system, but a resourceful one.

Good luck.
Reply
#12
(2017-07-27, 18:33)rascas Wrote: Basically we set Raspbian to boot to terminal with autologin (thats probably what you have now in Raspbian Jessie Lite,

Actually no... I get a regular console login once boot has finished (that is: I did... until I set up the systemd service that now starts kodi).

(2017-07-27, 18:33)rascas Wrote: if not run raspi-config, you have an option there for that),

Right. It's probably since I didn't have that set up that kodi didn't autostart initially...?
(and since I didn't have it set up that means this is how jessie lite is set up by default, at least in the july 7 2017 image)

Thanks for the info! :-)

I will try disabling/removing the systemd kodi service I created and changing the login setting in raspi-config and reboot and see what happens.
Reply
#13
(2017-07-27, 21:06)steinarb Wrote: I will try disabling/removing the systemd kodi service I created and changing the login setting in raspi-config and reboot and see what happens.

(I did this to test if the default behaviour of kodi in raspbian was similar to what you do in PiPplware)

I tried setting it to boot to console with autologin in raspi-config ("B2 Console Autologin Text console, automatically logged in as 'pi' user"), but unfortunately that was all it did: logged user pi into the console. kodi wasn't autostarted.

The other autologin alternative ("B4 Desktop Autologin Desktop GUI, automatically logged in as 'pi' user"), wanted to install lightwm and (presumably) X, so that wasn't it, either.
Reply
#14
I don't think autologin is needed if you are going to use a systemd script.

Probably you systemd script isn't good, you can try this one, it should work, change the user/group if needed:
https://www.raspberrypi.org/forums/viewt...5#p1121156
Reply

Logout Mark Read Team Forum Stats Members Help
Do kodi on raspbian need X server?0