def get_desktop_uri_prefix():
 global _uri_prefix
 if (_uri_prefix is None):
  dt_host = desktop.conf.HTTP_HOST.get()
  if (dt_host == '0.0.0.0'):
   dt_host = socket.getfqdn()
  protocol = ((desktop.conf.is_https_enabled() and 'https') or 'http')
  _uri_prefix = ('%s://%s:%s' % (protocol, dt_host, desktop.conf.HTTP_PORT.get()))
 return _uri_prefix

def get_desktop_uri_prefix ( ) : global _uri_prefix if ( _uri_prefix is None ) : dt_host = desktop . conf . HTTP_HOST . get ( ) if ( dt_host == '0.0.0.0' ) : dt_host = socket . getfqdn ( ) protocol = ( ( desktop . conf . is_https_enabled ( ) and 'https' ) or 'http' ) _uri_prefix = ( '%s://%s:%s' % ( protocol , dt_host , desktop . conf . HTTP_PORT . get ( ) ) ) return _uri_prefix
return the uri prefix where desktop is generally accessible .