myDisplayName()

Returns the display the user is currently using.

Synopsis

string myDisplayName([int formatVersion = 0]);

Parameters

Parameter Description
formatVersion

Defines the return value format:

  • 0 - The current display name is returned (default)
  • 1 - A JSON string containing additional information is returned, see description below.

Return value

String (name of the display).

Error

-

Description

Returns the display the user is currently using.

When using formatVersion = 1 additional information is returned as JSON string containing following keys:

qpa
Name of the QPA plugin which is used, e.g.: "xcb" (X11), "windows", "android", "ulc"
ip
IP address of the machine on which the UI is displayed. The ULC UX returns the IP address of the machine where the browser is running.
platform
Platform for which the UI has been compiled e.g. "Linux x86_64"; The ULC UX returns the User-Agent string of the browser.
name
Bluetooth name of the device or host name (optional)
brand
Manufacturer (only Android; optional)
model
Model of the device (only iOS and Android; optional)
xdisplay
Only for X11 (optional)
Anmerkung: Under Windows, myDisplayName() returns the host name. You can get the display name by using the getenv() function.
main()
{
  string i;
  i = myDisplayName();
  DebugN(i);
}

Assignment

Miscellaneous functions

Availability

UI