Saturday, August 25, 2007

X server

Configure an X server for Framework applications

To take advantage of the dynamic image generation support Framework applications require access to graphical capabilities on the middle tier. In practical terms this means you need to configure your Webserver to use an X server for dynamic gif generation.

X display servers can be broadly categorized into three groups

1. X display server from the OS Vendor
2. "Headless" X display server without video hardware (Xvfb and VNC )
3. Desktop X display server


Oracle software requires specific X display server settings. Oracle Toolkit, an internal component of Tools 6i, and the Installer orainst , require the following critical parameters to be set for all X display server software:

Option 2: Headless X display server - Xvfb or VNC

"Headless" X display servers provide the same services as the software in Options 1 & 3, however, these servers do not require video adapter hardware nor a monitor. These servers require the same settings for the default visual class, dpi and depth parameters as described in the introduction.

How to install and run Xvfb (X Virtual FrameBuffer)
Get the Xvfb binary. Some URLs are given below; alternatively, Xvfb can also compiled from the Xvfb source code available at http://www.x.org. As of April 2002, Xvfb binaries can be downloaded from these locations:
Solaris - Include with Solaris 9 and later. See Oracle TechNet for Solaris 2.6, 7 and 8
Linux - Included with most Linux distributions. Xvfb is also available as an RPM for RedHat and SUSE or from Xfree86.org
HPUX - HP patch PHSS_25277
AIX - Included with the operating system.
Tru64 - Included with the operating system; usually in /usr/bin/X11
Win32 - Not applicable.

On Solaris, verify that the all dynamically linked libraries can be resolved using the ldd command. On other platforms Xvfb is included with the OS and should already be properly configured:
% ldd Xvfb
This should display a list of resolved libraries as follows:
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1

Get a security policy file
A sample security policy file is included at the end of this document. The file is named SecurityPolicy.
If you have an existing file then add this line to the end of the policy file:
property WM_CHANGE_STATE WM_NAME ar

To run Xvfb use a command with the following format

Xvfb :x -screen 0 6x6x8 -pn -fp /lib/X11/fonts/misc -sp /tmp/SecurityPolicy
where
x is the desired display number. For instance 1 or 2.
fp points to the directory of the fixed font
sp points to the directory and filename of the security policy file
6x6x8 screen size works well for Reports and Graphics and minimizes the memory required by Xvfb

Set the DISPLAY environment variable to the value :x.0 or your_hostname:x.0 where x is the display number chosen when starting Xvfb. For example in Bourne shell:

DISPLAY=Xvfb_hostname:x.0; export DISPLAY

Start a window manager on the Xvfb display to automatically position windows.
twm &