We use this function:
*-----
function tserver
*
* Returns TRUE if the app is running on MS TS or on Citrix
*
private lbRetVal, lcSessionname
lcSessionname = upper(getenv('SESSIONNAME'))
lbRetVal = 'RDP-TPC' $ lcSessionname or 'ICA-TPC' $
lcSessionname
return lbRetVal
*-----
Gensoft Sàrl
Christian Carron