If you want to know the launch environment of your client on server side, simply use LifeCycleUtil to get the information. The information is stored as connection property of master and subconnections.

Simply call:

LifeCycleUtil.getEnvironmentName();

or, e.g.,

LifeCycleUtil.isDesktopEnvironment();

on server-side.

This methods are similar to the client-side methods of UILauncher (see details).