Monthly Archives: August 2011

Decrapifying the Citrix Web Interface (5.4)

If like me, you like to remove the majority of the Citrix Branding from the web interface, you may find this post useful. Below I’ve broken the web interface down into the 6-7 components that are modifiable and given instruction on how to remove, or replace the images / tag lines.

This blog post would not have been possible without the hard work by the guys on the Citrix forums: http://forums.citrix.com/thread.jspa?threadID=278277&tstart=0

Below you will find a break down of the seperate web interface components, and the numbers I’ve allocated to them, I’ve used the login screen as a template, as this contains all the images / taglines you will see on the web interfaces different screens.

Note: The image names containing “Dark” or “logged off” are specifically for the logged off screen. You’ll find both gif (for older browsers ) and png files for each of the different images.

1: Header logo.

To remove the logo from the top of the page, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

#headerLogo {
padding: 11px 0 11px 18px;
display: none;}

To use a custom graphic instead of the default, modify the following files:

.mediaCitrixLogoHeader.png
.mediaCitrixLogoHeader.gif

(there’s no dark logo for this file)

2: Product graphic.

This product graphic can be either XenApp or XenDesktop depending on your installation. To remove the product graphic, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

#horizonTop img {
padding-top: 75px;
Display: none;
}

To use a custom image in place of the product graphic, modify the following files:

For XenApp:

.mediaCitrixXenApp.gif
.mediaCitrixXenAppLoggedoff.gif
.mediaCitrixXenApp.png
.mediaCitrixXenAppLoggedoff.png

For XenDesktop:

.mediaCitrixXenDesktop.gif
.mediaCitrixXenDesktopLoggedoff.gif
.mediaCitrixXenDesktop.png
.mediaCitrixXenDesktopLoggedoff.png

3: Devices.

The devices image appears to the left and right of the login window. To remove the Devices graphic, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

.horizonPage .mainPane {
position: relative;
top: -120px;
background: none;
color: white;
padding: 0;
overflow: auto;
}

To replace the devices image with a custom image, modify the following files:

.mediaDevices.gif
.mediaDevicesLoggedoff.gif
.mediaDevices.png
.mediaDevicesLoggedoff.png

5: Tagline.

To remove the tagline “your windows desktop and apps on demand – from any pc”, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

#horizonTagline {
color: #F2F2F2;
font-size: 180%;
font-weight: normal;
margin: 50px 0 0 0;
padding-bottom: 10px;
text-align: center;
display: none;
}

To enter a custom tagline, find the below entry in C:Program Files (x86)CitrixWeb Interface5.4.0languagesaccessplatform_strings.properties and replace the bolded text with your custom message.

HorizonTagline=Your Windows desktops and apps on demand – from any PC, Mac, smartphone or tablet.

Footer:

The footer on the web interface site is made up of potentially two components, the Citrix footer logo and the hdx logo. If you wish to indiscriminately remove both from the login page, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

#footer
{
text-align: center;
padding-bottom: 10px;
display: none;
}

#footer p
{
padding: 10px 0;
display: none;
}

6: Citrix Logo

The Citrix footer logo appears at the bottom of most web interface pages. To remove the logo, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

#footer img
{
padding: 0 8px;
vertical-align: middle;
display: none;
}

To replace the footer citrix logo with a custom graphic, modify the following files:

.mediaCitrixWatermark.png
.mediaCitrixLogoDarkLoggedOff.png
.mediaCitrixWatermark.gif
.mediaCitrixLogoDarkLoggedOff.gif

7: HDX logo

The HDX footer appears at the bottom of the login page. To remove the logo, find the below entry in .app_dataincludefullstyle.inc and add the bolded text:

.horizonPage #hdxLogo {
display: none;
}

To replace the HDX logo with a custom graphic, modify the following files:

 .mediaHDX.gif
.mediaHDXLoggedoff.gif
.mediaHDX.png
.mediaHDXLoggedoff.png

And that’s it! hopefully with the above info you can remove the unsightly self advertisement and replace it with something unique to your organisation.

If you spot anything additional you would like to remove, drop me a comment and I’ll see what I can do.

Simple Wake On Lan powershell Function.

I recently wrote the below powershell module for waking up my home lab. There’s a great article on The Powershell Guy to do with Wake On Lan, but it didn’t include a function or any specific error checking.

Below is the module I put together quickly for the purpose.
[sourcecode language=”powershell”]
function send-wakeonlan{
param(
[string]$mac)
if (!($mac -like "*:*:*:*:*") -or ($mac -like "*-*-*-*-*")){
write-error "mac address not in correct format"
break
}

$string=@($mac.split(":""-") | foreach {$_.insert(0,"0x")})
$target = [byte[]]($string[0], $string[1], $string[2], $string[3], $string[4], $string[5])

$UDPclient = new-Object System.Net.Sockets.UdpClient
$UDPclient.Connect(([System.Net.IPAddress]::Broadcast),4000)
$packet = [byte[]](,0xFF * 102)
6..101 |% { $packet[$_] = $target[($_%6)]}
$UDPclient.Send($packet, $packet.Length) | out-null
}
[/sourcecode]

The usage of this function is below:

send-wakeonlan -mac “3C:4A:92:77:AA:21″

send-wakeonlan -mac “3C-4A-92-77-AA-21″

Removing “Send to Onenote” features from Internet Explorer

Here’s a nice bug for you, when you install Onenote as part of the office 2010 professional installation, it adds two icons to internet explorer. These icons allow you to send and interact with OneNote from Internet explorer.

These icons may not be wanted for a number of reasons, due to user preference, lockdown in a shared desktop environment, etc..

If we wanted to remove them, we could choose not to install them as part of the office installation, Microsoft in their wisdom gave us the ability to disable this component from being installed with the following two options when installing the application:


So where’s the bug?

So at this stage you’d seal your installation package, and roll it out to the test environments riding on your sense of accomplishment right? Wrong.

The above components dont work, by that I mean, you can certainly uncheck them from the installation, but the buttons will still show up like rebellious teenagers.

So how do you remove them?

Seek out the following keys, and delete them:

Send to OneNote

HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerExtensions{2670000A-7350-4f3c-8081-5663EE0C6C49}

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerExtensions{2670000A-7350-4f3c-8081-5663EE0C6C49}

Onenote Linked Notes

HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerExtensions{789FE86F-6FC4-46A1-9849-EDE0DB0C95CA}

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerExtensions{789FE86F-6FC4-46A1-9849-EDE0DB0C95CA}

But what if I want to display them to some users ?

  1. export, the above keys to .reg files
  2. delete the registry keys
  3. modify each reg file, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER
  4. Import the registry files for the users who need it.

Configuring “Language for non-Unicode programs” via the registry in Server 2003.

As a break from server 2008 r2 profiles, I recently had a customer with a character display issue in our xenapp environment. Their local characters were not displaying correctly when run from our English XenApp servers. The language in question was Czech and numerous characters were incorrect or null in application menu’s and data contained in the application.

Testing the Microsoft AppLocale utility ended in utter failure, so we had no choice but to modify the default unicode option on the server 2003 operating system to change this to Czech.

Now this is all very simple to do from a console, start > run > intl.cpl > advanced and choose your language from a drop down list. But what if you want to automate, or script it?

No group policy exists for managing this option, and the documentation / forums online do not cover a full answer to the question. This also cannot be applied on a per user basis, this is strictly a per machine setting.

In my case, the language needed was Czech, and the below steps assume Czech language, this probably will work for any other… but let it be known here’s your disclaimer!

The process we’ll use, is to capture the regional and language options from one server, then export them for the remaining servers.

Step 1: create the necessary changes:

  • As mentioned above, click start, run, Intl.cpl.
  • Choose the advanced tab:

  • Choose the language you wish from the drop down list:

  • Hit Apply
  • Choose “yes” from the dialogue box, to skip the file copy if needed

  • Choose “no” to restart later.

click “Ok” to close.

Step 2: capture the changes:

  • Create a folder on the root of the c: drive, called “c:unicode-export”
  • Once you’ve made the changes listed above, fire up regedit (start > run > regedit).
  • Export the following keys to the c:unicode-export folder to .reg files:
  • (right click the key, and choose export, I named them 1-6 respectively for convenience.)
  1. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontMapper]
  2. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFonts]
  3. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontSubstitutes]
  4. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionGRE_Initialize]
  5. [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNls]
  6. [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetHardware ProfilesCurrentSoftwareFonts]
  • Copy the following file to the c:unicode-export folder:
  1. c:windowssystem.ini

Once finished, you should end up with 6 registry files, and 1 ini file in the “c:unicode-export” folder:

Step 3: import the settings on the subsequent servers:

  • Copy the c:unicode-export folder from your source server to the target server:
  • import the keys / ini with this simple script:

for /f /%%a in (‘dir /s /b c:unicode-export*.reg’) do regedit -s %%a

copy /y c:unicode-exportsystem.ini c:windows

Note: (if you run this from a command line, outside of a batch file, replace %%a with %a.)

And that’s it, once the script is finished you can delete the c:unicode-export folder and restart the server.

This was a massive pain in the arse to get to the bottom of (excuse the pun) so I hope its useful to somebody! I’ll also be reviewing this by the end of the year for server 2008 r2.