Do you need to know, whether you have opened an application on the server? Otherwise you may simply inspect the first character from FilePath()-function, if "C", it is local, if e.g. "F" it may be on the server
You can use the Sessions.log of the QlikView Server in addition to that, so you can get more information on where you are running your documents. Special attention are worth the fields "Client Build Version" (empty for Ajax connections) and "Client Type" (Windows Exe for Desktop, browser name and version...).