# rpi-gui-nop

A minimal no-operation GUI application that monitors the active display server (Wayland compositor or X11 server) and exits cleanly when the display server terminates. This tool serves as a replacement for the existing gtk-nop tool on Raspberry Pi systems.

The application automatically detects whether a Wayland or X11 display server is running and connects to the appropriate display server socket. When the display server socket closes, rpi-gui-nop exits cleanly. This behaviour makes it useful for tying other processes to the lifetime of the graphical session, for instance when used with systemd-inhibit or in similar situations where actions need to persist only whilst the display server is running.

## Building for Debian

This project is packaged as a native Debian package and uses Debian's `librust-*` packages for dependencies rather than downloading crates from crates.io, ensuring an isolated and reproducible build environment.

### Build Instructions

Install build dependencies:
```bash
mk-build-deps -i
```

Build the package:
```bash
debuild -b -uc -us
```

The built `.deb` package will be created in the parent directory.

Cargo may be used directly in support of incremental builds by setting the
following environment variables:
```bash
export CARGO_HOME=debian/cargo_home
export CARGO_REGISTRY=debian/cargo_registry
```

### Dependencies

All Rust dependencies are satisfied by Debian's `librust-*` packages as specified in `debian/control`. This ensures the build is completely isolated from external package registries and uses only packages that have been reviewed and packaged by Debian maintainers.
