Lock or unlock your session based on the connection state of a paired Bluetooth device.
Build and install the Flatpak:
flatpak-builder build io.github.eustasy.BluetoothProximityLocker.yml --user --install --force-cleanOpen the settings window (normal app launch):
flatpak run io.github.eustasy.BluetoothProximityLockerRun in background service mode (no UI window):
flatpak run io.github.eustasy.BluetoothProximityLocker --gapplication-service- Pair your phone/tablet in system Bluetooth settings.
- Launch the app in UI mode.
- Select the paired device to monitor from the list.
- Keep the service running (autostart uses service mode automatically).
- On startup, the app reads the configured device address from GSettings.
- It watches BlueZ device state over D-Bus.
- When the monitored device disconnects, it requests a session lock.
- When the device reconnects, it requests an unlock.
- UI mode: opens the settings window.
- Service mode: starts monitoring without opening a window.
Autostart uses service mode so login does not pop up the settings window.
- If you see
Unable to acquire bus name 'io.github.eustasy.BluetoothProximityLocker', another instance is already running:
flatpak kill io.github.eustasy.BluetoothProximityLocker
flatpak run io.github.eustasy.BluetoothProximityLocker- If you see
Settings schema 'io.github.eustasy.BluetoothProximityLocker' is not installed, rebuild and reinstall:
flatpak-builder build io.github.eustasy.BluetoothProximityLocker.yml --user --install --force-clean