flathub / org.darktable.Darktable

https://flathub.org/apps/details/org.darktable.Darktable
5 stars 14 forks source link

Usb tether of camera does not work to flatpak Darktable #4

Closed Firstyear closed 5 years ago

Firstyear commented 6 years ago

Hi there,

I've been really enjoying the Darktable flatpak you provide. Thanks for the great work to make it work so nicely.

Sadly I noticed that when I connected a camera via USB that should be supported for live view / capture (fujifilm xt-10) it did not display in the application.

I am aware that flatpaks do have a set of system isolation capabilities and wonder if this is related to the issue. Is there a way to enable usb tether support for the flatpaked darktable?

Thank you!

Firstyear commented 6 years ago

flatpak run --device=all org.darktable.Darktable

Does not seem to resolve the issue :(

matze commented 6 years ago

Unfortunately, I cannot test this because I do not use USB tethering. But as far as I can tell it might or might not not only be a permission problem but also a missing dependency to libgphoto2. I added that now, so please check again if you can use tethering.

Firstyear commented 6 years ago

Great! I'll try this out as soon as I can. Thank you!

Firstyear commented 6 years ago

Okay tried this out. I think this would work now, but it looks like on further inspection my camera is not supported by gphoto 2 :(

I'll follow this up with the gphoto2 developers, and hopefully in a future update this will work.

Feel free to close this, and again, thanks for the quick update :)

matze commented 6 years ago

Alright, feel free to re-open this issue if it is resolved by gphoto2 but not working with the flatpak.

jurf commented 6 years ago

I tried it today, did not work, even with --device=all. Unfortunately I don’t have the camera anymore.

jurf commented 6 years ago

Could someone reopen this please?

schuhumi commented 5 years ago

Hi, I'm writing an application for my own, utilizing libgphoto2 and flatpak as well. It didn't work initially, and on my quest to make it work I searched a lot and finally found out that libgphoto2 needs libusb as dependency. Have a look at this: https://gitlab.gnome.org/GNOME/shotwell/blob/master/flatpak/org.gnome.Shotwell.json

For debugging purposes I also added gphoto2, it looks like this for me now:

        {
            "name": "libusb",
            "sources" : [
                {
                "type" : "archive",
                "url" : "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2",
                "sha256" : "75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157"
                }
            ],
            "config-opts" : ["--disable-udev"]
        },
        {
            "name": "libgphoto2",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.19/libgphoto2-2.5.19.tar.bz2",
                    "sha256": "62523e52e3b8542301e072635b518387f2bd0948347775cf10cb2da9a6612c63"
                }
            ]
        },
        {
            "name": "gphoto2",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://netcologne.dl.sourceforge.net/project/gphoto/gphoto/2.5.17/gphoto2-2.5.17.tar.bz2",
                    "sha256": "aa571039240c68a053be710ca41645aed0239fa2f0b737b8ec767fef29e3544f"
                }
            ]
        },

And now you can check whether libgphoto2 finds your camera inside the flatpak container like this:

me@mycomputer$ flatpak run --command=sh org.gnome.My_Fancy_App
sh-4.3$ gphoto2 --auto-detect
Modell                         Port                                            
----------------------------------------------------------
Sony Alpha-A77 M2 (Control)    usb:001,007     
sh-4.3$

Just wanted to let you know about this as I find it very cumberstone to find decent information about specific dependencies in flatpak containers. Haven't tried it in your case, but maybe it fixes the issue.

hfiguiere commented 5 years ago

we need to add libusb to the flatpak. otherwise libgphoto2 is built without USB support.

hfiguiere commented 5 years ago

As mentioned in the PR, --device=all is needed with the patch above. But at least USB support is there.

hfiguiere commented 5 years ago

It will be added by default so that USB works out of the box.

hfiguiere commented 5 years ago

Fixed in the latest flatpak