Hello, I hope this is a right place to ask flatpak development related questions. I have a few.
-
How can I get read access to
/run/user/$UID/doc/<??>
? Note that I am selecting a file from FilechooserNative Widget. Under flatpak user’s files are mounted under such directory pattern.
For example the file~/Downloads/pop-os_19.10_amd64_intel_8.iso
gets read as/run/user/1000/doc/795be888/pop-os_19.10_amd64_intel_8.iso
under flatpak build. But whenever I try opening the file, my program crashes because it can’t see the file. Even though I am selecting the file from a FilechooserNative widget. -
How can I get write access to block devices such as
/dev/sdx
?
My manifests file:
id: com.gitlab.adnan338.Nixwriter
runtime: org.gnome.Platform
runtime-version: "3.36"
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
command: nixwriter
finish-args:
- --socket=fallback-x11
- --share=ipc
- --filesystem=host
- --device=all
# I need to use udisks2 to get information about removable media
- --system-talk-name=org.freedesktop.UDisks2
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
build-args:
- --share=network
modules:
- name: nixwriter
sources:
- type: dir
path: "."
buildsystem: simple
build-commands:
- cargo build --release
- install -D target/release/nixwriter /app/bin/nixwriter
To anyone who might be reading it, launching the flatpak app with sudo fixes this problem. I now have to figure out how to start a flatpak app with root privileges.