Citrix XenApp

Your Journey towards cloud.

Virtualization Picking up Speed

Are your Skills keeping up? Skill up. Be Relevant

Are you a System Admin

Learn Citrix XenApp, Its future.

Citrix XenApp

Industry-leading virtualization platform for building cloud.

Cloud Computing in Demand

Learn how to build cloud on Citrix XenApp.

Thursday, 1 March 2012

Auto Deletion of Temporary Folder

You can set the computer to delete automatically your files in temporary folder. 
To do that click Run from start menu and type gpedit.msc 
and click OK. 
And select Computer Configuration/Administrative Templates/Windows Components/Terminal Services/Temporary Folder.
Then right click "Do Not Delete Temp Folder Upon Exit
Go to properties and select disable

Allow Remote Control To Your Desktop On Ubuntu

Enabling remote desktop mode is extremely easy on Ubuntu since Dapper. You can allow other users to access your desktop using the VNC Viewer utility that is bundled with Ubuntu, or offered as a free download for Windows.
Note that enabling remote control of your desktop is never a safe thing to do unless you have a firewall installed and configured correctly, and even then is still a potential security problem. Now that you’ve been warned of the risks, let’s move on.
Navigate to the System \ Preferences \ Remote Desktop on the Gnome top menu.
You’ll see this window:
The first two checkboxes need to be checked in order for remote desktop to be enabled.
The Security section is important: If you select the “Ask you for confirmation” code, then you will need to be at the computer in order to allow the other person to access your desktop. If you are trying to remotely access one of your own computers, you will want to uncheck this box.
The second checkbox should always be checked, and you should enter a secure password. You will be prompted for this password when you try to log on.

Tested on: Ubuntu Dapper Drake, Ubuntu Edgy Eft

Saturday, 11 February 2012

Memory/CPU Optimization in Citrix

Citrix Presentation Server 4.0 introduced two resource optimization features that help increase scalability by as much as 25% and ensure a smoother user experience. These two features, memory optimization and CPU optimization, are distinct and function in unique ways. Memory and CPU optimization are not enabled by default.

Memory Optimization

When an application starts, the operating system maps application DLLs to the base memory address space. The default base memory address of applications is 0x10000000. Memory optimization works by redirecting the base memory address of applications to an alternate location. When multiple applications start and try to write to this base memory address and find it already in use, they must be relocated elsewhere. In doing so, the module code must be modified and produces a performance hit on application initialization time.With memory optimization invoked, the base memory addresses of installed applications are rebased at a predefined interval. This means that the base memory address is altered, and as such, the applications are relocated to another address automatically during initialization. The end result is that applications load faster because intermediate redirection.


During the predefined memory rebasing interval, a safe memory base address is calculated and designated. Thus, the 0x10000000 address is altered. The memory rebasing interval is set within the server farm properties, and should be scheduled during times of minimal use. Options are: startup, daily, weekly, or monthly. By default, the files listed in the HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SFO\ProcessExclusionList registry key are excluded from rebasing. Additional applications can be excluded from memory rebasing by being added to the exclusion list within farm properties memory optimization. Once added in the GUI, they will also be added to this registry key. The repair.sfo file includes the files that have been rebased, and the timestamp of the rebased DLLs will be modified to reflect the approximate time of the rebasing interval.

Some applications cannot be rebased. These include applications with digitally signed components, DLLs protected by Windows Rights Management, and any executable that programmatically checks the DLL after it has been loaded. However, even if an application is not included on the exclusion list, it simply means that rebasing will be attempted but will not be successful. Since rebasing should be scheduled during a time of minimal server use, the resource impact of the attempted rebasing should not be noticeable.

Memory optimization is based on the Citrix Virtual Memory Optimization service. This Windows service scans loaded DLLs every 10 seconds to determine which DLLs have been relocated. By default, this service runs under the context of the local system account but can be modified within farm properties.

The graphic shown below shows that without memory optimization invoked, all applications attempt to write to the same base memory address space, whereas with memory optimization invoked, each application cleanly gets directed to a unique address space.

Without Memory Optimization Configured

 

 With Memory Optimization Configured

 

CPU Optimization
CPU optimization is based on Presentation Server reserving approximately 20% of the CPUs for automatic optimization. As a result, no single session controls the majority of CPU processing. However, CPU power can be borrowed from idle or inactive sessions but re-allocated when active again.

CPU optimization is based on two Windows services:

• Citrix CPU Utilization Mgmt/Resource Mgmt: Monitors users and processes, calculates load, and sets CPU priority.
• Citrix CPU Utilization Mgmt/ User-Session Sync: Ensures that user processes get associated with user to determine
load.

Impact to Architectural Designs

Invoking memory and CPU optimization is typically beneficial and should not have any noticeable negative impact. Memory optimization should be scheduled during a time of low or no usage. If an administrator is uncertain as to whether specific applications cannot take advantage of this feature, they should not be added to the exclusion list. Only those applications which have known issues based on the criteria described above should be placed on the exclusion list. Because CPU optimization uses approximately 20% of the CPU processing power, older servers with limited CPU resources may not have sufficient CPU to support this feature.

Considerations

As part of the application testing process, memory and CPU optimization should be tested to ensure that there is no adverse impact to the environment.

The impact of memory and CPU optimization can be viewed in standard Access Suite Console reports. In addition, CPU utilization can be viewed within the new Citrix CPU Utilization Mgmt User object, which can be accessed via Resource Manager or Performance Monitor. This object includes the following counters: CPU entitlement, CPU reservations, CPU shares, CPU usage, and long-term CPU usage.

Friday, 10 February 2012

Making Virtual IP Addresses Available to Applications in Citrix

Some applications, such as CRM and CTI, use an IP address for addressing, licensing, identification, or other purposes and thus require a unique IP address or a loopback address in sessions. Other applications may bind to a static port, which, because the port is already in use, causes the failure of multiple attempts to launch an application in a multiuser environment. For such applications to function correctly in a XenApp environment, a unique IP address is required for each device.

Use the virtual IP address feature to assign a static range of IP addresses to a server and have these addresses individually allocated to each session so that configured applications running within that session appear to have a unique address.

Processes require virtual IP if either:
  • They use a hard-coded TCP port number, or
  • They do both of the following:
    • Use Windows sockets, and
    • Require a unique IP address or require a specified TCP port number
Also, this feature lets you configure applications that depend on communication with localhost (127.0.0.1 by default) to use a unique virtual loopback address in the localhost range (127.*).
Processes require virtual loopback if either:
  • They use the Windows socket loopback (localhost) address (127.0.0.1), or
  • They use a hard-coded TCP port number
If the application requires an IP address for identification purposes only, configure your server to use the client IP address.

How Virtual IP Addressing Works

The virtual IP Address feature works as follows:
  • During IMA startup, the virtual IP address assigner binds the assigned IP addresses to the NIC that matches the same subnet as the virtual addresses.
  • When the virtual IP feature is enabled on a specific server, the virtual IP address allocatorallocates all new sessions connecting to the server an address from   the  pool of available addresses that were assigned by the virtual IP address assigner.
  • Each new session is allocated an address that is removed from the pool of available addresses. When the session logs off, the allocated address is returned to the available address pool.
  • After an address is allocated to a session, it uses the allocated virtual address rather than the primary IP address for the system whenever the following calls are made:
    Bind¸closesocket¸connect, WSAConnect, WSAAccept, getpeername,
    getsockname, sendto, WSASendTo, WSASocketW, gethostbyname,
    gethostbyaddr, getnameinfo, getaddrinfo
Note: All processes that require this feature must be added to the Virtual IP Process list. Child processes do not inherit this functionality automatically. Processes can be configured with full paths or just the executable name. For security reasons, Citrix recommends that you use full paths.
 
To make virtual IP addresses available to aplications running in sessions

Use virtual IP addresses to provide published applications with unique IP addresses for use in sessions. This is especially important for Computer Telephony Integration (CTI) applications that are widely used in call centers.
Users of these applications can access them on a XenApp server in the same fashion that they access any other published application.

To assign virtual IP address ranges, you must have a reserved range of static IP addresses to assign to the server. Work with your network administrator to obtain a list of free addresses that are not part of your DHCP pool. Ensure that you do not include broadcast addresses.
Before assigning virtual IP address ranges, determine the maximum number of users you may have connecting concurrently to the server. Because every session connecting to the server is assigned an IP address (not just sessions launching the application that require virtual IP addresses), assign at least as many static IP addresses to the server as the maximum number of users who may be connecting concurrently to that server.
 
Note: In the event more sessions are launched on a server than IP addresses are available, the server displays the error message: “No virtual IP address is available for this session, please contact your administrator.” The inability of the server to assign a virtual IP address to a session does not prevent the user from launching an application that requires a virtual IP address within the session; however, the application may not function correctly.
  • At the farm level, configure virtual IP address ranges and assign them to servers.
  • Enable applications to use virtual IP addresses.
In addition to configuring virtual IP address ranges and enabling applications for use with virtual IP addresses, this feature can control and monitor virtual IP addresses available from each server.
 
To determine whether an application needs to use virtual IP addresses

Some applications cannot run in multiple sessions on XenApp. For example, if the application binds to a fixed TCP port on a specific IP address such as 0.0.0.0 or 127.0.0.1, this prevents multiple instances of the application from running in multiple sessions because the port is already in use. The virtual IP feature of XenApp can help solve this problem.
To determine whether or not the application needs to use virtual IP addresses:
  1. Obtain the TCPView tool from Microsoft. This tool lists all applications that bind specific IP addresses and ports.
  2. Disable the Resolve IP Addresses feature so that you see the addresses instead of host names.
  3. Launch the application and, using TCPView, note which IP addresses and ports are opened by the application and which process names are opening these ports.
To use the virtual IP address feature, configure any processes that open the IP address of the server, 0.0.0.0, or 127.0.0.1. To ensure that an application does not open the same IP address on a different port, launch an additional instance of the application.

Thursday, 9 February 2012

Citrix Access Gateway

Citrix Access Gateway is a secure application access solution that provides administrators granular application-level policy and action controls to secure access to applications and data while allowing users to work from anywhere. It gives IT administrators a single point of control and tools to help ensure compliance with regulations and the highest levels of information security across and outside the enterprise. At the same time, it empowers users with a single point of access—optimized for roles, devices, and networks—to the enterprise applications and data they need. This unique combination of capabilities helps maximize the productivity of today's mobile workforce.

How Access Gateway works

Citrix Access Gateway is a secure access solution that provides administrators with application control while empowering users with access from anywhere. With flexible deployment options and a single point of management, IT administrators set policies—based on roles, devices, and networks—to control access and user actions, ensuring better security and compliance management.

Identify device, user, and location

When users attempt to connect to corporate resources, Access Gateway collects and verifies information including client device configuration, user identity, and network location to ensure compliance with security policies and to optimize the user experience.

Establish a secure, accelerated connection

Access Gateway establishes an encrypted connection between the client and datacenter to ensure desktops, applications, e-mail, and other resources are securely accessed from anywhere. Access Gateway also works with Citrix Branch Repeater to accelerate each connection and deliver a high-performance experience.

Adapt access and application actions

Once a session is established, information collected about the connecting device, user, and location dynamically
adapts the level of access and available actions. This ensures that the data needed is delivered to users in the most secure manner according to their particular access scenarios.

Monitor sessions in real time and reconnect as users roam

Access Gateway monitors active connections in real time to detect when a user roams between networks or moves between devices. When this occurs, Access Gateway transparently reconnects the session and dynamically adapts access and available actions to ensure security as the user's access scenario changes.

Wednesday, 8 February 2012

XenApp Content Redirection

I see a lot of people struggling with content redirection. The issues that people normally have are understanding what it is, how it works, and it’s limitations. Hopefully this blog post will clear it up.

What it is

Content redirection is a XenApp technology which, as the name implies, allows content to be passed from either the client to the server, or from the server to the client.
In real terms – for client to server – this is the ability to double-click a document on the client and have this open using a XenApp hosted application; for server to client it is the ability to click on a URL within a XenApp session and have it open using the local browser on the client.
Out of the box this is content redirection. Nothing more is supported. You cannot:
    • Use any proxies on the client. By this I mean things like right clicking on a file, selecting Send To and have it open a hosted version of Outlook and attach the file to a new message. This will not work.
    • Redirect anything from Server to Client Except URLs. E.G Double clicking a .xls file in your XenApp session and having it open in Excel on the local client
How it works
Client to Server

Provided you have everything configured correctly, when you authenticate to the Online Plug-in it will pull down the File Type Associations you have configured for a published application and write these into the client registry. Now any file that is associated with the XenApp hosted app will launch a connection to a XenApp server when double clicked. Once the application is launched on the XenApp server the file will be opened in the published application.

The Online Plug-in updates the HKEY_CLASSES_ROOT portion of the registry. If you look at one of your application file extensions before being logged into the Online Plug-in you will see that it points to local version of the application



And once logged into the Online Plug-in it now points to the XenApp version of the Application.



If you’re wondering what VisioViewer.Viewer and ctx.VISIO.DRAWING.11 refer to, if you scroll further down in HKEY_CLASSES_ROOT you will find registry keys with the same name, drill down into Shell–> Open–> Command and you will find the path to the executable that is to be launched. In the case of content redirection it looks something like this

“C:\Program Files\Citrix\ICA Client\pnagent.exe” /qlaunch “CXAPRD6:Visio 2010 Professional” /param:”\\client/%251”

This is the path to Online Plug-in, followed by the XenApp farm name (as configured on your Web Interface servers, not the actual farm name), the application name, and a parameter of \\client\%1. When the application is launched %1 get substituted for the path to the file that was double clicked.
You must have the following components for Client to Server Content Redirection to work:
    • Citrix Online Plug-in
    • Citrix Web Interface
    • Client Drive Mapping Enabled
    • Content Redirection Policies Enabled
You must have Client Drive Mapping enabled so that XenApp can make the call back to the client to open the file. If the file is located on a network share you must also have these mapped into the session as client drives. You do not need to make them visible though, as long as they are available through the client network in the background it will work.

Server to Client

Again, provided everything is configured correctly, when you click on certain URLs in a XenApp hosted Desktop or Application, it will be intercepted and passed back to the client. The default browser will be launched, if not running, and the URL will be opened in the browser on the client. If the client cannot open the URL, E.G if it has no route to the internet, it will pass it back to the server for it to be launched there.
The way that XenApp intercepts the URL is by overwriting the shell open command for the URL type, redirecting the call to its own version on Internet Explorer. The registry keys that do this are located under HKEY_CLASSES_ROOT and the I.E executable they point to is C:\Program Files (x86)\Citrix\system32\iexplore.exe

Looking at rtsp (which is one of the URL type than can be redirected) we can see what I have described above.



 You must have the following components for Server to Client Content Redirection to work:
    • Citrix Online Plug-in
    • XenApp Content Redirection Policy enabled
It will also only work with these URL types:
    • HTTP (Hypertext Transfer Protocol)
    • HTTPS (Secure Hypertext Transfer Protocol)
    • RTSP (Real Player and QuickTime)
    • RTSPU (Real Player and QuickTime)
    • PNM (Legacy Real Player)
    • MMS (Microsoft Media Format)

Configuration

Client to Server

Client to Server content redirection is configured by associating the file types with a Published Application. To do this, open the properties of the Published Application, and click on Content Redirection.



 If you are not seeing all the file types for your application this is because they may not yet be in the datastore. To pull the information from a server’s registry, right-click the server in the console select Other Tasks–>Update file types from registry. To pull FTA from all your servers right-click on the root of the farm and select Other Tasks –> Update file types. Bear in mind this is going to pull from all your server in the farm so if you have a large farm it may take a while.

Remember you must also configure Client Drive Mapping for Client to Server content redirection to work.

Server to Client

Server to Client Redirection is configured using XenApp Policies. The setting is located under User Configuration–> Policies–> Citrix Policies–> Policy Name–> ICA–> File Redirection–> Host to client redirection.

The following keys can be used to control Server to Client content redirection. These are taken from CTX113457, which does not specify XenApp 6 or 6.5 in the “Applies to section” but I have tested on both.

To configure file types that can be redirected, complete the following procedure:
Add the HKEY_LOCAL_MACHINE \SOFTWARE\Wow6432Node\Citrix\SFTA\DisableServerFTA registry key with the following values:
Name: DisableServerFTA
Type: REG_DWORD
Value: 1
Add the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\SFTA\NoRedirectClasses registry key with the following values:
Name: NoRedirectClasses
Type: REG_MULTI_SZ
Value: <Specify any combination of file type names that you would like to exclude from redirection.>
Note: These values are comma-delimited with no space in between the values.
To configure server to file redirection for specific URLs,
Add the HKEY_LOCAL_MACHINE \SOFTWARE\Wow6432Node\Citrix\SFTA\ValidSites registry key with the following values:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SFTA
Name: ValidSites
Type: MULTI STRING
Value: www.example.com
Note: Specify the required URLs in the Value field. The asterisk (*) is supported as a wildcard character.

Keyboard Shortcuts for VMware Workstation

VMware has a set of shortcut keys or hotkeys for quick control over your virtual machine. This is a list of them.
Ctrl+BPower on the Virtual Machine
Ctrl+DEdit the Virtual Machine Settings
Ctrl+EPower off the Virtual Machine
Ctrl+GGrab keyboard input focus
Ctrl+NCreate a new Virtual Machine
Ctrl+OOpen a Virtual Machine
Ctrl+PEdit User Preferences
Ctrl+RReset Virtual Machine
Ctrl+ZSuspend the Virtual Machine
Ctrl+F4Close the Virtual Machine
Ctrl+AltUngrab Input focus
Ctrl+Alt+Enter      Switch to Full Screen Mode
Ctrl+TabSwitch between ungrabbed virtual machines
Ctrl+Alt+TabSwitch between virtual machines