You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flatpak module currently doesn't seem very nice to work with; ideally it would more closely look like the flatpak-spawn command, and (imo) wouldn't look as "ugly".
Here's a quick draft of what the ideal struct for it would be like, this 100% needs tweaking in order to work with the Flatpak portal, and work "properly":
use std::os::fd::RawFd;use std::fs::File;#[derive(Debug)]structEnvVar{var:String,val:String,}/// A (more or less) 1:1 copy of the flatpak-spawn command, as a struct#[derive(Default,Debug)]structFlatpakSpawn{/// Enable debug outputverbose:bool,/// Forward file descriptor(s)forward_fd:Vec<RawFd>,/// Run with clean environmentclear_env:bool,/// Make the spawned command exit if we dowatch_bus:bool,/// Expose sandbox PIDs in calling sandboxexpose_pids:bool,/// Use the same PID namespace as calling sandboxshare_pids:bool,/// Set environment variable(s)env:Vec<EnvVar>,// Unset environment variable(s)// Remember to only pass through the variable name, not the contents!// TODO// unset-env: Vec<String>// TODO: env-fd/// Run with the latest vesion of the app and runtimelatest_version:bool,/// Run sandboxed, without inheriting permissions./// See the --sandbox argument in https://man7.org/linux/man-pages/man1/flatpak-run.1.html /// for more information.sandbox:bool,/// Whether to run with network accessno_network:bool,/// Expose read-write access to the files/directoriessandbox-expose-rw:Vec<File>,/// Expose read-only access to the files/directoriessandbox-expose-ro:Vec<File>,// TODO: sandbox-flag// NOT PLANNED: host (use a separate struct, ideally closer to Command)/// Working directory in which to run the commanddirectory:File,// Replace runtime's /app with DIR, or empty// TODO// app-path/// Replace runtime's /usr with DIRusr-path:File,}
The text was updated successfully, but these errors were encountered:
orowith2os
changed the title
Make the flatpak portal nicer to work with
Make the flatpak(-spawn) portal nicer to work with
Aug 1, 2023
The flatpak module currently doesn't seem very nice to work with; ideally it would more closely look like the flatpak-spawn command, and (imo) wouldn't look as "ugly".
Here's a quick draft of what the ideal struct for it would be like, this 100% needs tweaking in order to work with the Flatpak portal, and work "properly":
The text was updated successfully, but these errors were encountered: