flatpak portal example on github

Winnie Poon winniepoon_home at hotmail.com
Tue Nov 26 19:29:21 UTC 2019


Hi all,

that would be sad news 🙁  I remember a while ago when I asked in this mailing list about usb drive access, a few developers including Alex suggested the device portal, that's why I looked into that, but now it seems like --device=all is the ONLY option?

So really my approach of using file chooser to grant permission to the right file e.g. /dev/bus/usb/001/010 would not go anywhere?  like even after if i can somehow solve the root owner issue?

I'm really hoping to have a better solution than using --device=all. 🙁

Regards,
Winnie



________________________________
From: Patrik Nilsson <asavartzeth at gmail.com>
Sent: November 25, 2019 11:31 PM
To: Winnie Poon <winniepoon_home at hotmail.com>
Cc: Ryan <rymg19 at gmail.com>; Jan Grulich <jgrulich at redhat.com>; Flatpak List <flatpak at lists.freedesktop.org>; Matthias Clasen <mclasen at redhat.com>; Jorge GarcĂ­a <jgarciao at gmail.com>
Subject: Re: flatpak portal example on github

Hi

Perhaps it would be relevant to mention this issue?: https://github.com/flatpak/xdg-desktop-portal/issues/228

Surely the issue is that there currently is no portal for block device access, which is why people recommend --device=all as a workaround.

Best
Patrik

tis, 26 nov 2019 klockan 06:31 skrev Winnie Poon <winniepoon_home at hotmail.com>:
My attempt of using the portal is to avoid using the blanket type access --device=all.

From my previous inquiries here, i was told that using the portal would be an alternative way to avoid opening up all device access.

It looks like i just need to use GTK file chooser to open up access to a particular path in /dev/bus/usb/....  the fact that the file's owned by root may make it a bit tricky, but i'm sure i should still be able to access it in the sandbox?

Much appreciated any suggestions you may have.

Thanks,
Winnie


________________________________
From: Ryan <rymg19 at gmail.com>
Sent: November 25, 2019 6:17 PM
To: Winnie Poon <winniepoon_home at hotmail.com>
Cc: Matthias Clasen <mclasen at redhat.com>; Jan Grulich <jgrulich at redhat.com>; Flatpak List <flatpak at lists.freedesktop.org>; Jorge GarcĂ­a <jgarciao at gmail.com>
Subject: Re: flatpak portal example on github

If you're accessing USB devices you might be better off with the --device=all permission.

On Mon, Nov 25, 2019, 7:56 PM Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>> wrote:
Hi,

i'm trying to use the GTK file chooser approach to access the usb mass storage (/dev/bus/usb/...), the filechooser can see the path and file, but it sees the file size as zero, probably because it's owned by root?

how do i use the portal to access a file like this?

Thanks,
Winnie

________________________________
From: Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>>
Sent: November 22, 2019 5:36 PM
To: Matthias Clasen <mclasen at redhat.com<mailto:mclasen at redhat.com>>
Cc: Jan Grulich <jgrulich at redhat.com<mailto:jgrulich at redhat.com>>; Flatpak List <flatpak at lists.freedesktop.org<mailto:flatpak at lists.freedesktop.org>>; Jorge GarcĂ­a <jgarciao at gmail.com<mailto:jgarciao at gmail.com>>
Subject: Re: flatpak portal example on github

Just to clarify, i'm referring to USB mass storage here.

Thanks again.

________________________________
From: Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>>
Sent: November 22, 2019 2:39 PM
To: Matthias Clasen <mclasen at redhat.com<mailto:mclasen at redhat.com>>
Cc: Jan Grulich <jgrulich at redhat.com<mailto:jgrulich at redhat.com>>; Flatpak List <flatpak at lists.freedesktop.org<mailto:flatpak at lists.freedesktop.org>>; Jorge GarcĂ­a <jgarciao at gmail.com<mailto:jgarciao at gmail.com>>
Subject: Re: flatpak portal example on github

Hi,

Would like to ask similar question for usb drive access.

Is it the org.freedesktop.portal.Device that's supposed to be used for granting usb drive permission?

I'm having trouble finding the gtk API for that.  If anyone can point me to the reference, that'll be much appreciated.

Many many thanks again.

Winnie

________________________________
From: Flatpak <flatpak-bounces at lists.freedesktop.org<mailto:flatpak-bounces at lists.freedesktop.org>> on behalf of Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>>
Sent: November 22, 2019 12:33 PM
To: Matthias Clasen <mclasen at redhat.com<mailto:mclasen at redhat.com>>
Cc: Jan Grulich <jgrulich at redhat.com<mailto:jgrulich at redhat.com>>; Flatpak List <flatpak at lists.freedesktop.org<mailto:flatpak at lists.freedesktop.org>>; Jorge GarcĂ­a <jgarciao at gmail.com<mailto:jgarciao at gmail.com>>
Subject: Re: flatpak portal example on github

Hi Matthias et al.,

Thanks for all the prompt responses.  I understand what's going on now and it's working the way i want. :)

Thanks again, you guys are awesome!

Regards,
Winnie

________________________________


_______________________________________________
Flatpak mailing list
Flatpak at lists.freedesktop.org<mailto:Flatpak at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/flatpak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20191126/1f874d9c/attachment-0001.html>


More information about the Flatpak mailing list