You need to read the environment variable QX_USER as follows:
DISPLAY fgl_getenv(“QX_USER”)
QX_USER retrieves the name of the authenticated user via a secure connection.