Xdp.Portal.dynamic_launcher_install

### Method

# Xdp Portaldynamic_launcher_install

#### Declaration [src]

    gboolean
    xdp_portal_dynamic_launcher_install (
      XdpPortal* portal,
      const char* token,
      const char* desktop_file_id,
      const char* desktop_entry,
      GError** error
    )

#### Description [src]

This function completes installation of a launcher so that the icon and name given in previous method calls will show up in the desktop environment’s menu.

The `desktop_file_id` must be prefixed with the caller’s app ID followed by a “.” and suffixed with “.desktop”.

The `desktop_entry` data need not include Icon= or Name= entries since these will be added by the portal, and the Exec= entry will be rewritten to call the application with e.g. “flatpak run” depending on the sandbox status of the app.

#### Parameters

`token`

  Type: `const char*`

  A token acquired via a `xdp_portal_dynamic_launcher_request_install_token()` or `xdp_portal_dynamic_launcher_prepare_install()` call.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`desktop_file_id`

  Type: `const char*`

  The .desktop file name to be used.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`desktop_entry`

  Type: `const char*`

  The key-file to be used for the contents of the .desktop file.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if the installation was successful, `FALSE` with `error` set otherwise.