Customizing Thinfinity Remote Desktop
Besides being a powerful cross-device, cross-browser remote access tool, Thinfinity Remote Desktop Server also excels in its integration capabilities and its flexible and easy customization.
A little known fact for those working with Thinfinity Remote Desktop is the existence of customSettings.js. This file provides a way to easily define some global parameters for all remote access connections, regardless of the selected profile. This file, located in the webrdp folder of the installation directory, is an editable javascript that contains a global variable called customSettings.
The customSettings variable uses the JSON format to define a collection of attribute/value pairs with special parameters that are not available in the profile settings:
 

AttributeDefault valueDescription
createToolbartrueEnables the Thinfinity Remote Desktop Toolbar creation.
toolbarVisiblefalseDefines the initial toolbar visibility.
checkBeforeWindowClosetrueWhen false, bypasses the confirmation popup triggered in the onBeforeUnload event.
noSsnDialogfalseDisables the share session popup dialog display.

 
 
This collection can be extended with any other attribute of the connect JSON parameter, except for those that are relative to the connection —user, password and computer—. When extending the collection, the overrideDefault attribute must be set to true, as specified in the Thinfinity Remote Desktop connect method reference:

// GetThinRDP(serverURL, runRemote)
//   Creates a new ThinRDP instance
//      serverURL:  substitute with the ThinRDP server URL (http[s]://[URL - IP]:port/)
//      runRemote:  use to set ThinRDP mode
//          -- false-> local (renders into this page)
//          -- true->  remote (posts connection data to postPage ("connection.html" as default)
  mythinrdp = GetThinRDP("", true);
  mythinrdp.connect({
    targetWindow: "rdpwindow",
    centered: true,
    overrideDefaults: true,
    ...
    ...
    ...
  }

 
 
When starting a connection, Thinfinity Remote Desktop merges this parameter list with the profile settings, overriding the profile attributes with the customSettings variable values. This is a powerful tool that needs to be used carefully. Therefore, it is recommended to use customSettings.js exclusively to set these special parameters, or when you need a centralized configuration to be shared among the totality of countless profiles.
Remember: defining the configuration in each profile is always safer, as well as clearer.
In conclusion, the customSettings global variable offers a way to quickly apply general custom settings that will affect all the connections. More details about this, such as how to customize the toolbar, will be explored in depth in a future post.
Have any questions? Contact us at [email protected] or leave a message on this same post.

Comments (3)

If I set checkBeforeWindowClose to false, it still pops up, but now asks if I want to reload. Is there a way of NOT having anything pop up at all? A pop-up is an extra step. Most people just close the browser and don’t go back to the menu in order to logout properly.

Hello Ralph,
Thanks for the message. Our support team will contact you shortly to address this inquiry.
Regards,
Mauro

Hi Ralph,
There is a little misunderstanding about the checkBeforeWindowClose parameter. This parameter is used to prevent an accidental window closing. This feature is working as espected, and it’s not supposed to do anything if you are closing the remote session normally.
However, we revisited the CustomSettings paremeters collection and added a new parameter to it in order to attend your requirement. The new parameter is called “noShowPopupsOnClose” and it will be available in the next Thinfinity Remote Desktop build.
Kind regards,
Dany Vazquez

Leave a comment

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.