ehough / docker-kodi

Dockerized Kodi with audio and video
https://hub.docker.com/r/erichough/kodi/
GNU General Public License v3.0
237 stars 58 forks source link

Guide for lightweight installation? #13

Closed AnderssonPeter closed 5 years ago

AnderssonPeter commented 5 years ago

Any chance you could add a guide how to install the smallest possible OS that supports this? Maybe ubuntu mini based? Exactly what packages do i need to install after base installation?

ehough commented 5 years ago

Thanks for your question.

A detailed guide that works for everyone might be difficult as x11docker and Kodi are both somewhat sensitive to the host system's hardware. But I would follow these general steps:

  1. Install Debian netinst or Ubuntu minimal on the host. This should leave you with a nice bare-bones Linux installation with (almost) no bloat.
  2. Install Docker (Debian instructions here, Ubuntu instructions here)
  3. Install X or Wayland. For many folks this is the trickiest part, but it really boils down to installing the right packages. Debian instructions here. For Ubuntu you could try installing Openbox which should bring in the right packages. Be sure to research which package, if any, is required/recommended for your video card.
  4. Install x11docker and ensure it works by testing one of the examples given on the README there. e.g. x11docker --gpu x11docker/xfce glxgears
  5. Proceed with the usage instructions for this image (on the README)

My personal HTPC (where I run Kodi using this image) is pretty slimmed-down, and you can find a list of packages I have installed for it here. Perhaps that will be useful.

Does that point you in the right direction? Closing this issue but let's continue the discussion!

AnderssonPeter commented 5 years ago

Thanks this was exactly what I was looking for, I will try it next week and get back to you with the results!

I have a i3 cpu with built in gpu so I guess I'm going to need drivers for that.

AnderssonPeter commented 5 years ago

I managed to get most of the things working by using debian, but im stuck at the following screen without being able to move the mouse (running in hyper-v while testing) image

Pressing keys does nothing :(

mviereck commented 5 years ago

You have to move the mouse into the terminal window to get keyboard focus. Well, if you can't move the mouse, you're stuck. You can run x11docker with sudo, than you don't need to type in the password here. But that doesn't help you with the mouse.

running in hyper-v

what does that mean? I thought hyper-v is some sort of Windows virtualization. does this mean you are running Debian in Windows with hyper-v?

ehough commented 5 years ago

I agree with @mviereck; try running x11docker with sudo just to get things working. How about: sudo x11docker --gpu x11docker/xfce glxgears. Does that work?

If your mouse isn't working, perhaps your virtualization software isn't passing through the USB devices? I've seen that type of screen before and my USB mouse (plugged in to my HTPC) worked.

AnderssonPeter commented 5 years ago

hyper-v is a virtualization(just like virtualbox, VMware, Xen and so on platform that comes built in with Windows, but it can run other oses than windows, so running linux works just fine.

Running sudo seems to solve the issue and successfully getting into kodi, but both mouse and keyboard seems to stop working (guessing some hyper-v incompatibly), but I'm happy with the results and I'm going to try this on my htpc!

Thanks for a awesome project!

AnderssonPeter commented 5 years ago

Hi again, i have managed to install xorg, docker and x11docker on my physical device.¨

x11docker --gpu x11docker/xfce glxgears works a intended, but x11docker --xorg --vt 7 --pulseaudio --wm none --gpu erichough/kodi just results in a black screen with a white _ (not flashing) in the upper left corner.

Removing --vt 7 makes kodi boot up but its super slow when entering the Settings / System menu, its also slow when going to audio so i guess its audio related?

What is --vt 7 supposed to do?

AnderssonPeter commented 5 years ago

using --alsa instead of --pulseaudio seems to solve the slowdown issue, are there any downsides to using alsa? (kodi will be the only program using the audio device)

ehough commented 5 years ago

There are no downsides to using --alsa if Kodi is the only software using audio. It's what I use and it works great.

What is --vt 7 supposed to do?

It tells x11docker to start the X server on virtual terminal / virtual console 7. You can safely omit this option if it fixes things for you.

Is everything else working OK?

AnderssonPeter commented 5 years ago

Thanks for your fast response!! I can't get it to start with systemd. I created the file at /etc/systemd/system/kodi.system, replaced ... with my arguments.

running systemctl start kodi prompts me for my password then nothing happens, (the x11docker process seems to run in the background, but nothing shows up).

i also enabled the service and restarted, but that had the same result.

What am i missing?

ehough commented 5 years ago

Sounds like you're almost there! To confirm, you're able to start things normally without using systemd?

Here's a copy of the systemd unit file that I've been using for almost a year now. Could you post a copy of yours? Maybe something will jump out.

I would try: sudo systemctl status kodi to check the service status. You could also inspect x11docker's logs at ~/.cache/x11docker/x11docker.log to see if anything interesting shows up there.

AnderssonPeter commented 5 years ago

adding --vt 7 when running as service did the trick! Thanks for all the support!!!!

Is there any way i could donate some money to this project?

ehough commented 5 years ago

Great!

Is there any way i could donate some money to this project?

Appreciate the gesture, but this project is a hobby and I'm happy to give something back to the community.

I know that the Kodi accepts donations ...