Native Dart client library to access the GNOME Session Manager

ubuntu_session.dart

Native Dart client library to access the GNOME Session Manager

import 'package:dbus/dbus.dart';
import 'package:ubuntu_session/ubuntu_session.dart';

void main() async {
  final manager = SessionManager();
  await manager.connect();
  try {
    await manager.reboot();
  } on DBusMethodResponseException catch (e) {
    print('Error: $e');
  }
  await manager.close();
}

Implemented so far:

org.gnome.SessionManager

Methods

  • Shutdown()
  • Reboot()
  • CanShutdown()
  • IsSessionRunning()

Properties

  • SessionName
  • SessionIsActive

Please refer to the GNOME Session Documentation for further details.

Contributing to ubuntu_session.dart

We welcome contributions! See the contribution guide for more details.

GitHub

View Github