Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

To Create a Client Window Control

A client window control is an application window embedded in the Front Panel. For example, you can put a system load meter in the Front Panel by creating an xload client window control.

  1. Define the control.

    Use these fields to define the control's behavior:

    • TYPE: Set to client.

    • CLIENT_NAME: Specifies the client to be started.

      The value of CLIENT_NAME must match the first string (res_name) in the WM_CLASS property on the application's top-level window. For more information, see the xprop(1) man page.

    • CLIENT_GEOMETRY: Specifies the size, in pixels, needed for the client's Front Panel window.

      The xwininfo(1) man page describes how to find out the size of a window in pixels.

  2. Choose Restart Workspace Manager from the Workspace menu.

  3. Start the client from a terminal emulator command line.

    For example, the following control displays a 30 × 20 pixel load meter.

    CONTROL LoadMeter
     {
     	TYPE							client
     	CONTAINER_NAME				Top
     	CONTAINER_TYPE				BOX
     	CLIENT_NAME					xload
     	CLIENT_GEOMETRY			30x20
     }

    If the client is not saved and restored between sessions, you may want to configure the control to start the client when the user clicks it. For example, you can configure the LoadMeter control to start xload by adding the following line to the definition:

    PUSH_ACTION				StartXload

    and creating the action:

    ACTION StartXload
     {
     	WINDOW_TYPE				NO_STDIO
     	EXEC_STRING				/usr/contrib/bin/X11/xload
     }