Advertisements

Citrix NetScaler Gateway Client Choices branding

While working in a production roll out of NetScaler Gateway and StoreFront 2.6, we noticed that NetScaler Gateway customizations do not stick when you set up the client choices for users as part of your session policies.

When enabling “Client Choices” for a session policy, NetScaler will call the choices.html page, which by default has the carbon black theme applied and ignores most of the customizations you applied to the logon page.

You can read read my article on how to customize the NetScaler logon page under Customizing Citrix NetScaler Gateway 10.5 logon page with Dual Factor Authentication, as well as Customizing Citrix StoreFront 2.6 including Pre-Login message page.

NetScaler Client Choices     ns_client_choices_enabled_2

Environment:

  • StoreFront 2.6
  • Citrix NetsScaler 10.5: Build 53.9.nc
  • RSA for dual factor

Goal:

  • Make the client choices page mimic the authentication page  (which I made it look like StoreFront 3.0)
  • Include a custom tab displaying the company name
  • Include company logo
  • Do not display “Client Access” and the “Log Off” options, and provide the session policy to only display VPN access as well as StoreFront ICA access

ns_agee_frontpage  ns_agee_client_choices

 

Solution:

Copy and back up the following files from your NS

  • choices.html under /var/netscaler/gui/vpns
  • caxtonstyle.css under /var/netscaler/gui/vpn/images
  • create/upload new company icon file, this will add the company logo under the title bar of the browser
  • create/upload new company logo to replace the “Citrix NetScaler Gateway” default logo

Edit choices.html under /var/netscaler/gui/vpns

Around line 3 modify the ico file in use, upload your ico file under  /var/netscaler/gui/vpn/images then make a call to your file

<link rel=”SHORTCUT ICON” href=”/vpn/images/company_icon.ico” type=”image/vnd.microsoft.icon”>

Around line 106 comment out the “Clientless Access Option”

// Remote Option 3 for “Clientless Access option”
// if(errcookie.indexOf(“cvpn”)!=-1) {
// if (++choicescount == 3){ document.writeln(‘</tr><tr>’);}
// document.writeln(
// ‘<td class=”VPNcell” valign=”top”><span style=”display:none”><img src=”/vpns/images/ClientlessHover_icon.png”/></span>’ +
// ‘<a class=”ClientlessLink” href=”/cgi/setclient?cvpn” onclick=”ns_cleancookie();”>’ +
// ‘<span class=”linkH4″>’ + _(‘Clientless Access’) + ‘</span>’ +
// ‘<span class=”linkP”>’ + _(‘Connect without the Access Gateway Plug-in.’) + ‘</span></a>’ +
// ‘</td>’);
// }

Around line 116 comment out the “Log Off” option

// if (++choicescount == 3){document.writeln(‘</tr><tr>’);}
// document.writeln(
// ‘<td class=”VPNcell” valign=”top”><span style=”display:none”><img src=”/vpns/images/LogoffHover_icon.png”/></span>’ +
// ‘<a class=”LogoffLink” href=”/cgi/logout”>’ +
// ‘<span class=”linkH4″>’ + _(‘Log Off’) + ‘</span>’ +
// ‘<span class=”linkP”>’ + _(‘End your session.’) + ‘</span></a>’ +
// ‘</td>’);

Edit caxtonstyle.css under /var/netscaler/gui/vpn/images

Around line 92, comment out the .header_left code to disable the Citrix NetScaler Gateway logo and create your own logo which you will need to upload to /var/netscaler/gui/vpn/images

/* Logo on left side original VPN page
.header_left
{
width: 285px;
height: 62px;
background-image: url(/vpn/images/ctxHeader01.gif);
background-repeat: no-repeat;
}
*/

/* Company logo on left side */
.header_left
{
float:left;
width: 179px;
height: 60px;
margin: 8px 0 0 22px;
background-image: url(/vpn/images/company_logo.png);
background-repeat:no-repeat;
position:absolute;
background-repeat: no-repeat;
}

Now lets disable the snake pattern header which Citrix uses another image to load

/* Top Header with Snake pattern VPN page
.header_middle
{
height: 62px;
background-image: url(/vpn/images/ctxHeader02.gif);
background-repeat: repeat-x;
}
*/

Now lets disable the Citrix log watermark at the bottom of the screen

/* Citrix logo at bottom VPN page
.watermark
{
width: 192px;
height: 62px;
background-position:bottom center;
background-image: url(/vpn/images/CitrixWatermark.gif);
background-repeat: no-repeat;
}

*/

Disable the gray navigation bar on top

/*
VPN page Gray navigation bar on top
.navbar
{
height: 26px;
background-image: url(/vpn/images/NavBarLink.gif);
background-repeat: repeat-x;
}
*/

Now lets make the background look like StoreFront 3.0 /X1

Around line 236 add the following to change the color background as well as to load the background you want, in my case I used the X1 background Citrix uses for StoreFront 3.0.  You will need to upload the background file to /var/netscaler/gui/vpn/media

body
{
background-color: #00140B;
background-image:url(“/vpn/media/bg_x1.jpg”);
/*
color: white;
background: black repeat-x top left;
*/
margin: 0px;
padding: 0px;
font-family: Segoe UI, Tahoma,Verdana, Helvetica, Arial, sans-serif;
font-size: 70%;
text-align: center;
height: 100%;
}

Now lets disable the blue background and make it look like StoreFront 3.0

Around line 249 under .mainPage

.mainPane
{
margin: 0;
padding: 0;
color: #FFFFFF;
/* Disable blue background VPN page
background: #003C96 url(/vpn/images/CenterBlueBkg.jpg) repeat top left;
*/
background: #4A5A63 repeat top left;
left:0;
right:0;
border-top: 2px #999999 solid;
border-bottom: 2px #999999 solid;
}

Lets now get rid of the snake border on the top around line 290

/*
Snake borders top
div#commonBoxTop
{

background: transparent url(/vpn/images/TitleHeaderCarbon.gif) repeat top left;

height: 5px;
border: solid 1px #999999;
border-top: none;
}
*/

Finally disable the black border at the bottom footer

/*
Border bottom black
div#commonBoxFoot
{
border: solid 1px #999999;
background-color: black;
height: 5px;
}
*/

Now load the modified files and ensure to update the global settings to use the Custom UI

  • choices.html under /var/netscaler/gui/vpns
  • caxtonstyle.css under /var/netscaler/gui/vpn/images

Open Putty and log in as nsroot, then type (Note the name of the compressed file, this needs to match “customtheme.tar.gz“)

  • shell
  • mkdir /var/ns_gui_custom
  • cd /netscaler
  • tar -cvzf /var/ns_gui_custom/customtheme.tar.gz ns_gui/*

Now apply the package to your AGEE sites

  • In the configuration utility, under the Configuration tab, expand “NetScaler Gateway” and then click “Global Settings“.
  • In the details pane, under Settings, click Change global settings.
  • In Global NetScaler Gateway Settings, click the Client Experience tab.
  • Next to UI theme, click Custom and then click OK.

01_custom_agee

That should do it, if you do the above and use the “Clientless Access Option”, it will look as StoreFront 3.0 as well and the page will be formatted nicely on the screen 🙂

Disclaimer:

I do not accept any responsibility or liability for the accuracy, content, completeness, legality, or reliability of the information contained on this website.

Advertisements

About CyberRuiz
Highly motivated with over 12 years experience on Citrix/VMWare/Microsoft/technologies. Exceptional communication skills and team player. CCIA – Citrix Certified Integration Architect. CCEA – Citrix Certified Enterprise Administrator. VCP – VMWare Certified Professional in ESX 2.x, VI3, VI4 MCSE – Microsoft Certified Systems Engineer

2 Responses to Citrix NetScaler Gateway Client Choices branding

  1. Pingback: NetScaler Gateway front page à la StoreFront 3.0 | Daniel Ruiz - Blog

  2. Pingback: Provide Citrix Receiver download link on NetScaler Gateway authentication page based on Client OS | Daniel Ruiz - Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: