[an error occurred while processing this directive]
$Linked is True if the Mathematica kernel is being run through MathLink.
$Linked is True when Mathematica is being run with a front end.
$Linked is typically False when Mathematica is being run with a text-based interface.
See also: $CommandLine, $BatchInput, $BatchOutput, $Notebooks.