Skip to content

lightgun-poc / lib/virtual / hasDisplay

Function: hasDisplay()

hasDisplay(platform?, env?): boolean

Defined in: lib/virtual.ts:29

Can this machine accept injected input at all?

Only Linux can answer no: libnut needs an X11 (or Xwayland) display, and DISPLAY is how it finds one. Windows and macOS always have a desktop when a user is logged in.

Parameters

platform?

string = process.platform

env?

Record<string, string | undefined> = process.env

Returns

boolean

Released under the MIT License.