System information

System information — Cached information about the system

Functions

SrtSystemInfo * srt_system_info_new ()
SrtSystemInfo * srt_system_info_new_from_json ()
gboolean srt_system_info_can_run ()
SrtContainerInfo * srt_system_info_check_container ()
SrtContainerType srt_system_info_get_container_type ()
gchar * srt_system_info_dup_container_host_directory ()
SrtVirtualizationInfo * srt_system_info_check_virtualization ()
gboolean srt_system_info_can_write_to_uinput ()
SrtLibraryIssues srt_system_info_check_libraries ()
SrtLibraryIssues srt_system_info_check_library ()
SrtGraphicsIssues srt_system_info_check_graphics ()
GList * srt_system_info_check_all_graphics ()
GList * srt_system_info_list_egl_icds ()
GList * srt_system_info_list_egl_external_platforms ()
GList * srt_system_info_list_vulkan_icds ()
GList * srt_system_info_list_explicit_vulkan_layers ()
GList * srt_system_info_list_implicit_vulkan_layers ()
GList * srt_system_info_list_dri_drivers ()
GList * srt_system_info_list_va_api_drivers ()
GList * srt_system_info_list_vdpau_drivers ()
GList * srt_system_info_list_glx_icds ()
void srt_system_info_set_environ ()
void srt_system_info_set_sysroot ()
void srt_system_info_set_helpers_path ()
const char * srt_system_info_get_primary_multiarch_tuple ()
void srt_system_info_set_primary_multiarch_tuple ()
void srt_system_info_set_multiarch_tuples ()
GStrv srt_system_info_dup_multiarch_tuples ()
void srt_system_info_set_test_flags ()
void srt_system_info_set_expected_runtime_version ()
gchar * srt_system_info_dup_expected_runtime_version ()
SrtRuntimeIssues srt_system_info_get_runtime_issues ()
gchar * srt_system_info_dup_runtime_path ()
gchar * srt_system_info_dup_runtime_version ()
SrtSteamIssues srt_system_info_get_steam_issues ()
SrtSteam * srt_system_info_get_steam_details ()
gchar * srt_system_info_dup_steam_installation_path ()
gchar * srt_system_info_dup_steam_data_path ()
gchar * srt_system_info_dup_steam_bin32_path ()
gchar ** srt_system_info_list_pressure_vessel_overrides ()
gchar ** srt_system_info_list_pinned_libs_32 ()
gchar ** srt_system_info_list_pinned_libs_64 ()
SrtLocaleIssues srt_system_info_get_locale_issues ()
SrtLocale * srt_system_info_check_locale ()
gchar * srt_system_info_dup_os_build_id ()
gchar * srt_system_info_dup_os_id ()
gchar ** srt_system_info_dup_os_id_like ()
gchar * srt_system_info_dup_os_name ()
gchar * srt_system_info_dup_os_pretty_name ()
gchar * srt_system_info_dup_os_variant ()
gchar * srt_system_info_dup_os_variant_id ()
gchar * srt_system_info_dup_os_version_codename ()
gchar * srt_system_info_dup_os_version_id ()
gchar ** srt_system_info_list_driver_environment ()
GList * srt_system_info_list_desktop_entries ()
SrtX86FeatureFlags srt_system_info_get_x86_features ()
SrtX86FeatureFlags srt_system_info_get_known_x86_features ()
gchar * srt_system_info_dup_steamscript_path ()
gchar * srt_system_info_dup_steamscript_version ()
GList * srt_system_info_list_xdg_portal_backends ()
GList * srt_system_info_list_xdg_portal_interfaces ()
SrtXdgPortalIssues srt_system_info_get_xdg_portal_issues ()
gboolean srt_system_info_check_runtime_linker ()
gchar * srt_system_info_dup_libdl_lib ()
gchar * srt_system_info_dup_libdl_platform ()

Properties

gchar * expectations Read / Write / Construct Only

Types and Values

Object Hierarchy

    GFlags
    ├── SrtDriverFlags
    ╰── SrtTestFlags
    GObject
    ╰── SrtSystemInfo

Includes

#include <steam-runtime-tools/steam-runtime-tools.h>

Description

SrtSystemInfo is an opaque object representing information about the system. Information is retrieved "lazily"; when it has been retrieved, it is cached until the SrtSystemInfo is destroyed.

This is a reference-counted object: use g_object_ref() and g_object_unref() to manage its lifecycle.

The SrtSystemInfo object is not thread-aware. It should be considered to be "owned" by the thread that created it. Only the thread that "owns" the SrtSystemInfo may call its methods. Other threads may create their own parallel SrtSystemInfo object and use that instead, if desired.

The majority of the SrtSystemInfo API involves child processes, and requires SIGCHLD to be handled (somehow) by the host process: SIGCHLD must not have been ignored (by sigaction(2) with SIG_IGN) or blocked (for example with sigprocmask(2)) in the thread that is acting on the SrtSystemInfo. If this cannot be guaranteed, please run steam-runtime-system-info(1) as a child process and inspect its JSON output instead of calling library functions directly.

Ownership can be transferred to other threads by an operation that implies a memory barrier, such as g_atomic_pointer_set() or g_object_ref(), but after this is done the previous owner must not continue to call methods.

Functions

srt_system_info_new ()

SrtSystemInfo *
srt_system_info_new (const char *expectations);

Return a new SrtSystemInfo.

The expectations directory should contain a subdirectory for each supported CPU architecture, named for the multiarch tuple as printed by gcc -print-multiarch in the Steam Runtime (in practice this means SRT_ABI_I386 or SRT_ABI_X86_64).

The per-architecture directories may contain files whose names end with .symbols. Those files are interpreted as describing libraries that the runtime environment should support, in deb-symbols(5) format.

Parameters

expectations

Path to a directory containing details of the state that the system is expected to have.

[nullable][type filename]

Returns

A new SrtSystemInfo. Free with g_object_unref().

[transfer full]


srt_system_info_new_from_json ()

SrtSystemInfo *
srt_system_info_new_from_json (const char *path,
                               GError **error);

Return a new SrtSystemInfo with the info parsed from an existing JSON report. The SrtSystemInfo will be immutable: whatever information was in the JSON report, that will be the only information that is available.

Parameters

path

Path to a JSON report.

[not nullable][type filename]

error

Used to raise an error on failure

 

Returns

A new SrtSystemInfo. Free with g_object_unref().

[transfer full]


srt_system_info_can_run ()

gboolean
srt_system_info_can_run (SrtSystemInfo *self,
                         const char *multiarch_tuple);

Check whether an executable for the given ABI can be run.

For this check (and all similar checks) to work as intended, the contents of the libsteam-runtime-tools-0-helpers:i386 package must be available in the same directory hierarchy as the libsteam-runtime-tools-0 shared library, something like this:

1
2
3
4
5
6
7
8
any directory/
     lib/
         x86_64-linux-gnu/
             libsteam-runtime-tools-0.so.0
     libexec/
         steam-runtime-tools-0/
             i386-linux-gnu-*
             x86_64-linux-gnu-*

Parameters

self

A SrtSystemInfo object

 

multiarch_tuple

A multiarch tuple defining an ABI, as printed by gcc -print-multiarch in the Steam Runtime

 

Returns

TRUE if executables belonging to multiarch_tuple can be run


srt_system_info_check_container ()

SrtContainerInfo *
srt_system_info_check_container (SrtSystemInfo *self);

Gather and return information about the container that is currently in use.

Parameters

self

The SrtSystemInfo object

 

Returns

An SrtContainerInfo object. Free with g_object_unref().

[transfer full]


srt_system_info_get_container_type ()

SrtContainerType
srt_system_info_get_container_type (SrtSystemInfo *self);

If the program appears to be running in a container, return what sort of container it is.

Parameters

self

The SrtSystemInfo object

 

Returns

A recognised container type, or SRT_CONTAINER_TYPE_NONE if a container cannot be detected, or SRT_CONTAINER_TYPE_UNKNOWN if unsure.


srt_system_info_dup_container_host_directory ()

gchar *
srt_system_info_dup_container_host_directory
                               (SrtSystemInfo *self);

If the program appears to be running in a container, return the directory where host files can be found. For example, if this function returns /run/host, it might be possible to load the host system's /usr/lib/os-release by reading /run/host/usr/lib/os-release.

The returned directory is usually not complete. For example, in a Flatpak app, /run/host will sometimes contain the host system's /etc and /usr, but only if suitable permissions flags are set.

Parameters

self

The SrtSystemInfo object

 

Returns

A path from which at least some host-system files can be loaded, typically /run/host, or NULL if unknown or unavailable


srt_system_info_check_virtualization ()

SrtVirtualizationInfo *
srt_system_info_check_virtualization (SrtSystemInfo *self);

Gather and return information about the virtualization, emulation or hypervisor in use.

Parameters

self

The SrtSystemInfo object

 

Returns

An SrtVirtualizationInfo object. Free with g_object_unref().

[transfer full]


srt_system_info_can_write_to_uinput ()

gboolean
srt_system_info_can_write_to_uinput (SrtSystemInfo *self);

Return TRUE if the current user can write to /dev/uinput. This is required for the Steam client to be able to emulate gamepads, keyboards, mice and other input devices based on input from the Steam Controller or a remote streaming client.

Parameters

self

a SrtSystemInfo object

 

Returns

TRUE if /dev/uinput can be opened for writing


srt_system_info_check_libraries ()

SrtLibraryIssues
srt_system_info_check_libraries (SrtSystemInfo *self,
                                 const gchar *multiarch_tuple,
                                 GList **libraries_out);

Check if the running system has all the expected libraries, and related symbols, as listed in the deb-symbols(5) files *.symbols in the multiarch subdirectory of “expectations”.

Parameters

self

The SrtSystemInfo object to use.

 

multiarch_tuple

A multiarch tuple like SRT_ABI_I386, representing an ABI.

 

libraries_out

Used to return a GList object where every element of said list is an SrtLibrary object, representing every SONAME found from the expectations folder. Free with g_list_free_full(libraries, g_object_unref).

[out][optional][element-type SrtLibrary][transfer full]

Returns

A bitfield containing problems, or SRT_LIBRARY_ISSUES_NONE if no problems were found.


srt_system_info_check_library ()

SrtLibraryIssues
srt_system_info_check_library (SrtSystemInfo *self,
                               const gchar *multiarch_tuple,
                               const gchar *requested_name,
                               SrtLibrary **more_details_out);

Check if requested_name is available in the running system and whether it conforms to the deb-symbols(5) files *.symbols in the multiarch subdirectory of “expectations”.

Parameters

self

The SrtSystemInfo object to use.

 

multiarch_tuple

A multiarch tuple like SRT_ABI_I386, representing an ABI.

 

requested_name

The SONAME of a shared library, for example libjpeg.so.62.

[type filename]

more_details_out

Used to return an SrtLibrary object representing the shared library provided by requested_name . Free with g_object_unref().

[out][optional][transfer full]

Returns

A bitfield containing problems, or SRT_LIBRARY_ISSUES_NONE if no problems were found.


srt_system_info_check_graphics ()

SrtGraphicsIssues
srt_system_info_check_graphics (SrtSystemInfo *self,
                                const char *multiarch_tuple,
                                SrtWindowSystem window_system,
                                SrtRenderingInterface rendering_interface,
                                SrtGraphics **details_out);

Parameters

self

The SrtSystemInfo object to use.

 

multiarch_tuple

A multiarch tuple like SRT_ABI_I386, representing an ABI.

 

window_system

The window system to check.

 

rendering_interface

The graphics renderng interface to check.

 

details_out

Used to return an SrtGraphics object representing the items tested and results. Free with g_object_unref().

[out][optional][transfer full]

Returns

A bitfield containing problems, or SRT_GRAPHICS_ISSUES_NONE if no problems were found.


srt_system_info_check_all_graphics ()

GList *
srt_system_info_check_all_graphics (SrtSystemInfo *self,
                                    const char *multiarch_tuple);

Check whether various combinations of rendering interface and windowing system are available. The specific combinations of rendering interface and windowing system that are returned are not guaranteed, but will include at least SRT_RENDERING_INTERFACE_GL on SRT_WINDOW_SYSTEM_GLX. Additional combinations will be added in future versions of this library.

Parameters

self

The SrtSystemInfo object to use.

 

multiarch_tuple

A multiarch tuple like SRT_ABI_I386, representing an ABI.

 

Returns

A list of SrtGraphics objects representing the items tested and results. Free with 'g_list_free_full(list, g_object_unref)`.

[transfer full][type SrtGraphics]


srt_system_info_list_egl_icds ()

GList *
srt_system_info_list_egl_icds (SrtSystemInfo *self,
                               const char * const *multiarch_tuples);

List the available EGL ICDs, using the same search paths as GLVND.

This function is not architecture-specific and may return a mixture of ICDs for more than one architecture or ABI, because the way the GLVND EGL loader works is to read a single search path for metadata describing ICDs, then filter out the ones that are for the wrong architecture at load time.

Some of the entries in the result might describe a bare SONAME in the standard library search path, which might exist for any or all architectures simultaneously (this is the most common approach for EGL). Other entries might describe the relative or absolute path to a specific library, which will only be usable for the architecture for which it was compiled.

Duplicated EGL ICDs are searched by their absolute path, obtained using "inspect-library" in multiarch_tuples , or srt_system_info_dup_multiarch_tuples() if NULL. Also, if running in a Flatpak environment, the multiarch tuples are used to march the search paths used by the freedesktop.org runtime's patched GLVND.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuples

Force the usage of the provided multiarch tuples like SRT_ABI_I386, representing ABIs. If NULL, the multiarch list stored in self will be used instead.

[nullable][array zero-terminated=1][element-type utf8]

Returns

A list of opaque SrtEglIcd objects. Free with g_list_free_full(icds, srt_egl_icd_unref).

[transfer full][element-type SrtEglIcd]


srt_system_info_list_egl_external_platforms ()

GList *
srt_system_info_list_egl_external_platforms
                               (SrtSystemInfo *self,
                                const char * const *multiarch_tuples);

List the available EGL external platform modules, using the same search paths as the NVIDIA proprietary driver libEGL_nvidia.so.0.

This function is not architecture-specific and may return a mixture of modules for more than one architecture or ABI, because the way this loader appears to work is to read a single search path for metadata describing modules, then filter out the ones that are for the wrong architecture at load time.

Some of the entries in the result might describe a bare SONAME in the standard library search path, which might exist for any or all architectures simultaneously (this is the most common approach for EGL). Other entries might describe the relative or absolute path to a specific library, which will only be usable for the architecture for which it was compiled.

Duplicated modules are searched by their absolute path, obtained using "inspect-library" in multiarch_tuples , or srt_system_info_dup_multiarch_tuples() if NULL.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuples

Force the usage of the provided multiarch tuples like SRT_ABI_I386, representing ABIs. If NULL, the multiarch list stored in self will be used instead.

[nullable][array zero-terminated=1][element-type utf8]

Returns

A list of opaque SrtEglExternalPlatform objects. Free with g_list_free_full(list, srt_egl_icd_unref).

[transfer full][element-type SrtEglExternalPlatform]


srt_system_info_list_vulkan_icds ()

GList *
srt_system_info_list_vulkan_icds (SrtSystemInfo *self,
                                  const char * const *multiarch_tuples);

List the available Vulkan ICDs, using the same search paths as the reference vulkan-loader.

This function is not architecture-specific and may return a mixture of ICDs for more than one architecture or ABI, because the way the reference vulkan-loader works is to read a single search path for metadata describing ICDs, then filter out the ones that are for the wrong architecture at load time.

Some of the entries in the result might describe a bare SONAME in the standard library search path, which might exist for any or all architectures simultaneously (for example, this approach is used for the NVIDIA binary driver on Debian systems). Other entries might describe the relative or absolute path to a specific library, which will only be usable for the architecture for which it was compiled (for example, this approach is used in Mesa).

Duplicated Vulkan ICDs are searched by their absolute path, obtained using "inspect-library" in multiarch_tuples , or srt_system_info_dup_multiarch_tuples() if NULL. Also, if running in a Flatpak environment, the multiarch tuples are used to march the search paths used by the freedesktop.org runtime's patched vulkan-loader.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuples

Force the usage of the provided multiarch tuples like SRT_ABI_I386, representing ABIs. If NULL, the multiarch list stored in self will be used instead.

[nullable][array zero-terminated=1][element-type utf8]

Returns

A list of opaque SrtVulkanIcd objects. Free with g_list_free_full(icds, srt_vulkan_icd_unref).

[transfer full][element-type SrtVulkanIcd]


srt_system_info_list_explicit_vulkan_layers ()

GList *
srt_system_info_list_explicit_vulkan_layers
                               (SrtSystemInfo *self);

List the available explicit Vulkan layers, using the same search paths as the reference vulkan-loader.

This function is not architecture-specific and may return a mixture of layers for more than one architecture or ABI, because the way the reference vulkan-loader works is to read a single search path for metadata describing layers, then filter out the ones that are for the wrong architecture at load time.

Some of the entries in the result might describe a bare SONAME in the standard library search path, which might exist for any or all architectures simultaneously. Other entries might describe the relative or absolute path to a specific library, which will only be usable for the architecture for which it was compiled.

Duplicated Vulkan layers are searched by their absolute path, obtained using "inspect-library" in the multiarch tuples set using "srt_system_info_set_multiarch_tuples()".

Parameters

self

The SrtSystemInfo object

 

Returns

A list of opaque SrtVulkanLayer objects. Free with g_list_free_full(layers, g_object_unref).

[transfer full][element-type SrtVulkanLayer]


srt_system_info_list_implicit_vulkan_layers ()

GList *
srt_system_info_list_implicit_vulkan_layers
                               (SrtSystemInfo *self);

List the available implicit Vulkan layers, using the same search paths as the reference vulkan-loader.

This function is not architecture-specific and may return a mixture of layers for more than one architecture or ABI, because the way the reference vulkan-loader works is to read a single search path for metadata describing layers, then filter out the ones that are for the wrong architecture at load time.

Some of the entries in the result might describe a bare SONAME in the standard library search path, which might exist for any or all architectures simultaneously. Other entries might describe the relative or absolute path to a specific library, which will only be usable for the architecture for which it was compiled.

Duplicated Vulkan layers are searched by their absolute path, obtained using "inspect-library" in the multiarch tuples set using "srt_system_info_set_multiarch_tuples()".

Parameters

self

The SrtSystemInfo object

 

Returns

A list of opaque SrtVulkanLayer objects. Free with g_list_free_full(layers, g_object_unref).

[transfer full][element-type SrtVulkanLayer]


srt_system_info_list_dri_drivers ()

GList *
srt_system_info_list_dri_drivers (SrtSystemInfo *self,
                                  const char *multiarch_tuple,
                                  SrtDriverFlags flags);

List of the available Mesa DRI modules.

For the search $LIBGL_DRIVERS_PATH will be used if set. Otherwise some implementation-dependent paths will be used instead.

Note that if $LIBGL_DRIVERS_PATH is set, all drivers outside that path will be treated as "extra", and omitted from the list unless SRT_DRIVER_FLAGS_INCLUDE_ALL is used.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A Debian-style multiarch tuple such as SRT_ABI_X86_64.

[not nullable][type filename]

flags

Filter the list of DRI drivers accordingly to these flags. For example, "extra" drivers that are unlikely to be found by the Mesa DRI loader will only be included if the SRT_DRIVER_FLAGS_INCLUDE_ALL flag is set.

 

Returns

A list of opaque SrtDriDriver objects, or NULL if nothing was found. Free with g_list_free_full(list, g_object_unref).

[transfer full][element-type SrtDriDriver][nullable]


srt_system_info_list_va_api_drivers ()

GList *
srt_system_info_list_va_api_drivers (SrtSystemInfo *self,
                                     const char *multiarch_tuple,
                                     SrtDriverFlags flags);

List of the available VA-API drivers.

For the search $LIBVA_DRIVERS_PATH will be used if set. Otherwise some implementation-dependent paths will be used instead.

Note that if $LIBVA_DRIVERS_PATH is set, all drivers outside that path will be treated as "extra", and omitted from the list unless SRT_DRIVER_FLAGS_INCLUDE_ALL is used.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A Debian-style multiarch tuple such as SRT_ABI_X86_64.

[not nullable][type filename]

flags

Filter the list of VA-API drivers accordingly to these flags. For example, "extra" drivers that are unlikely to be found by the VA-API loader will only be included if the SRT_DRIVER_FLAGS_INCLUDE_ALL flag is set.

 

Returns

A list of opaque SrtVaApiDriver objects, or NULL if nothing was found. Free with g_list_free_full(list, g_object_unref).

[transfer full][element-type SrtVaApiDriver][nullable]


srt_system_info_list_vdpau_drivers ()

GList *
srt_system_info_list_vdpau_drivers (SrtSystemInfo *self,
                                    const char *multiarch_tuple,
                                    SrtDriverFlags flags);

List of the available VDPAU drivers.

For the search $VDPAU_DRIVER_PATH will be used if set. Otherwise some implementation-dependent paths will be used instead.

Note that if $VDPAU_DRIVER_PATH is set, all drivers outside that path will be treated as "extra", and omitted from the list unless SRT_DRIVER_FLAGS_INCLUDE_ALL is used.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A Debian-style multiarch tuple such as SRT_ABI_X86_64.

[not nullable][type filename]

flags

Filter the list of VDPAU drivers accordingly to these flags. For example, "extra" drivers that are unlikely to be found by the VDPAU loader will only be included if the SRT_DRIVER_FLAGS_INCLUDE_ALL flag is set.

 

Returns

A list of opaque SrtVaApiDriver objects, or NULL if nothing was found. Free with g_list_free_full(list, g_object_unref).

[transfer full][element-type SrtVaApiDriver][nullable]


srt_system_info_list_glx_icds ()

GList *
srt_system_info_list_glx_icds (SrtSystemInfo *self,
                               const char *multiarch_tuple,
                               SrtDriverFlags flags);

List the available GLX ICDs, in an unspecified order. These are the drivers used by libGL.so.1 or libGLX.so.0 if it is the loader library provided by GLVND (if this is the case, srt_graphics_library_is_vendor_neutral() for the combination of SRT_WINDOW_SYSTEM_X11 and SRT_RENDERING_INTERFACE_GL will return TRUE and indicate SRT_GRAPHICS_LIBRARY_VENDOR_GLVND).

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A Debian-style multiarch tuple such as SRT_ABI_X86_64.

[not nullable][type filename]

flags

Filter the list of GLX ICDs accordingly to these flags. At the moment no filters are available, so there are no practical differences between SRT_DRIVER_FLAGS_INCLUDE_ALL and SRT_DRIVER_FLAGS_NONE.

 

Returns

A list of opaque SrtGlxIcd objects, or NULL if nothing was found. Free with g_list_free_full(list, g_object_unref).

[transfer full][element-type SrtGlxIcd][nullable]


srt_system_info_set_environ ()

void
srt_system_info_set_environ (SrtSystemInfo *self,
                             gchar * const *env);

Use env instead of the real environment variable block environ when locating the Steam Runtime.

If env is NULL, go back to using the real environment variables.

This method is not valid to call on a SrtSystemInfo that was constructed with srt_system_info_new_from_json().

Parameters

self

The SrtSystemInfo

 

env

An array of environment variables.

[nullable][array zero-terminated=1][element-type filename][transfer none]

srt_system_info_set_sysroot ()

void
srt_system_info_set_sysroot (SrtSystemInfo *self,
                             const char *root);

Use root instead of the real root directory when investigating system properties.

If root is NULL, go back to using the real root.

This method is not valid to call on a SrtSystemInfo that was constructed with srt_system_info_new_from_json().

Parameters

self

The SrtSystemInfo

 

root

Path to the sysroot.

[nullable][type filename][transfer none]

srt_system_info_set_helpers_path ()

void
srt_system_info_set_helpers_path (SrtSystemInfo *self,
                                  const gchar *path);

Look for helper executables used to inspect the system state in path , instead of the normal installed location.

If path is NULL, go back to using the installed location.

This method is not valid to call on a SrtSystemInfo that was constructed with srt_system_info_new_from_json().

Parameters

self

The SrtSystemInfo

 

path

An absolute path.

[nullable][type filename][transfer none]

srt_system_info_get_primary_multiarch_tuple ()

const char *
srt_system_info_get_primary_multiarch_tuple
                               (SrtSystemInfo *self);

Return the multiarch tuple set by srt_system_info_set_primary_multiarch_tuple() if any, or the multiarch tuple corresponding to the steam-runtime-tools library itself.

Parameters

self

The SrtSystemInfo

 

Returns

a Debian-style multiarch tuple such as SRT_ABI_I386 or SRT_ABI_X86_64.

[type filename][transfer none]


srt_system_info_set_primary_multiarch_tuple ()

void
srt_system_info_set_primary_multiarch_tuple
                               (SrtSystemInfo *self,
                                const gchar *tuple);

Set the primary architecture that is used to find helper executables where the architecture does not matter, such as checking locales. The primary architecture is the first element from the list of ABIs, editable by srt_system_info_set_multiarch_tuples(). If the list was not NULL, the previous primary multiarch tuple will be demoted to be foreign and the new primary multiarch tuple will be moved/added to the top of the list.

If tuple is NULL, revert to the default behaviour, which is that the primary architecture is the architecture of the steam-runtime-tools library.

This method is not valid to call on a SrtSystemInfo that was constructed with srt_system_info_new_from_json().

Parameters

self

The SrtSystemInfo

 

tuple

A Debian-style multiarch tuple such as SRT_ABI_X86_64.

[nullable][type filename][transfer none]

srt_system_info_set_multiarch_tuples ()

void
srt_system_info_set_multiarch_tuples (SrtSystemInfo *self,
                                      const gchar * const *tuples);

Set the list of ABIs that will be checked by default in contexts where multiple ABIs are inspected at the same time, such as srt_system_info_list_dri_drivers(). The first one listed is assumed to be the primary architecture, and is used to find helper executables where the architecture does not matter, such as checking locales. The second and subsequent (if any) are assumed to be "foreign" architectures.

If tuples is NULL or empty, revert to the default behaviour, which is that the primary architecture is the architecture of the steam-runtime-tools library, and there are no foreign architectures.

For example, to check the x86_64 and i386 ABIs on an x86 platform or the native ABI otherwise, you might use code like this:

1
2
3
4
5
6
7
8
9
10
11
12
#ifdef __x86_64__
const char
const tuples[] = { SRT_ABI_X86_64, SRT_ABI_I386, NULL };
#elif defined(__i386__)
const char
const tuples[] = { SRT_ABI_I386, SRT_ABI_X86_64, NULL };
#else
const char
const tuples[] = { NULL };
#endif

srt_system_info_set_multiarch_tuples (info, tuples);

This method is not valid to call on a SrtSystemInfo that was constructed with srt_system_info_new_from_json().

Parameters

self

The SrtSystemInfo

 

tuples

An array of Debian-style multiarch tuples such as SRT_ABI_X86_64 terminated by a NULL entry, or NULL.

[nullable][array zero-terminated=1][element-type filename][transfer none]

srt_system_info_dup_multiarch_tuples ()

GStrv
srt_system_info_dup_multiarch_tuples (SrtSystemInfo *self);

Return the ABIs for which this object will carry out checks, in the form of multiarch tuples as printed by gcc -print-multiarch in the Steam Runtime (in practice this means SRT_ABI_I386 or SRT_ABI_X86_64).

The ABIs that are to be checked can be set with srt_system_info_set_multiarch_tuples().

Parameters

self

the system information object

 

Returns

The ABIs used for various checks. Free with g_strfreev().

[array zero-terminated=1][transfer full]


srt_system_info_set_test_flags ()

void
srt_system_info_set_test_flags (SrtSystemInfo *self,
                                SrtTestFlags flags);

Alter the behaviour of the SrtSystemInfo to make automated tests quicker or give better test coverage.

This function should not be called in production code.

Parameters

self

The SrtSystemInfo

 

flags

Flags altering behaviour, for use in automated tests

 

srt_system_info_set_expected_runtime_version ()

void
srt_system_info_set_expected_runtime_version
                               (SrtSystemInfo *self,
                                const char *version);

Set the expected version number of the Steam Runtime. Invalidate any cached information about the Steam Runtime if it differs from the previous expectation.

Parameters

self

The SrtSystemInfo object

 

version

The expected version number, such as 0.20190711.3, or NULL if there is no particular expectation.

[nullable]

srt_system_info_dup_expected_runtime_version ()

gchar *
srt_system_info_dup_expected_runtime_version
                               (SrtSystemInfo *self);

Parameters

self

The SrtSystemInfo object

 

Returns

The expected version number of the Steam Runtime, or NULL if no particular version is expected. Free with g_free().

[transfer full][type utf8]


srt_system_info_get_runtime_issues ()

SrtRuntimeIssues
srt_system_info_get_runtime_issues (SrtSystemInfo *self);

Detect and return any problems encountered with the Steam Runtime.

Parameters

self

The SrtSystemInfo object

 

Returns

Any problems detected with the Steam Runtime, or SRT_RUNTIME_ISSUES_NONE if no problems were detected


srt_system_info_dup_runtime_path ()

gchar *
srt_system_info_dup_runtime_path (SrtSystemInfo *self);

Return the absolute path to the Steam Runtime in use.

For the LD_LIBRARY_PATH-based Steam Runtime, this is the directory containing run.sh, version.txt and similar files.

If running in a Steam Runtime container or chroot, this function returns / to indicate that the entire container is the Steam Runtime.

This will typically be below srt_system_info_dup_steam_installation_path(), unless overridden.

If the Steam Runtime has been disabled or could not be found, at least one flag will be set in the result of srt_system_info_get_runtime_issues() to indicate why.

Parameters

self

The SrtSystemInfo object

 

Returns

The absolute path to the Steam Runtime, or NULL if it could not be determined. Free with g_free().

[transfer full][type filename][nullable]


srt_system_info_dup_runtime_version ()

gchar *
srt_system_info_dup_runtime_version (SrtSystemInfo *self);

Return the version number of the Steam Runtime in use, for example 0.20190711.3, or NULL if it could not be determined. This could either be the LD_LIBRARY_PATH-based Steam Runtime, or a Steam Runtime container or chroot.

If the Steam Runtime has been disabled or could not be found, or its version number could not be read, then at least one flag will be set in the result of srt_system_info_get_runtime_issues() to indicate why.

Parameters

self

The SrtSystemInfo object

 

Returns

The version number of the Steam Runtime, or NULL if it could not be determined. Free with g_free().

[transfer full][type utf8][nullable]


srt_system_info_get_steam_issues ()

SrtSteamIssues
srt_system_info_get_steam_issues (SrtSystemInfo *self);

Detect and return any problems encountered with the Steam installation.

Parameters

self

The SrtSystemInfo object

 

Returns

Any problems detected with the Steam installation, or SRT_STEAM_ISSUES_NONE if no problems were detected


srt_system_info_get_steam_details ()

SrtSteam *
srt_system_info_get_steam_details (SrtSystemInfo *self);

Gather and return information about the Steam installation.

Parameters

self

The SrtSystemInfo object

 

Returns

An SrtSteam object. Free with g_object_unref().

[transfer full]


srt_system_info_dup_steam_installation_path ()

gchar *
srt_system_info_dup_steam_installation_path
                               (SrtSystemInfo *self);

Return the absolute path to the Steam installation in use (the directory containing steam.sh and ubuntu12_32/ among other files and directories).

This directory is analogous to C:\Program Files\Steam in a typical Windows installation of Steam, and is typically of the form /home/me/.local/share/Steam. It is also known as the "Steam root", and is canonically accessed via the symbolic link ~/.steam/root (known as the "Steam root link").

Under normal circumstances, this is the same directory as srt_system_info_dup_steam_data_path(). However, it is possible to construct situations where they are different, for example when a Steam developer tests a new client build in its own installation directory in conjunction with an existing data directory from the production client, or when Steam was first installed using a Debian package that suffered from 916303 (which resulted in ~/.steam/steam being a plain directory, not a symbolic link).

If the Steam installation could not be found, flags will be set in the result of srt_system_info_get_steam_issues() to indicate why: at least SRT_STEAM_ISSUES_CANNOT_FIND, and possibly others.

Parameters

self

The SrtSystemInfo object

 

Returns

The absolute path to the Steam installation, or NULL if it could not be determined. Free with g_free().

[transfer full][type filename][nullable]


srt_system_info_dup_steam_data_path ()

gchar *
srt_system_info_dup_steam_data_path (SrtSystemInfo *self);

Return the absolute path to the Steam data directory in use (the directory containing appcache/, userdata/ and the default steamapps/ or SteamApps/ installation path for games, among other files and directories).

This directory is analogous to C:\Program Files\Steam in a typical Windows installation of Steam, and is typically of the form /home/me/.local/share/Steam. It is canonically accessed via the symbolic link ~/.steam/steam (known as the "Steam data link").

Under normal circumstances, this is the same directory as srt_system_info_dup_steam_installation_path(). However, it is possible to construct situations where they are different, for example when a Steam developer tests a new client build in its own installation directory in conjunction with an existing data directory from the production client, or when Steam was first installed using a Debian package that suffered from 916303 (which resulted in ~/.steam/steam being a plain directory, not a symbolic link).

If the Steam data could not be found, flags will be set in the result of srt_system_info_get_steam_issues() to indicate why: at least SRT_STEAM_ISSUES_CANNOT_FIND_DATA, and possibly others.

Parameters

self

The SrtSystemInfo object

 

Returns

The absolute path to the Steam installation, or NULL if it could not be determined. Free with g_free().

[transfer full][type filename][nullable]


srt_system_info_dup_steam_bin32_path ()

gchar *
srt_system_info_dup_steam_bin32_path (SrtSystemInfo *self);

Return the absolute path to the Steam ubuntu12_32 directory in use (the directory containing steam-runtime/ among other files and directories).

Under normal circumstances, this is a ubuntu12_32 direct subdirectory under the srt_system_info_dup_steam_installation_path(). Typically of the form /home/me/.local/share/Steam/ubuntu12_32. It is canonically accessed via the symbolic link ~/.steam/bin32.

Parameters

self

The SrtSystemInfo object

 

Returns

The absolute path to the Steam ubuntu12_32 directory, or NULL if it could not be determined. Free with g_free().

[transfer full][type filename][nullable]


srt_system_info_list_pressure_vessel_overrides ()

gchar **
srt_system_info_list_pressure_vessel_overrides
                               (SrtSystemInfo *self,
                                gchar ***messages);

If running in a Steam Runtime container using pressure-vessel, list the libraries from the container that have been overridden with libraries from the host system.

The output is intended to be human-readable debugging information, rather than something to use programmatically, and its format is not guaranteed.

Similarly, messages is intended to be human-readable debugging information.

Parameters

self

The SrtSystemInfo object

 

messages

If not NULL, used to return a NULL-terminated array of diagnostic messages. Free with g_strfreev().

[optional][out][array zero-terminated=1][transfer full]

Returns

A NULL-terminated array of libraries that have been overridden, or NULL if this process does not appear to be in a pressure-vessel container. Free with g_strfreev().

[array zero-terminated=1][transfer full][nullable]


srt_system_info_list_pinned_libs_32 ()

gchar **
srt_system_info_list_pinned_libs_32 (SrtSystemInfo *self,
                                     gchar ***messages);

If running in an LD_LIBRARY_PATH-based Steam Runtime, return information about SRT_ABI_I386 libraries that have been "pinned". Normally, the Steam Runtime infrastructure prefers to use shared libraries from the host OS, if available, rather than the library of the same SONAME from the Steam Runtime. However, if a library in the Steam Runtime is newer then the version in the host OS, or if it is known to be incompatible with newer libraries with the same SONAME, then the library from the Steam Runtime is said to have been "pinned": it is used with a higher precedence than libraries from the host OS.

If not in an LD_LIBRARY_PATH-based Steam Runtime, return NULL.

The output is intended to be human-readable debugging information, rather than something to use programmatically, and its format is not guaranteed.

Similarly, messages is intended to be human-readable debugging information.

Parameters

self

The SrtSystemInfo object

 

messages

If not NULL, used to return a NULL-terminated array of diagnostic messages. Free with g_strfreev().

[optional][out][array zero-terminated=1][transfer full]

Returns

An array of strings, or NULL if not in an LD_LIBRARY_PATH-based Steam Runtime or if it was not possible to list the pinned libs. Free with g_strfreev().

[array zero-terminated=1][transfer full][element-type utf8][nullable]


srt_system_info_list_pinned_libs_64 ()

gchar **
srt_system_info_list_pinned_libs_64 (SrtSystemInfo *self,
                                     gchar ***messages);

If running in an LD_LIBRARY_PATH-based Steam Runtime, return information about SRT_ABI_X86_64 libraries that have been "pinned". Normally, the Steam Runtime infrastructure prefers to use shared libraries from the host OS, if available, rather than the library of the same SONAME from the Steam Runtime. However, if a library in the Steam Runtime is newer then the version in the host OS, or if it is known to be incompatible with newer libraries with the same SONAME, then the library from the Steam Runtime is said to have been "pinned": it is used with a higher precedence than libraries from the host OS.

If not in an LD_LIBRARY_PATH-based Steam Runtime, return NULL.

The output is intended to be human-readable debugging information, rather than something to use programmatically, and its format is not guaranteed.

Similarly, messages is intended to be human-readable debugging information.

Parameters

self

The SrtSystemInfo object

 

messages

If not NULL, used to return a NULL-terminated array of diagnostic messages. Free with g_strfreev().

[optional][out][array zero-terminated=1][transfer full]

Returns

An array of strings, or NULL if not in an LD_LIBRARY_PATH-based Steam Runtime or if it was not possible to list the pinned libs. Free with g_strfreev().

[array zero-terminated=1][transfer full][element-type utf8][nullable]


srt_system_info_get_locale_issues ()

SrtLocaleIssues
srt_system_info_get_locale_issues (SrtSystemInfo *self);

Check that the locale specified by environment variables, and some other commonly-assumed locales, are available and suitable.

Parameters

self

The SrtSystemInfo

 

Returns

A summary of issues found, or SRT_LOCALE_ISSUES_NONE if no problems are detected


srt_system_info_check_locale ()

SrtLocale *
srt_system_info_check_locale (SrtSystemInfo *self,
                              const char *requested_name,
                              GError **error);

Check whether the given locale can be set successfully.

Parameters

self

The SrtSystemInfo

 

requested_name

The locale to request, for example en_US.UTF-8. This may be the empty string or NULL to request the empty string as a locale, which uses environment variables like $LC_ALL.

 

error

Used to return an error on failure

 

Returns

A SrtLocale object, or NULL if the requested locale could not be set. Free with g_object_unref() if non-NULL.

[transfer full][nullable]


srt_system_info_dup_os_build_id ()

gchar *
srt_system_info_dup_os_build_id (SrtSystemInfo *self);

Return a machine-readable identifier for the system image used as the origin for a distribution, for example 0.20190925.0. If called from inside a Steam Runtime container, return the Steam Runtime build ID, which currently looks like 0.20190925.0.

In operating systems that do not use image-based installation, such as Debian, this will be NULL.

This is the BUILD_ID from os-release(5).

Parameters

self

The SrtSystemInfo object

 

Returns

The build ID, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_id ()

gchar *
srt_system_info_dup_os_id (SrtSystemInfo *self);

Return a lower-case machine-readable operating system identifier, for example debian or arch. If called from inside a Steam Runtime container, return steamrt.

This is the ID in os-release(5). If os-release(5) is not available, future versions of this library might derive a similar ID from lsb_release(1).

Parameters

self

The SrtSystemInfo object

 

Returns

The OS ID, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_id_like ()

gchar **
srt_system_info_dup_os_id_like (SrtSystemInfo *self,
                                gboolean include_self);

Return an array of lower-case machine-readable operating system identifiers similar to srt_system_info_dup_os_id() describing OSs that this one resembles or is derived from.

For example, the Steam Runtime 1 'scout' is derived from Ubuntu, which is itself derived from Debian, so srt_system_info_dup_os_id_like() would return { "debian", "ubuntu", NULL } if include_self is false, { "steamrt", "debian", "ubuntu", NULL } otherwise.

This is the ID_LIKE field from os-release(5), possibly combined with the ID field.

Parameters

self

The SrtSystemInfo object

 

include_self

If TRUE, include srt_system_info_dup_os_id() in the returned array (if known)

 

Returns

An array of OS IDs, or NULL if nothing is known. Free with g_strfreev().

[array zero-terminated=1][transfer full][element-type utf8][nullable]


srt_system_info_dup_os_name ()

gchar *
srt_system_info_dup_os_name (SrtSystemInfo *self);

Return a human-readable identifier for the operating system without its version, for example Debian GNU/Linux or Arch Linux.

This is the NAME in os-release(5). If os-release(5) is not available, future versions of this library might derive a similar name from lsb_release(1).

Parameters

self

The SrtSystemInfo object

 

Returns

The name, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_pretty_name ()

gchar *
srt_system_info_dup_os_pretty_name (SrtSystemInfo *self);

Return a human-readable identifier for the operating system, including its version if any, for example Debian GNU/Linux 10 (buster) or Arch Linux.

If the OS uses rolling releases, this will probably be the same as or similar to srt_system_info_dup_os_name().

This is the PRETTY_NAME in os-release(5). If os-release(5) is not available, future versions of this library might derive a similar name from lsb_release(1).

Parameters

self

The SrtSystemInfo object

 

Returns

The name, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_variant ()

gchar *
srt_system_info_dup_os_variant (SrtSystemInfo *self);

Return a human-readable identifier for the operating system variant, for example Workstation Edition, Server Edition or Raspberry Pi Edition. In operating systems that do not have formal variants this will usually be NULL.

This is the VARIANT in os-release(5).

Parameters

self

The SrtSystemInfo object

 

Returns

The name, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_variant_id ()

gchar *
srt_system_info_dup_os_variant_id (SrtSystemInfo *self);

Return a lower-case machine-readable identifier for the operating system variant in a form suitable for use in filenames, for example workstation, server or rpi. In operating systems that do not have formal variants this will usually be NULL.

This is the VARIANT_ID in os-release(5).

Parameters

self

The SrtSystemInfo object

 

Returns

The variant ID, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_version_codename ()

gchar *
srt_system_info_dup_os_version_codename
                               (SrtSystemInfo *self);

Return a lower-case machine-readable identifier for the operating system version codename, for example buster for Debian 10 "buster". In operating systems that do not use codenames in machine-readable contexts, this will usually be NULL.

This is the VERSION_CODENAME in os-release(5). If os-release(5) is not available, future versions of this library might derive a similar codename from lsb_release(1).

Parameters

self

The SrtSystemInfo object

 

Returns

The codename, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_dup_os_version_id ()

gchar *
srt_system_info_dup_os_version_id (SrtSystemInfo *self);

Return a machine-readable identifier for the operating system version, for example 10 for Debian 10 "buster". In operating systems that only have rolling releases, such as Arch Linux, or in OS branches that behave like rolling releases, such as Debian unstable, this will usually be NULL.

This is the VERSION_ID in os-release(5). If os-release(5) is not available, future versions of this library might derive a similar identifier from lsb_release(1).

Parameters

self

The SrtSystemInfo object

 

Returns

The ID, or NULL if not known. Free with g_free().

[transfer full][type utf8]


srt_system_info_list_driver_environment ()

gchar **
srt_system_info_list_driver_environment
                               (SrtSystemInfo *self);

List of the driver-selection environment variables.

Some drivers have an environment variable that overrides the automatic detection of which driver should be used. For example Mesa has MESA_LOADER_DRIVER_OVERRIDE, VA-API has LIBVA_DRIVER_NAME and so on.

The output will contain a list, in the form "NAME=VALUE", of the well-known driver environment variables that are currently being set.

The drivers will be in lexicographic order, for example LIBVA_DRIVER_NAME=radeonsi, VDPAU_DRIVER=radeonsi, __GLX_FORCE_VENDOR_LIBRARY_0=i965, in that order.

Parameters

self

The SrtSystemInfo object

 

Returns

An array of strings, or NULL if we were unable to find driver-selection environment variables. Free with g_strfreev().

[array zero-terminated=1][transfer full][element-type utf8][nullable]


srt_system_info_list_desktop_entries ()

GList *
srt_system_info_list_desktop_entries (SrtSystemInfo *self);

List all the available desktop applications that are able to handle the type "x-scheme-handler/steam".

This function will also search for well known desktop applications ID like the Flathub com.valvesoftware.Steam.desktop and they'll be included even if they are not able to handle the steam: URI. Using srt_desktop_entry_is_steam_handler() it is possible to filter them out.

The returned list is in no particular order.

Please note that the environment variables of the current process will be used. Any possible custom environ set with srt_system_info_set_environ() will be ignored.

Parameters

self

The SrtSystemInfo object

 

Returns

A list of opaque SrtDesktopEntry objects or NULL if nothing was found. Free with g_list_free_full (entries, g_object_unref).

[transfer full][element-type SrtDesktopEntry][nullable]


srt_system_info_get_x86_features ()

SrtX86FeatureFlags
srt_system_info_get_x86_features (SrtSystemInfo *self);

Detect and return a list of x86 features that the CPU supports.

Parameters

self

The SrtSystemInfo object

 

Returns

x86 CPU supported features, or SRT_X86_FEATURE_NONE if none of the checked features are supported.


srt_system_info_get_known_x86_features ()

SrtX86FeatureFlags
srt_system_info_get_known_x86_features
                               (SrtSystemInfo *self);

Return a list of x86 CPU features that has been checked.

Parameters

self

The SrtSystemInfo object

 

Returns

x86 CPU checked features, or SRT_X86_FEATURE_NONE if no features were checked, e.g. when the CPU is not x86 based.


srt_system_info_dup_steamscript_path ()

gchar *
srt_system_info_dup_steamscript_path (SrtSystemInfo *self);

Return the absolute path to the script used to launch Steam, if known. If the application using this library was not run as a child process of the Steam client, then this will usually be NULL.

This will usually be /usr/bin/steam for the packaged Steam launcher released by Valve, /app/bin/steam for the Flatpak app, or either /usr/bin/steam or /usr/games/steam for third-party packaged versions of the Steam client.

Parameters

self

The SrtSystemInfo object

 

Returns

A filename, or NULL.

[transfer full][type filename][nullable]


srt_system_info_dup_steamscript_version ()

gchar *
srt_system_info_dup_steamscript_version
                               (SrtSystemInfo *self);

Return the version of the script used to launch Steam, if known. If the application using this library was not run as a child process of the Steam client, then this will usually be NULL.

Typical values look like 1.0.0.66 for the packaged Steam launcher released by Valve, 1.0.0.66-2/Debian for recent Debian packages, or NULL for older Debian/Ubuntu packages. Future Ubuntu packages might produce a string like 1.0.0.66-2ubuntu1/Ubuntu.

Parameters

self

The SrtSystemInfo object

 

Returns

A filename, or NULL.

[transfer full][type filename][nullable]


srt_system_info_list_xdg_portal_backends ()

GList *
srt_system_info_list_xdg_portal_backends
                               (SrtSystemInfo *self);

List the XDG portal backends that have been checked, with information about their eventual availability.

Examples of XDG portal backends are "org.freedesktop.impl.portal.desktop.gtk" and "org.freedesktop.impl.portal.desktop.kde".

The returned list is in the same arbitrary order as the check-xdg-portal helper used to return them.

Parameters

self

The SrtSystemInfo object

 

Returns

A list of opaque SrtXdgPortalBackend objects or NULL if an error occurred trying to check the backends availability or if we were unable to check them, e.g. if we are in a Flatpak environment. Free with g_list_free_full (backends, g_object_unref).

[transfer full][element-type SrtXdgPortalBackend][nullable]


srt_system_info_list_xdg_portal_interfaces ()

GList *
srt_system_info_list_xdg_portal_interfaces
                               (SrtSystemInfo *self);

List the XDG portal interfaces that have been checked, with information about their eventual availability and version property.

Examples of XDG portal interfaces are "org.freedesktop.portal.OpenURI" and "org.freedesktop.portal.Email".

The returned list is in the same arbitrary order as the check-xdg-portal helper used to return them.

Parameters

self

The SrtSystemInfo object

 

Returns

A list of opaque SrtXdgPortalInterface objects or NULL if an error occurred trying to check the interfaces availability. Free with g_list_free_full (interfaces, g_object_unref).

[transfer full][element-type SrtXdgPortalInterface][nullable]


srt_system_info_get_xdg_portal_issues ()

SrtXdgPortalIssues
srt_system_info_get_xdg_portal_issues (SrtSystemInfo *self,
                                       gchar **messages);

Check if the current system supports the XDG portals.

Parameters

self

The SrtSystemInfo object

 

messages

If not NULL, used to return the diagnostic messages. Free with g_free().

[optional][out]

Returns

A bitfield containing problems, or SRT_XDG_PORTAL_ISSUES_NONE if no problems were found.


srt_system_info_check_runtime_linker ()

gboolean
srt_system_info_check_runtime_linker (SrtSystemInfo *self,
                                      const char *multiarch_tuple,
                                      gchar **resolved,
                                      GError **error);

Check whether the runtime linker ld.so(8) for the ABI described by multiarch_tuple , as returned by srt_architecture_get_expected_runtime_linker(), is available.

If ld.so is unavailable, return FALSE with error set.

If not enough information is available to determine whether ld.so is available, raise SRT_ARCHITECTURE_ERROR_NO_INFORMATION.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A multiarch tuple defining an ABI, as printed by gcc -print-multiarch in the Steam Runtime

 

resolved

Used to return the path to the runtime linker after resolving all symbolic links. Free with g_free(); may be NULL to ignore.

[out][type filename][transfer full][optional]

error

Used to raise an error on failure.

 

Returns

TRUE if ld.so(8) is available at the interoperable path for the given architecture


srt_system_info_dup_libdl_lib ()

gchar *
srt_system_info_dup_libdl_lib (SrtSystemInfo *self,
                               const char *multiarch_tuple,
                               GError **error);

Return the expansion of the dynamic linker string token $LIB, if possible.

If the library path to be loaded with dlopen() or similar contains the literal tokens $LIB or ${LIB}, the dynamic linker will replace them with the library directory returned by this function. See ld.so(8) section "Dynamic string tokens" for more details.

Because there is currently no glibc API to determine how this token would be expanded, only a finite number of known values can currently be detected. If called on a platform where $LIB has a different expansion, this function will return NULL.

NULL is also returned if an error occurs while attempting to determine the expansion of this token.

Typical values look like lib, lib32, lib64, lib/x86-64-linux-gnu or lib/i386-linux-gnu.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A multiarch tuple defining an ABI, as printed by gcc -print-multiarch in the Steam Runtime

 

error

Used to raise an error on failure.

 

Returns

A filename, or NULL.

[transfer full][type filename][nullable]


srt_system_info_dup_libdl_platform ()

gchar *
srt_system_info_dup_libdl_platform (SrtSystemInfo *self,
                                    const char *multiarch_tuple,
                                    GError **error);

Return the expansion of the dynamic linker string token $PLATFORM, if possible.

If the library path to be loaded with dlopen() or similar contains the literal tokens $PLATFORM or ${PLATFORM}, the dynamic linker will replace them with the library directory returned by this function. See ld.so(8) section "Dynamic string tokens" for more details.

Because there is currently no glibc API to determine how this token would be expanded, only a finite number of known values can currently be detected. If called on a platform where $PLATFORM has a different expansion, this function will return NULL.

NULL is also returned if an error occurs while attempting to determine the expansion of this token.

Typical values look like x86_64, haswell, xeon_phi, i386, i486, i586, i686, or aarch64.

Parameters

self

The SrtSystemInfo object

 

multiarch_tuple

A multiarch tuple defining an ABI, as printed by gcc -print-multiarch in the Steam Runtime

 

error

Used to raise an error on failure.

 

Returns

A filename, or NULL.

[transfer full][type filename][nullable]

Types and Values

enum SrtTestFlags

A bitfield with flags representing behaviour changes used in automated tests, or SRT_TEST_FLAGS_NONE (which is numerically zero) for normal production behaviour.

Members

SRT_TEST_FLAGS_TIME_OUT_SOONER

Reduce arbitrary timeouts

 

SRT_TEST_FLAGS_NONE

Behave normally

 

enum SrtDriverFlags

A bitfield with flags representing filters, used when retrieving a list of drivers. Use SRT_DRIVER_FLAGS_NONE for a list of the drivers that are believed to be on the search path that will be used in practice.

Members

SRT_DRIVER_FLAGS_INCLUDE_ALL

Get all the drivers that have been found, even if they are in directories that we do not believe will normally be loaded (srt_dri_driver_is_extra() or srt_va_api_driver_is_extra() will return TRUE)

 

SRT_DRIVER_FLAGS_NONE

Get just the drivers found in the canonical folders

 

Property Details

The “expectations” property

  “expectations”             gchar *

Path to a directory containing information about the properties we expect the system to have, or NULL if unknown.

Flags: Read / Write / Construct Only

Default value: NULL