running_under_sandbox


Description:

public static bool running_under_sandbox ()

This function tries to determine if the current process is running under a sandbox that requires the use of portals.

If you need to check error conditions see [func@Portal.running_under_snap].

Note that these functions are all cached and will always return the same result.

Returns:

true if the current process should use portals to access resources on the host system, or false if either an error was encountered or the process is running unsandboxed