Function
MateDesktopstart_systemd_scope
unstable since: 2.0
Declaration [src]
void
mate_start_systemd_scope (
const char* name,
gint32 pid,
const char* description,
GDBusConnection* connection,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
If the current process is running inside a user systemd instance, then move
the launched PID into a transient scope. The given name will be used to
create a unit name. It should be the application ID or the executable in all
other cases. If a desktop-id is passed then the .desktop suffix will be stripped.
It is advisable to use this function every time where the started application can be considered reasonably independent of the launching application. Placing it in a scope creates proper separation between the programs rather than being considered a single entity by systemd.
It is always safe to call this function. Note that a successful return code does not imply that a unit has been created. It solely means that no error condition was hit sending the request.
If connection is NULL then g_dbus_get() will be called internally.
Note that most callers will not need to handle errors. As such, it is normal
to pass a NULL callback.
Stability: Unstable
Available since: 2.0
Parameters
name-
Type:
const char*Name for the application.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. pid-
Type:
gint32The PID of the application.
description-
Type:
const char*A description to use for the unit, or
NULL.The argument can be NULL.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. connection-
Type:
GDBusConnectionAn
GDBusConnectionto the session bus, orNULL.The argument can be NULL.The data is owned by the caller of the function. cancellable-
Type:
GCancellableGCancellableto use.The argument can be NULL.The data is owned by the caller of the function. callback-
Type:
GAsyncReadyCallbackCallback to call when the operation is done.
The argument can be NULL. user_data-
Type:
gpointerData to be passed to
callback.The argument can be NULL.The data is owned by the caller of the function.