AppInfo.launchDefaultForUri

bool launchDefaultForUri(string uri, gio.app_launch_context.AppLaunchContext context = null)

Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required.

The D-Bus–activated applications don't have to be started if your application terminates too soon after this function. To prevent this, use [gio.app_info.AppInfo.launchDefaultForUriAsync] instead.

Parameters

urithe uri to show
contextan optional #GAppLaunchContext

Returns

true on success, false on error.

Throws

[ErrorWrap]