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.

The customer also wanted to replace the ” Citrix Receiver” logo with their own logo, to do this we need to do the following:

  1. Change back to the bubble theme.
  2. Repeat the steps for changing the password. 
  3. Create a .PNG file with the following details:
    1. Name: logo_notagline.png
    2. Size: 215 x 51 (when you want it bigger you also need to change the ctxs.authentication.css which can be found in /var/netscaler/gui/vpn/css)
  4. Copy the file to:
    var/netscaler/gui/media
  5. Run the following command to create a new customtheme.tar.gz file:
    cd /netscaler
    tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*
  6. 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.

Now the logo is the company logo and even when the server is rebooted the logo is copied and it keeps working.

Comments

  1. Henri Louwes says:

    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.

  2. Sjoerd van den Nieuwenhof says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.