### Method

# Gio ApplicationCommandLine get_environ

since: 2.28

#### Declaration

    const gchar* const*
    g_application_command_line_get_environ (
      GApplicationCommandLine* cmdline
    )

#### Description

Gets the contents of the ‘environ’ variable of the command line invocation, as would be returned by g_get_environ(), ie as a `NULL`-terminated list of strings in the form ‘NAME=VALUE’. The strings may contain non-utf8 data.

The remote application usually does not send an environment. Use `G_APPLICATION_SEND_ENVIRONMENT` to affect that. Even with this flag set it is possible that the environment is still not available (due to invocation messages from other applications).

The return value should not be modified or freed and is valid for as long as `cmdline` exists.

See `g_application_command_line_getenv()` if you are only interested in the value of a single environment variable.

Available since: 2.28

#### Return value

Type: An array of `filename`

    the environment strings, or `NULL` if they were not sent.

The array is `NULL`-terminated.
The returned data is owned by the instance.
Each element is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows..