DBusClient.session constructor
DBusClient.session({
- bool introspectable = true,
Creates a new DBus client to communicate with the session bus.
Implementation
factory DBusClient.session({bool introspectable = true}) {
var address = Platform.environment['DBUS_SESSION_BUS_ADDRESS'];
if (address == null) {
var runtimeDir = Platform.environment['XDG_USER_DIR'];
if (runtimeDir == null) {
var uid = getuid();
runtimeDir = '/run/user/$uid';
}
address = 'unix:path=$runtimeDir/bus';
}
return DBusClient(DBusAddress(address), introspectable: introspectable);
}