After restart the echo $DISPLAY shows no result but after settings it shows localhost:0.0 which is requirement. I want it to be default even after restart of server. What I have to do is to login as oracle user after each restart and then set these settings.
Well the detail of setting the display variable I had documented in the following document. Just view the topic 12 in which it is explained.
http://www.erpstuff.com/topic.asp?TOPIC_ID=16
Pl let me know if any problem in downloading the document.
Here is the metalink note,
PURPOSE
========
The purpose of this document is to:
- provide information on how to resolve the REP-3000 error.
- explain why the DISPLAY environment variable is required when
running Reports on UNIX machines.
- describe the history behind this problem.
- give hints on how to troubleshoot problem.
- include a comprehensive summary of various scenarios which may
result in a REP-3000 error.
SCOPE & APPLICATION
====================
Intended Audience: Developers, System Administrators, Consultants
Most of the information in this note is based on Oracle Reports 6i, but
there will be some version-specific items included, i.e. Reports 9i,
Reports 2.5.x, even though some of the versions are no longer supported.
Bear in mind that support for Reports versions prior to Reports 6i (6.0.8.x)
is limited to known issues and migration.
This note is broken up in the following sections:
I. PROBLEM DESCRIPTION
II. SOLUTION
III. EXPLANATION
IV. HISTORY
V. TROUBLESHOOTING:
VI. SCENARIOS WHERE YOU MAY ENCOUNTER REP-3000
1. Reports Version-Specific Issues
2. Oracle Forms Related Issues
3. Oracle Applications Related Issues
4. NLS_LANG Related Issues
5. OC4J Issues
6. General Issues
I. PROBLEM DESCRIPTION
=======================
Running a report using Reports Runtime (rwrun60), using Reports Builder
(rwbld60), using Reports Server Client (rwcli60), accessed over the Web
(rwcgi or rwservlet), or called from Oracle Forms results in the following error:
REP-3000: INTERNAL ERROR STARTING ORACLE TOOLKIT
II. SOLUTION
============
You must set the DISPLAY environment variable to a valid X Windows session.
If you are running report using rwrun60, you need to set DISPLAY in the same
session that you invoke rwrun60. If you are running report through the
Reports Server (Services) using rwcli60 or on the web, then you need to
ensure that the Reports Server (Services) is started from the session that
has a valid DISPLAY environment variable.
Syntax to set the DISPLAY environment variable:
C Shell
---------
% setenv DISPLAY <hostname>:0.0
Bourne or Korn Shell
--------------------------
$ DISPLAY=<hostname>:0.0;export DISPLAY
NOTE: you may use <ip_address>:0.0 instead of <hostname>:0.0.
You have 2 options to enable your Reports Server (Services).
Option 1
---------
You will need to setup the DISPLAY environment variable to point to an active
X Windows. This means:
1. reconfiguring your Unix server to have an active xterm session.
2. using the IP Address of your PC with X-emulation, e.g. Exceed or X-Reflection.
Please note that the use of PC based X-emulation is not supported. See Note 2056834.6.
3. finding a Windows printer server that is always up and use its IP Address.
In cases 2 & 3, you do not have to be connected to the server, just have the
PC running and available on the network.
Option 2
---------
If you do not want to run a full-blown X-Windows, then you may use the
freeware X server VNC.
Information on how to use VNC is included in:
section 1.5.7.1.6 in the iAS 1.0.2.2 release notes (Note 146652.1)
or section 12.22 in the iAS 1.0.2.1 release notes (Note 139837.1)
III. EXPLANATION
===============
In order to run bitmapped reports, the engines spawned by the Oracle
Reports Server (Services) need to have access to an appropriate
windowing system. On Windows platforms this is a non-issue, but on
non-Windows platforms this means that a valid X Windows session must
be available.
If the DISPLAY environment is not set correctly for the Reports Server
on UNIX platforms, issuing any command to run a report results in the
REP-3000 error.
IV. HISTORY
===========
Setting the DISPLAY to a valid X Windows session is a REQUIREMENT
and has always been a requirement. It is NOT a bug. It provides a
fundamental capability that Reports requires for font metrics and
rasterization, image manipulation and conversion, etc. This is not
just specific to Oracle Reports. All UNIX-based machines require an
X-Windows and Motif environment to run any GUI-based product. A
long time ago, there was a special character mode executable that
did not require X Windows when doing only character mode reports.
However, this is no longer the case.
V. TROUBLESHOOTING
===================
Take the following steps to help you troubleshoot REP-3000 errors:
1. First, test the integrity of DISPLAY by issuing "xclock" command.
- Login to the machine where Reports Server is installed.
- From the UNIX command prompt, set the DISPLAY to a valid
X Windows session:
setenv DISPLAY <hostname>:0.0
- Ensure that DISPLAY was set correctly:
echo $DISPLAY
- Type command "xclock"
If you see a clock come up, then the DISPLAY is set correctly.
If you do not see the clock, then DISPLAY is not set to an active Xterm.
You must have xclock working before running any reports.
Another way to test whether an X server is running on given machine
and you have permissions to connect to it, you can use the following command:
xterm -display <hostname>:0.0
If you do not have permissions to access the display or if there is no
such display running on the given machine, an error similar to the
following is displayed:
Xlib: connection to "<hostname>:0.0" refused by server
Xlib: Client is not authorized to connect to Server
xterm Xt error: Can't open display: <hostname>:0.0
2. If the error occurs when running report on the Web, then you need
to first test it using Reports Runtime on the machine where your Reports
Server is running. Steps:
- Set DISPLAY to a valid X Windows session
- Run report using sample syntax:
rwrun60 report=test.rdf userid=username/password@db destype=file desname=test.html desformat=html batch=yes
If rwrun60 works, go to step 3.
If rwrun60 does not work, then:
- Re-check your DISPLAY environment variable
- Go back to step 1 and test the integrity of DISPLAY
- Review Section VI (below) to see if any of the scenarios
match your situation.
- If nothing else works, then try to relink Oracle Reports executables.
See Note 154512.1 for details.
3. Test it using rwcli60. Steps:
- Set DISPLAY to valid X Windows either in the reports60_server
startup script, or in reports60.sh (if you are manually starting
up the reports server using rwmts60)
- Restart the reports server with this DISPLAY set
- Run report using sample syntax:
rwcli60 server=repserver.world report=test.rdf userid=username/password@db destype=file desname=test.html desformat=html batch=yes
where repserver.world is the name of your reports server services.
If rwcli60 works, go to step 4.
If rwcli60 does not work, then:
- Check the DISPLAY setting in the script that you used to start
up the reports server. Most likely, you used the reports60_server
script which is located in Reports 6i Oracle_Home.
- Review Section 6 (below) to see if any of the scenarios match
your situation.
4. If rwrun60 and rwcli60 work, then the problem is in the CGI or Servlet
setup, and not the Reports Server Services.
For CGI setup, the DISPLAY needs to be set in the CGI shell script, and/or
the 6iserver.conf file. This is found under the Reports 6i Oracle_Home in
the conf directory (e.g. /u01/app/oracle/product/ias/6iserver/conf)
Edit the 6iserver.conf to read:
.
# Forms and Reports CGI needs to have ORACLE_HOME set
SetEnvIf Request_URI "rwcgi60" ORACLE_HOME=/u05/app/oracle/product/iAS9i/6iserver
SetEnvIf Request_URI "rwcgi60" DISPLAY=<hostname>:0.0
Thanks