var username = ns.getString("username");
- final var useDbus = ns.getBoolean("dbus");
- final var useDbusSystem = ns.getBoolean("dbus-system");
+ final var useDbus = Boolean.TRUE.equals(ns.getBoolean("dbus"));
+ final var useDbusSystem = Boolean.TRUE.equals(ns.getBoolean("dbus-system"));
if (useDbus || useDbusSystem) {
// If username is null, it will connect to the default object path
initDbusClient(command, username, useDbusSystem, outputWriter);
((ExtendedDbusCommand) command).handleCommand(ns, ts, dBusConn, outputWriter);
} else if (command instanceof LocalCommand) {
try {
- ((LocalCommand) command).handleCommand(ns, new DbusManagerImpl(ts), outputWriter);
+ ((LocalCommand) command).handleCommand(ns, new DbusManagerImpl(ts, dBusConn), outputWriter);
} catch (UnsupportedOperationException e) {
throw new UserErrorException("Command is not yet implemented via dbus", e);
} catch (DBusExecutionException e) {