Storebrowse

Storebrowse is a lightweight command-line utility that interacts between the client and the server. Using the storebrowse utility, administrators can automate the following day-to-day operations:

  • Add a store.
  • List the published apps and desktops from a configured store.
  • Subscribe and unsubscribe apps and desktops from a configured store.
  • Enable and disable shortcuts for published apps and desktops.
  • Launch published applications.
  • Reconnect to disconnected sessions.

Generally, the storebrowse utility is available in the /util folder. You can find it under the installation location. For example, /opt/Citrix/ICAClient/util.

Prerequisites

The storebrowse utility requires the libxml2 library package.

Launch published desktops and applications

There are two ways to launch a resource:

  • You can use the command line and storebrowse commands
  • You can use the UI to launch a resource.

This article discusses storebrowse commands.

Command usage

The following section details the storebrowse commands that you can use from the storebrowse utility.

-a, –addstore

Description:

Adds a new store with gateway and beacon details along with the ServiceRecord daemon process. This command returns the full URL of the store. An error appears if adding a store fails.

Command example on StoreFront:

Command:

./storebrowse -a *URL of StoreFront or a PNAStore*

Example:

./storebrowse –a https://my.firstexamplestore.net

Note:

You can add several stores using the storebrowse utility.

-?, -h, –help

Description:

Provides details on the storebrowse utility usage.

-l –liststore

Description:

Lists the stores that you have added.

Command Example on StoreFront:

./storebrowse –l

-E –enumerate

Description:

Lists the available resources. By default, the following values appear:

  • Resource name
  • Display name
  • Resource folder

To view more information, append the -M (–details) command to the -E command.

Note:

When you run the -E command, an authentication window appears if you have not provided your credentials earlier.

Enter the entire store URL as reported by –liststore.

Command example on StoreFront:

  • ./storebrowse.exe –E https://my.firstexamplestore.net/Citrix/Store/discovery

  • ./storebrowse.exe –E –M https://my.firstexamplestore.net/Citrix/Store/discovery

-S –subscribed

Description:

Lists the subscribed resources. By default, the following values appear:

  • Resource name
  • Display name
  • Resource folder

To view more information, append the -M (–details) command to the -E command.

Command example on StoreFront:

  • ./storebrowse.exe –S https://my.firstexamplestore.net/Citrix/Store/discovery

  • ./storebrowse.exe –S –M https://my.firstexamplestore.net/Citrix/Store/discovery

-M –details

Description:

This command returns several attributes of the published applications. Generally, this command is used with –E and -S commands. This command takes an argument that is the sum of the numbers corresponding to the required details:

  • Publisher(0x1)
  • VideoType(0x2)
  • SoundType(0x4)
  • AppInStartMenu(0x8)
  • AppOnDesktop(0x10)
  • AppIsDesktop(0x20)
  • AppIsDisabled(0x40)
  • WindowType(0x80)
  • WindowScale(0x100)
  • DisplayName(0x200)
  • AppIsMandatory(0x10000)
  • CreateShortcuts(0x100000)
  • RemoveShortcuts(0x200000)

Notes:

  • To create menu entries for subscribed applications, use the CreateShortcuts(0x100000) argument with the -S, -s, and -u commands.

  • To delete all menu entries, use RemoveShortcuts(0x200000) with the -S command.

Command example on StoreFront:

./storebrowse.exe –S –M 0x264 https://my.firstexamplestore.net/Citrix/Store/discovery

where, 0x264 is the combination of DisplayName(0x200), AppIsDisabled(0x40), AppIsDesktop(0x20) and SoundType(0x4). The output lists the subscribed resources along with the details.

You can use the –M command for listing the resources with the required details:

./storebrowse.exe –E –M 0x264 https://my.firstexamplestore.net/Citrix/Store/discovery

Notes:

  • You can express the values in either decimal or in hexadecimal format. For example, 512 for 0x200.
  • When some of the details are not available through storebrowse, the output value is zero.

-s –subscribe

Description:

Subscribes the specified resource from a given store.

Command example on StoreFront:

./storebrowse –s <Resource_Name> https://my.firstexamplestore.net/Citrix/Store/discovery

-u –unsubscribe

Description:

Unsubscribes the specified resource from a given store.

Command example on StoreFront:

./storebrowse –u <Resource_Name> https://my.firstexamplestore.net/Citrix/Store/discovery

-L –launch

Description:

Launches a connection to a published resource. The utility then terminates automatically, leaving a successfully connected session.

Command example on StoreFront:

./storebrowse –L <Resource_Name> https://my.firstexamplestore.net/Citrix/Store/discovery

-i –icons

Description:

This command fetches desktop and application icons in PNG format. This command is used with the -E or the -S command.

To fetch icons of required sizes and depths, use the best argument or the size argument method.

Best argument

Using the best argument method, you can fetch the best-sized icons available on the server. You can later convert the icons to required sizes. The best argument method is the most efficient way to store, apply bandwidth, and simplify scripting. The files are saved in the <resource name>.png format.

Size argument

To fetch icons of specified sizes and depths, use the size argument method. An error appears if the server is unable to fetch icons of a given size or depth.

The size argument is of the WxB form, where:

  • W is the width of icons. All icons are square, so only one value is needed to specify the size.
  • B is the color depth. That is, the number of bits per pixel.

Note:

The value W is mandatory. The value B is optional.

If you leave the values unspecified, icons of all available image depths appear. The files are saved in the <resource name>_WxWxB.png format.

Both the methods save icons in the .png format, for each resource that the –E or the –S command returns.

Icons are stored in the .ICAClient/cache/icons folder.

Command example on StoreFront:

  • ./storebrowse –E -i best https://my.firstexamplestore.net/Citrix/Store/discovery

  • ./storebrowse –S -i 16x16 https://my.firstexamplestore.net/Citrix/Store/discovery

-W [r|R] –reconnect [r|R]

Description:

Reconnects the disconnected yet active sessions of the specified store. The [r] option reconnects all the disconnected sessions. The [R] option reconnects all the active and disconnected sessions.

Command example on StoreFront:

  • ./storebrowse –Wr https://my.firstexamplestore.net/Citrix/Store/discovery

  • ./storebrowse –WR https://my.firstexamplestore.net/Citrix/Store/discovery

-WD –disconnect

Description:

Disconnects all sessions of the specified store.

Command example on StoreFront:

./storebrowse –WD https://my.firstexamplestore.net/Citrix/Store/discovery

-WT –logoff

Description:

Terminates all sessions of the specified store.

Command example on StoreFront:

./storebrowse –WT https://my.firstexamplestore.net/Citrix/Store/discovery

-v –version

Description:

Displays the version of the storebrowse utility.

Command example on StoreFront:

./storebrowse –v

-r –icaroot

Description:

Specifies the root directory where Citrix Workspace app for Linux is installed. If not specified, the root directory is determined at run time.

Command example on StoreFront:

./storebrowse –r /opt/Citrix/ICAClient

-U –username, -P –password, -D domain

Description:

Passes the user name, password, and the domain details to the server. This method works only with a PNA store. StoreFront stores ignore this command. The details are not cached. You must enter the details with every command.

Command example on StoreFront:

./storebrowse –E https://my.firstexamplestore.net/Citrix/Store/discovery -U user1 -P password -D domain-name

-d –deletestore

Description:

Deregisters a store with the ServiceRecord daemon.

Command example on StoreFront:

./storebrowse –d https://my.firstexamplestore.net/Citrix/Store/discovery

-c –configselfservice

Description:

Gets and configures the self-service UI settings that are stored in StoreCache.ctx. Takes an argument of the <entry[=value]> form. If only an entry is present, the setting’s current value is printed. However, if a value is present, the value is used to configure the setting.

Command example on StoreFront:

./storebrowse –c SharedUserMode=True

-C –addCR

Description:

Reads the provided Citrix Receiver (CR) file, and prompts you to add each store. The output is the same as the -a command, but has more than one store, separated by new lines.

Command example on StoreFront:

./storebrowse –C <path to CR file>

-K –killdaemon

Description:

Terminates the storebrowse daemon. As a result, all credentials and tokens are purged.

Command example on StoreFront:

./storebrowse –K

-e –listerrorcodes

Description:

Lists the error codes that are registered.

Command example on StoreFront:

./storebrowse –e

-g –storegateway

Description:

Sets the default gateway for a store that is already registered with the ServiceRecord daemon.

Command example on StoreFront:

./storebrowse –g “<unique gateway name>” https://my.firstexamplestore.net/Citrix/Store/discovery

Note:

The unique gateway name must be in the list of gateways for the specified store.

-q, –quicklaunch

Description:

Launches an application using the direct URL. This command works only for StoreFront stores.

Command example on StoreFront:

.\storebrowse.exe –q <https://my.firstexamplestore.net/Citrix/Store/resources/v2/Q2hJkOlmNoPQrSTV9y/launch/ica> <https://my.firstexamplestore.net/Citrix/Store/discovery>

-n –nosingleshot

Description:

Always daemonizes the storebrowse process.

Command example on StoreFront:

./storebrowse –n

-F –fileparam

Description:

Launches a file with the file path and the resource specified.

Command example on StoreFront:

./storebrowse –F “<path to file>” -L <Resource Name> <https://my.firstexamplestore.net/Citrix/Store/discovery>

Workflow

This article demonstrates a simple workflow on how to launch an app using the storebrowse commands:

  1. ./storebrowse –a https://my.firstexamplestore.net

    Adds a store and provides the full URL of the store. Make a note of the full URL because it is used in the later commands.

  2. ./storebrowse.exe –E https://my.firstexamplestore.net/Citrix/Store/discovery

    Lists all the published apps and desktops. Enter your credentials using the popup that appears for the registered store.

  3. ./storebrowse –L <Resource_Name> https://my.firstexamplestore.net/Citrix/Store/discovery

    Launches the resource. Take the Resource_Name from the output of the previous command.

  4. ./storebrowse –K

    This command purges the credentials entered earlier and kills the storebrowse daemon. If you do not mention this command explicitly, the storebrowse process exits after an hour.