Expand description
Spawn commands outside the sandbox or monitor if the running application has received an update & install it.
§Examples
Spawn a process inside of the sandbox, only works in a Flatpak.
use std::{collections::HashMap, os::fd::BorrowedFd};
use ashpd::flatpak::{Flatpak, SpawnFlags, SpawnOptions};
async fn run() -> ashpd::Result<()> {
let proxy = Flatpak::new().await?;
let fds: HashMap<_, BorrowedFd<'_>> = HashMap::new();
proxy
.spawn(
"/",
&["contrast"],
fds,
HashMap::new(),
SpawnFlags::ClearEnv | SpawnFlags::NoNetwork,
SpawnOptions::default(),
)
.await?;
Ok(())
}
Structs§
- Development
- The Development interface lets any client, possibly in a sandbox if it has access to the session helper, spawn a process on the host, outside any sandbox.
- Flatpak
- The interface exposes some interactions with Flatpak on the host to the sandbox. For example, it allows you to restart the applications or start a more sandboxed instance.
- Spawn
Options - Specified options for a
Flatpak::spawn
request. - Update
Info - A response containing the update information when an update is available.
- Update
Monitor - The interface exposes some interactions with Flatpak on the host to the sandbox. For example, it allows you to restart the applications or start a more sandboxed instance.
- Update
Progress - A response of the update progress signal.
Enums§
- Host
Command Flags - Flags affecting the running of commands on the host
- Sandbox
Flags - A bitmask representing the “permissions” of a newly created sandbox.
- Spawn
Flags - Flags affecting the created sandbox.
- Supports
Flags - Flags marking what optional features are available.
- Update
Status - The update status.