Citrix Workspace Command Line



This section describes the components that make up Citrix Workspace app for Linux and describes how developers can configure the client. Typically, such configuration may be required when the user interface of Workspace app for Linux is being replaced with a custom version

About Citrix Workspace app for Linux¶

Citrix XenServer is Linux based so in the command line you can use Linux commands like ls-l or mount. But it also has its own command lines starting with XE. This blog will include those command lines and the PowerShell commands. You can also use the Citrix Receiver Commandline Helper Toolto help you to build the exact command line syntax. This tool has not yet been renamed to Citrix Workspace app Commandline Helper Tool. It is difficult for me to tell you exactly which command line switches (= parameters) you should use. This all depends on your environment.

Citrix Workspace app for Linux is a Linux application that provides access to a session running on a server. When the connection to the server is established, the user can access desktops and applications, and work with files in a way similar to working on a local computer.

Citrix Workspace app for Linux displays the session on the Linux workstation screen, and is fully integrated with other Linux X applications. The workstation’s mouse and keyboard can be used with applications in the usual way, and the user can set up key mappings to enter PC keys that are interpreted locally on the workstation.

Generally, the features in Citrix Workspace app are performed by software, but it is possible to configure certain Citrix HDX features to take advantage of hardware or your own optimized implementation.

Components used by Citrix Workspace app for Linux¶

Citrix Workspace app for Linux contains the following files:

  • selfservice - This program replaces the configuration manager, wfcmgr, and allows access to Citrix StoreFront or Program Neighborhood Agent services through the new self-service user interface (UI).
  • storebrowse - This program is equivalent to the deprecated pnabrowse utility. It queries StoreFront or Program Neighborhood Agent services for virtual desktops and published applications and allows access to them.
  • wfica - This program is the client engine that creates connections to the server and performs all of the functions of the connections.
  • Configuration files - These files are designed like Windows .ini files and provide configuration information. The default files are located in the $ICAROOT/config/ directory. A user’s .ini files are located in $HOME/.ICAClient.
  • Keyboard mapping files - These files store the key mappings that allow Workspace app for Linux to interpret keystrokes made on keyboards of various types and layouts.
  • Library files - These shared library files control specific Workspace app for Linux features such as security and smart card support.
  • Background processes (daemons) - These provide functionality for several features such as StoreFront authentication, StoreFront connection, and USB redirection.
  • Helper processes - These run when features such as HDX MediaStream Windows Media Redirection are active.
  • Utilities - These are occasionally useful for checking system compatibility (hdxcheck.sh) or collecting information for Citrix Technical Support (lurdump), or installing new certificates (ctx_rehash).

Command line utilities¶

storebrowse replaces pnabrowse. The latter is still available and is documented as part of this release, but it is deprecated and does not support the new features in this release. Citrix does not recommend using pnabrowse, unless necessary, to create or customize connections.

icabrowse is no longer available and is not documented as part of this release.

Authentication Manager¶

Authentication Manager (AM) is a background process for Citrix Workspace app that manages credentials with StoreFront.

A StoreFront server can at any time request credentials, which can take many forms. Authentication Manager is a long-lived daemon process that runs on the user device and is responsible for communicating with StoreFront. Authentication Manager can launch helper processes, when needed, to gather credentials from user input using the UI Dialog Library. The Service Record daemon manages the relationship between stores and Authentication Manager by supplying the latter with configuration information.

Storebrowse and selfservice communicate with Authentication Manager using a proprietary protocol.

Related components¶

Citrix Workspace app deployments involve other Citrix components. These typically include XenDesktop, XenApp, StoreFront (which replaces Web Interface as the mechanism for publishing applications), and Secure Gateway or NetScaler® Gateway. Configuring and customizing these related components is not covered in this document. For information on each, see the Product Documentation site.

A few weeks ago I wrote a blog about scripting Citrix PVS. In this blog I will show the most popular commands for Citrix XenServer so that you can use them in your Automation Workflow. Because as always; AUTOMATE EVERYTHING! Citrix XenServer is Linux based so in the command line you can use Linux commands like ls-l or mount. But it also has its own command lines starting with XE. This blog will include those command lines and the PowerShell commands. To get PowerShell working with Citrix XenServer you need to download and install the XenServer SDK from here under the Development Components section

To install the PowerShell SDK you need to copy the PowerShell Module folder from the zip to $env:windirsystem32WindowsPowerShellv1.0Modules To enable the module use the following command: Import-Module XenServerPSModule

Connect to XenServer

PowerShell:

Command line

Open a SSH connection with Putty or use the console tab in XenCenter.

New VM

PowerShell:

From Windows 2016 64Bit Template:

PowerShell:

Command Line:

xe vm-install template=Windows Server 2016 (64-bit) new-name-label=NEWVM

Delete VM

PowerShell:

Command Line:

Xe vm-list name-label=VMNAME

Copy VMUUID

xe vm-destroy uuid=VMUUID

Change VM Specs

Citrix Workspace App Command Line

PowerShell:

Enlarge RAM en vCPU

Dicrease vCPU and RAM

Command Line

Change RAM

Xe vm-list name-label=VMNAME

Copy VMUUID

xe vm-memory-limits-set uuid=VMUUID static-min=2GiB static-max=2GiB dynamic-min=2GiB dynamic-max=2GiB

Add more vCPU’s

Xe vm-list name-label=VMNAME

Copy VMUUID

xe vm-param-set uuid=VMUUID VCPUs-max=4 VCPUs-at-startup=4

Remove vCPU’s

Xe vm-list name-label=VMNAME

Copy VMUUID

xe vm-param-set uuid=VMUUID VCPUs-at-startup=2

xe vm-param-set uuid=VMUUID VCPUs-max=2

Add Disk to VM

PowerShell:

Command Line

xe vm-list name-label=VMNAME

Copy VMUUID

xe sr-list name-label=”Local storage”

Copy Storage UUID

xe vdi-create sr-uuid=STORAGEUUID name-label=Disk01 type=user virtual-size=20GiB

Output is DISKUUI

xe vbd-create vm-uuid=VMUUID device=1 vdi-uuid=DISKUUID bootable=false mode=RW type=Disk

Change VM Description

PowerShell:

Command line:

Xe vm-list name-label=VMNAME

Copy VMUUID

xe vm-param-set uuid=VMUUID name-description=”DISCRIPTION”

Export VM

PowerShell:

Command Line:

Mkdir /mnt/Export

mount -t cifs //server/share -o username=UserName,password=myPassword /mnt/export

xe vm-export vm=VMNAME filename=/mnt/export/Export.xva

Create Snapshot

Citrix Workspace Command Line

PowerShell:

Command Line:

xe vm-snapshot vm=VMName new-name-label=SNAPSHOTNAME

Delete Snapshot

PowerShell

Command Line:

xe snapshot-list name-label=SNAPSHOTNAME

Copy Snapshot UUID

xe vm-destroy uuid=SNAPSHOTUUID

Start VM

Citrix Workspace Command Line Helper

PowerShell:

Command Line:

xe vm-start vm=VMName

Stop VM

PowerShell:

Command Line:

xe vm-shutdown vm=VMName

Reboot VM

PowerShell:

Command Line:

xe vm-reboot vm=VMName

Get VM List

PowerShell:

Command Line:

xe vm-list

Get Template List

PowerShell:

Command Line:

xe template-list

Get Snapshot List

PowerShell:

Reset Citrix Workspace Command Line

Command Line:

Citrix Workspace Command Line Options

xe snapshot-list

Citrix Workspace Command Line Helper

I hope this was informative. For questions or comments you can always give a reaction in the comment section or contact me: