If you are responsible for a Citrix NetScaler Gateway, formerly known as Citrix Access Gateway Enterprise Edition one will have to customize at least the logon screen or a logo. Before it was possible to choose a custom theme in the NetScaler Gateway global settings an administrator or consultant would have to build some scripts so changes would not be lost upon reboot.

This thank heavens is over since some versions. For technical advisory you could head over to this edocs article and at least learn how to activate your self build theme. From my point of view this article lacks detailed informations as most of us are not native Linux guys and might face some problems while trying to create such a theme.

If you do not want to start with the default black (caxton) theme you might wanna apply i.e. the Green Bubble theme via the Gateways global settings. After doing so or applying any other theme you should head over to /netscaler/ns_gui which is a symbolic link to /var/netscaler/gui. Now you are able to just customize within the current used directory by the NetScaler Gateway as you are used to. There are several articles on how to do this out there so I will not dig deeper into this.

After you are finished you would want to create a local copy or directly compress your altered files.

At first we will create a directory as described in the linked edocs article:

mkdir /var/ns_gui_custom

Now change to the netscaler directory and then compress:

cd /netscaler

tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*

It is essential to always change to the root directory from which your compression will start as otherwise the directory tree extracted will not match the desired outcome.

If you now will head over to your NetScaler Gateways global settings and choose custom as your theme you will notice a new directory /var/ns_gui_custom/ns_gui which will include your altered design. In addition from extracting your customtheme.tar.gz the symbolic link /netscaler/ns_gui has been altered to link to /var/ns_gui_custom/ns_gui thus using your new theme.

This will happen every time you reboot your appliance. If you now wanna customize some more you can just do this directly within /var/ns_gui_custom/ns_gui. To create a new customtheme.tar.gz just delete the old file and:

cd /var/ns_gui_custom

tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*

You can spare some precious disk space by getting rid of the themes directory which only includes the caxton and Green Bubble theme you do not need within your customtheme.tar.gz.

BEWARE that within the directory you will not only find the vpn directory which includes most of the files you would wanna edit but also administrative files you should not touch but still include! If something goes wrong you will not be able to use the gui to edit your NetScaler!

Eventually you will find yourself in the situation and get easily out of it buy using the CLI via i.e. putty and issuing the following command which will revert back to the default caxton theme:

set vpn parameter -UITHEME DEFAULT

As you might have guessed already while upgrading your Citrix NetScaler firmware you should revert back to the default theme beforehand and restart your customization process. You might not have to edit all files again but should at least be sure to include the new administrative gui files in your customtheme.tar.gz file.

This can easily be achieved by creating a local copy of your design (i.e. with WinSCP) and clearing up the contents of /var/ns_gui_custom/. Now you will create a copy of the new files brought to you by the firmware update:

cp -rp /var/ns_gui_custom/ns_gui/ /var/ns_gui_custom

After successfully copying those files replace all files within the copied directory (/var/ns_gui_custom/ns_gui) with your customization and compress again:

cd /var/ns_gui_custom

tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*

There are sure more ways to create a custom theme and update it after updating your NetScalers firmware and I just have shown you one which you can use or find your own.


3 Responses to How to apply a Citrix NetScaler Gateway custom theme

  1. […] Backup the custom theme. check this article  […]

  2. […] If you want to know how to create a custom theme so your customization will resist a reboot just head over to my other article How to apply a Citrix NetScaler Gateway custom theme. […]

  3. Hallo, ich musste Dir sagen, dass deine die Artikel absolute Hammer sind.
    Echt nur weiter zu empfehlen. 😉 – Vielen Dank

Schreib einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *