NetScaler: Customize logon screen

When configuring the NetScaler for our customer they liked to have some modifications made to the logon screen:

  • “Password 1” and “Password 2” need to be “Password” and “Token ID”.
  • the Citrix Receiver Image needs to be replaced with their company logo.

To meet this we need to change some files on the NetScaler, first I will show how to change the logon screen from “Password 1” and “Password 2” to the new “Password” and “Token ID”.

Default

This is the default when using secondary logon.

Connect to the NetScaler with WinSCP and download the following files:

  1. /var/netscaler/gui/vpn/login.js
  2. /var/netscaler/gui/vpn/resources/en.xml

Edit the login.js file and change the following:

  1. Go to the function ns_showpwd()
  2. Find: if ( pwc == 2 ) { document.write(‘ 1’); }
  3. Change it to: if ( pwc == 2 ) { document.write(‘ ’); }
    Or just remove the “1“.
  4. Save the file.

Edit the en.xml file and change the following:

  1. Go to:
    <String id=”Password”>Password</String>
    < String id=”Password2”>Password 2:</String>
  2. Change Password 2 into Token ID
    <String id=”Password”>Password</String>
    <String id=”Password2″>Token ID:</String> 
  3. Save the file.

Now copy both files back to the original location and test the logon page.

Token ID

The new logon screen.

But when you reboot the appliance you will notice the files are back to their original state, to make sure this works even when rebooting the appliance do the following.

    1. Create the directory /var/ns_gui_custom:
      mkdir /var/ns_gui_custom

    1. Create the customtheme.tar.gz file by running the following commands:
      cd /netscaler
      tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*
      The customtheme.tar.gz contains all the file for the custom theme and is a copy of the /var/netscaler/gui/ directory, when selecting the Custom theme it is extracted.
    2. Change the theme to Custom
      1. logon to the GUI
      2. Expand the NetScaler Gateway.
      3. select Global settings.
      4. select change global settings.
      5. go to client experience
      6. change the theme to Custom.
      7. save the configuration and reboot.

    When you reboot the NetScaler the files are copied back and the Login Screen is displayed correct.

    • Henri Louwes

      Sjoerd, is it correct that I miss the instructions on “the Citrix Receiver Image needs to be replaced with their company logo”?
      Can you please provide instructions on that part too ?
      Many thanks in advance.

    • Hi Henri, Yes, this is the easiest option. When you don’t like that, just replace the name in the CTX.Authentication.css:

      #logonbox-logoimage
      {
      background-image: url(“../media/LogoName.png”);
      border: 0 none;
      float: right;
      height: 50px;
      position: absolute;
      right: 71%;
      top: 80px;
      width: 380px;
      }

      Regards,

      Sjoerd

    banner