Headless Check

This function block reports whether the current run is operating in headless mode (no user interface). Use it to adapt behavior when running on servers or automated environments.

πŸ“₯ Inputs

This block does not have any inputs.

πŸ“€ Outputs

Check This output provides a boolean value: TRUE when the scenario is running headless, FALSE when a user interface is available.

πŸ•ΉοΈ Controls

This block does not expose any user controls.

🎯 Features

  • Simple TRUE/FALSE indicator suitable for flow control.

  • Lightweight and safe to place anywhere in the flow to adapt downstream behavior.

  • Works well as a gating signal for UI-dependent blocks or for toggling logging and export behavior in automated runs.

πŸ“ How to use

  1. Place the block where you need to decide between UI and non-UI behavior.

  2. Connect the Check output to logic or control blocks to enable/disable branches (for example, to skip visual outputs when headless).

  3. Use the result with logic blocks (And / Or / Not) or flow-control blocks to implement conditional behavior.

πŸ“Š Evaluation

When evaluated, this block returns a single boolean on Check indicating the presence or absence of a user interface for the current run.

πŸ’‘ Tips and Tricks

  • To avoid opening windows on servers, use Check to gate Show Image so image viewers are only enabled when not headless.

  • In headless runs you may prefer saving results instead of showing them. Combine Check with export blocks like Image Logger, Image Write, Record Video, or CSV Export to automatically save outputs when headless.

  • Use Check together with logic blocks such as Not, And or Or to build flexible rules (for example: save images only when headless AND a Logic Input trigger is active).

  • When running automated evaluations, connect Check to Stop to gracefully end UI-based scenarios only when a UI is present.

πŸ› οΈ Troubleshooting

  • If the environment seems to be headless but Check returns FALSE, verify how the scenario was started (some remote desktop or virtual displays may present as GUI).

  • If you need different behavior for partially-headless setups (e.g., background GPU processes but occasional UI), combine Check with manual Logic Input to refine control.

Last updated

Was this helpful?