Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing DVD #32

Open
GorillaCoder opened this issue Mar 24, 2020 · 8 comments
Open

Playing DVD #32

GorillaCoder opened this issue Mar 24, 2020 · 8 comments

Comments

@GorillaCoder
Copy link

How do I run x11docker so that kodi can either:

  • play dvds in the drive manually.
  • automatically play dvds when I close the dvd drawer.
@ehough
Copy link
Owner

ehough commented Mar 24, 2020

Though I haven't tested this myself, I would imagine that it would simply be a matter of exposing your DVD drive to your Kodi container. e.g. something like this:

$ /usr/local/bin/x11docker --share /dev/dvd:ro ... erichough/kodi

Of course, replace /dev/dvd with whatever device your host system uses for its DVD drive. Kodi should be able to access the device and everything should work as expected. Give that a try?

@GorillaCoder
Copy link
Author

Thanks much, I'm still a docker/x11docker noob. Let me try it, and I'll let you know how it goes. Perhaps a worthwhile addition to the doc?

@ehough
Copy link
Owner

ehough commented Apr 5, 2020

Checking in. Did you have any luck?

@GorillaCoder
Copy link
Author

Thanks for reaching out. I'm fighting it. I'd love to get kodi running in docker (first step in dockerizing my whole "house server", but not much luck.

Minor issue: with --share /dev/dvd:ro x11docker blows chow complaining docker: bad mode specified: ro. Replacing it with just --share /dev/dvd at least lets docker/x11/kodi run.

The real issue is that when running with the following command line: /usr/bin/x11docker --share /dev/dvd --hostdbus --gpu --home=$HOME/kodi -- -v /media/giuliano/45035146-fa0d-4b8a-95d7-4c6d06477427 -- erichough/kodi, the host /dev/dvd is not showing up in the container. From inside kodi I go to Setting/File manager/Add source/Browse/Root filesystem, and then dive down into /dev. All I see is: dri fd mqueue pts shm.

At this point I'm trying to just become conversant with x11docker, and figuring out why the --share isn't working. Unfortunately, trying to merely have it bring up kde-plasma fails:x11docker --desktop --gpu --init=systemd x11docker/kde-plasma squawking: /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server. If I could at least get x11docker to bring up a simple terminal I'd have half a chance at figuring out what's going on. I could look at dmesg, try sharing other files/folders/devices and see if the are shared in the container, etc.

At some point I'll just need to bail and install kodi on the host system. I've just started a new gig, and have a whole new code base to get up to speed on.

Any how, thanks again for checking in!

@GorillaCoder
Copy link
Author

Ah, BTW, x11docker seems to think it is sharing /dev/dvd and /dev/sr0:

x11docker note: Option --share: Shared file is a symbolic link. Sharing target, too.
Symlink: /dev/dvd
Target: /dev/sr0

On the off chance the symlink was the issue, I also tried --share=/dev/sr0 with no luck there either.

@mviereck
Copy link

mviereck commented Apr 5, 2020

Basic thought: Maybe kodi cannot handle the device file directly but needs the dvd to be mounted. Share the mount point.
Some systems automatically mount dvds in /media. Maybe --share /media works.

If I could at least get x11docker to bring up a simple terminal I'd have half a chance at figuring out what's going on.

You can get a terminal with:

x11docker --interactive --no-entrypoint --share /dev/dvd -- erichough/kodi bash

the host /dev/dvd is not showing up in the container.

Just checked, /dev/dvd and /dev/sr0 do appear here.

-v /media/giuliano/45035146-fa0d-4b8a-95d7-4c6d06477427

This looks suspicious. This does not share a host volume but creates one in Docker. Is this intended?

@GorillaCoder
Copy link
Author

Thanks.

I need to figure out how to get to the device, if I'm to get access to the DVD. Ideally to dbus too, so I can get it to auto load. Thanks for clueing me in about how to run bash. Hopefully I'll have time to play with it this week.

The -v was me playing around, based on something I saw in either the x11docker or docker-kodi docs, I've forgotten which. Not really directly related to this. Basically, it's where my ripped media is.

Thanks again, you've been very helpful. I appreciate it.

@mviereck
Copy link

mviereck commented Apr 6, 2020

Some first progress!

I've inserted an audio CD in my computer. Opening it showed cdda://sr0/ in the file browser.
Here I found that the CD is sort of mounted in /run/user/1000/gvfs/cdda:host=sr0.

Docker fails to share this. Ideally we should share /run/user/1000/gvfs, but this fails with:

docker: Error response from daemon: error while creating mount source path '/run/user/1000/gvfs': mkdir /run/user/1000/gvfs: file exists. 

Sharing /run/user/1000 (same as XDG_RUNTIME_DIR) works, but exposes some sensitive data from host. So this is not a good solution.

This works so far:

x11docker --pulseaudio --share $XDG_RUNTIME_DIR -- erichough/kodi

In kodi, browse to /run/user/1000/gvfs/cdda:host=sr0. You see an empty folder. Click "Add", and the audio files appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants