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

To Set Display-Specific Resources

You can set display-specific resources for all desktop users on the system. Also, users can set display-specific resources limited to their own session. This enables you to specify resources depending upon which display the user uses to log in to the desktop.

    To set display-specific resources for all desktop users on the system, create the file /etc/dt/config/language/sys.resources that specifies the display-specific resources.

    To set personal display-specific resources, specify the resource in HomeDirectory/.Xdefaults.

    You delimit these resources by enclosing them in cpp conditional statements. A DISPLAY_displayname macro is defined depending upon the value of the $DISPLAY variable. This is done by converting all . (period) and : (colon) characters to _ (underscores), stripping off any screen specification, and finally prefixing DISPLAY_ to the result.

    For example, a $DISPLAY of :0 would be DISPLAY_0, and a $DISPLAY of blanco.gato.com:0.0 would be DISPLAY_blanco_gato_com_0. The resulting value can be used as part of a cpp test in a session resource file. For example, if in /etc/dt/config/C/sys.resources you specify:

    Myapp*resource: value
    #ifdef DISPLAY_blanco_gato_com_0
     Myapp*resource: specialvalue1
     #endif
    #ifdef DISPLAY_pablo_gato_com_0
     Myapp*resource: specialvalue2
     #endif

    the resource MyApp*resource will be set in RESOURCE_MANAGER to specialvalue1 when the user logs in on display blanco.gato.com:0; specialvalue2 when the user logs in on pablo.gato.com:0; and value when the user logs in on another display.