$FrontEnd is a global variable that specifies to what front end object, if any, the kernel is currently connected.
$FrontEnd is either a FrontEndObject, or Null.
You can use Options and SetOptions on $FrontEnd to read and set global options for the front end.
See Section 2.11.4.
See also: $Notebooks.
New in Version 3.