Monday, 20 December 2010

Streaming Firefox 3.6 on XenApp 6

This appears to be a surprisingly simple app to stream on XenApp – so far.  My one criticism is that its not very obvious how to customise the application, but after a bit of research it wasn’t too hard.

I’m assuming here you want to turn off any updates (its a stream, so you will need to re-stream it to apply any updates – which given the amount of bugs that are discovered in Firefox is a good idea to do on a regular basis) and you probably want to stop it being the default browser on your systems.  After all, if you DO want it to be the default browser, you are probably not going to stream it – just install it on your XenApp servers properly.

Preparation – getting the files to configure

Step one is to download the latest installer from  Install it to a PC manually and have it ready to use on your streaming profiler.

Make a copy of this file to edit… C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js
Remember on a 64-bit system this will appear in c:\program files (x86)…

Also get a copy of C:\Program Files\Mozilla Firefox\components\nsBrowserGlue.js

Finally, create a new text file called override.ini.

Put these three text files and the installer together and prepare them before streaming.  Use Notepad++ instead of Notepad so it shows the line breaks properly.

Preparation – disabling the default browser check

Open your firefox.js file in Notepad++ – search for the phrase “checkDefaultBrowser” and change “true” to “false”

pref("", false);

Preparation – disabling updates

Still editing firefox.js in Notepad++, search for “update”.  Find these lines and change “true” to “false”

pref("", false);

pref("app.update.enabled", false);

pref("extensions.update.enabled", false);

Preparation – pre-configure Proxy settings

Assuming you want to specify Proxy settings, search for “share_proxy_settings” in firefox.js.  Change “true” to “false”

pref("network.proxy.share_proxy_settings",  true);

You now should now add in a load of lines (assuming they are not already in the file) for your proxy settings.  These are just examples – obviously put in your own settings for proxy server address, port and exceptions:

pref("network.proxy.ftp", "");
pref("network.proxy.ftp_port", 80);
pref("network.proxy.gopher", "");
pref("network.proxy.gopher_port", 80);
pref("network.proxy.http", "");
pref("network.proxy.http_port", 80);
pref("network.proxy.socks", "");
pref("network.proxy.socks_port", 80);
pref("network.proxy.ssl", "");
pref("network.proxy.ssl_port", 80);
pref("network.proxy.type", 1);
pref("network.proxy.no_proxies_on", "localhost,,");

Preparation – prevent the annoying “Welcome to Firefox version 3.6” home page tab for new users.

By default a user in Citrix running Firefox will see an extra tab when they open it for the first time with a page extolling the virtues of the new version they just installed.  This is not needed!  Add this line to the firefox.js file:

pref("browser.startup.homepage_override.mstone", "ignore");

Preparation – getting rid of the “Do you want to save your tabs” dialog on closing Firefox

You probably want to just want your users to open their home page next time you open the browser, so the functionality to open their old tabs is not needed.  Find and amend these lines in firefox.js to stop these messages:

pref("browser.tabs.warnOnClose", false);
pref("browser.tabs.warnOnOpen", false);
pref("browser.warnOnQuit", true);

// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
// The behavior of option 3 is detailed at:
pref("",                1);

Preparation – preventing the “Know your rights” button appearing

By default when you open Firefox it will keep producing a bar under the tabs list with a button called “Know your rights” and some text telling you that this is open source software.  Very annoying, but easy to suppress. 

Edit C:\Program Files\Mozilla Firefox\components\nsBrowserGlue.js in Notepad++ – remove or comment (with “//”) the line:

var rightsBundle = this._bundleService.createBundle("chrome://global/locale/");

Preparation – prevent the “Import your settings data data” wizard

The final annoyance, this wizard is launched the first time you open Firefox and isn’t useful in a Citrix environment.  Edit the blank text file called override.ini and add these lines:


Streaming Firefox

Now you have your installer and your three modified text files (override.ini, firefox.js and nsBrowserGlue.js), install is easy…

  1. Open the Citrix Streaming Profiler on your profiler machine.  If you are streaming this to Stream To Server on XenApp 6, this should be a Windows Server 2008 R2 machine
  2. Create a new profile
  3. Click Next until you get to the Quick or Advanced Install option – choose Advanced
  4. Click Next and Next to run an install program
  5. Browse to your Firefox installer and select it.  Click next and Launch Installer.
  6. Click Next, Custom, and keep pressing Next until you get to the default web browser checkbox-  uncheck it so its not the default.
  7. Click Next to install.  Untick the box to Launch Firefox Now and click Finish
  8. Click Next and Perform Additional Installations
  9. Click Select files and folders and click Next
  10. On the left hand side browse to the text files you edited earlier
  11. Copy firefox.js into the profile at “C:\Program Files (x86)\Mozilla Firefox\defaults\pref”, overwriting the existing file
  12. Copy nsBrowserGlue.js into the profile at “C:\Program Files (x86)\Mozilla Firefox\components”, again overwriting the existing file
  13. Copy override.ini into the profile at “C:\Program Files (x86)\Mozilla Firefox\” – this should be a new file
  14. Click Next and Finish Installations
  15. Click Next and run Firefox.  You should now be able to check the settings you specified above on updates, default browser, wizards, etc – it should all be pre-configured if the files are right.
  16. Close Firefox and click Next.
  17. You can probably delete the entry for “Mozilla Firefox (Safe Mode)
  18. Click Next and Finish, then save your profile on a network location.
  19. Publish an application to your farm, streamed from the profile you just saved – you should get a nice, clean, pre-configured browser.

Monday, 6 December 2010

EdgeSight 5.3 and the empty reports

I’ve just got EdgeSight 5.3 working, running with SQL Server 2008, after an unlikely amount of messing around.  This surprised me as when I last installed this, using SQL Express instead of full-blown SQL 2008, it all went well. 

This time I at first tried to be too up to date and used two Windows Server 2008 R2 machines for the website and SQL parts, backed by SQL Server 2008 R2. Turns out that SQL Server 2008 R2 is too advanced for EdgeSight 5.3 – it only supports 2005 and 2008.  I wasn’t sure if Windows Server 2008 R2 was any good either, so went back to 2008.

Then I tried using a separate shared SQL Server which didn’t have Reporting Services on, planning to use SQL Express with Advanced Features (including Reporting Services) on the website box.  That didn’t work out either as the version of Reporting Services you get with SQL Express can only report on local databases.

So I finally use a shared SQL 2008 (non-R2) server that does have proper reporting services on it, and it still doesn’t work.  It looks like it will, Reporting Services setup went fine, but whenever I look at the reports, they’re blank.  And I notice at the bottom of the page in IE it says “error on page”.  Never a good sign.


Double clicking on this error gets some errors, generally from the “rsproxy” page, which mean nothing to me…


I also got an error that parametersController was null or not an object.  Very helpful.  Googling this got me learning too much about Reporting Services without finding anything useful.

Then I saw this Citrix article about an older version of EdgeSight which told me the problem…

Basically, its a trailing slash in the Reporting Services URL.  In EdgeSight, I clicked Configure, then Reporting Services, Report Server, took the end slash off the URL, entered my password and clicked Save Changes.  The reports were recreated on the SQL box, which took a few minutes, I did an IISreset on the EdgeSight server and its all working – several weeks after I started trying! 

I like the fact this has been a known issue for Citrix since version 5.0 and the interface still doesn’t strip off any slashes at the end of the Reporting Services URL…

Thursday, 2 December 2010

Shadowing in XenApp 6

The ability of an administrator or helpdesk to shadow their users is about as basic as it gets – a system like XenApp used to distribute applications remotely is unlikely to be serving a group of people in one room.  Yet bizarrely this feature, hardly recent addition to Citrix’s offering, has had quite profound problems in XenApp 6.

Broadly, there are a couple of issues.  The first is the Citrix client – versions 11.2 and 12.0 of the online plug-in had serious problems regarding shadowing which have only just been fixed in v12.1, which I am now recommending for anyone who might shadow a user.  The second is the heady technology that is having two monitors.  Basically, it would appear shadowing was only ever tested on machines with a single monitor – either that or Citrix released XenApp 6 knowing it had a major broken feature.

In my initial test environment when I started evaluating XenApp 6 I was using the v11.2 client on a pair of PCs with two monitors each so you can understand my initial estimate was the shadowing was in fact completely impossible.

The Client bug

The v11.2 and v12.0 online plug-ins do appear to support shadowing – mostly.  But when it connects it often only displays part of the user’s screen, with the image clipped at the sides and no way of scrolling, and sometimes it just closes immediately with an Error 120 messagebox.  This was not limited to XenApp 6, I had it on an old Presentation Server 4.0 farm. Apparently there was a workaround to publish the admin console as a non-seamless application, though the v11.0 client usually worked and the new 12.1 client does too. 

Basically, upgrade the helpdesk users to 12.1 and the clipping issue should go away.

The Dual Monitors bug

Ah, the biggie.  Basically, if the user being shadowed OR the user doing the shadowing has more than one monitor, you cannot shadow their seamless applications.  Pretty basic, really. 

Shadowing from a PC with one monitor to one with two gives the useful error “Error 7044 – The request to control another session remotely was denied”:


This sounds like an access issue, but it isn’t.  Its been denied because its not possible.  If you shadow from a PC with two monitors to one with a single monitor you get the real error - “Error 120 – this function is not supported on this system”.  Because it isn’t.


I’ve raised this with Citrix – they say its a Microsoft issue with shadowing on 2008 R2.  I build a Server 2008 R2 Remote Desktop Services server hosting seamless applications through a web interface and it does indeed do exactly the same thing – sessions started on a PC with two monitors cannot be Remotely Controlled – you get told “Access is denied”.


imageNice. So I raise it with Microsoft Support who say this is “by design”, not a bug.  Though it might be “redesigned” in the future.  Its actually easy to fix on RDS:

  • On each RDS server, open “Remote Desktop Session Host Configuration”
  • Right click RDP-Tcp, select Properties
  • Select Client Settings
  • Change the maximum number of monitors to 1. 

Not much good if you specifically want a two monitor Terminal Services session, but it will work for seamless apps.  Anyway, the same fix does nothing for XenApp I’m afraid.

Enough of this nonsense.  These workarounds suggest themselves for XenApp 6 which will get shadowing possible in most cases:

  1. Make sure your admin people have the v12.1 online plug-in
  2. Publish your XenApp management tools as a Desktop, or even better as a non-seamless application.  This will get around problems caused by your helpdesk and admin staff having two monitors.  You can see instructions on how to force a single published application to be “windowed” rather than seamless here:  But basically you edit the conf\default.ica file in each site on your web interface box to include some extra lines, starting with the name of the published app in square brackets, such as:

    [XenApp Console]
  3. If a dual monitor user calls up and asks to be shadowed, tell them to close their Citrix applications, disable all but one monitor and launch them again!  Just kidding, though that would work…
  4. Ask said user to launch a published desktop which you have configured to be of a specific size – say 1024x768 or 90%.  If this has a Citrix client in it, they can launch apps there and you will be able to shadow the desktop and see its contents.
  5. Alternatively, get them to temporarily change their client to open all apps in a specific window size rather than seamless.  So, if they use the online plug-in, right click its icon, select Options, Session Options and select a Window Size:
    …or if they use the Web Interface, get them to go to Preferences, Session Settings and select the Window Size there instead:


The next session they start you should be able to shadow. 

This is, of course, all a bit rubbish.  Hopefully it will get fixed soon, whether its a Citrix or Microsoft fix.

UPDATE 20/05/2011

Thanks for the comments below – I had meant to update this entry anyway.  We did make some progress on this, though it wasn’t great.  We found that indeed Remote Assistance works fine, so have been using it on clients with two monitors.  We also found that the v12.0 client was rubbish for this as well (the XenApp sessions work initially when shadowed but then start flashing dramatically – this is fixed with a v12.1 upgrade).  At least the users could be shadowed, at least the ones on the network could.  Not much use for someone on a remote PC not on our LAN though.

The comment below about using Remote Assistance to the server session is interesting though.  I’m off to experiment now…