flatpak portal example on github

Winnie Poon winniepoon_home at hotmail.com
Tue Nov 26 06:31:02 UTC 2019


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/fbbf3588/attachment.html>


More information about the Flatpak mailing list