-   Linux - Software (
-   -   Display Settings (

sikandar 11-10-2006 06:51 AM

Display Settings
I am using Oracle Applications and the following settings I need to set each time the system reboots. I need this to automate so each time the system restarts the following settings should be automatic.

$ set DISPLAY=localhost:0.0
$ xhost +
$ export DISPLAY=localhost:0.0
$ xhost + localhost
localhost being added to access control list

Please guide me how it is possible.


Simon Bridge 11-11-2006 04:40 AM

And these are not being set in xorg.conf because... ?

Komakino 11-11-2006 10:36 AM

Put them in /etc/profile or /etc/environment or /etc/rc.local (or /etc/rc.d/rc.local)

matthewg42 11-11-2006 12:21 PM


Originally Posted by Komakino
Put them in /etc/profile or /etc/environment or /etc/rc.local (or /etc/rc.d/rc.local)

This from a person with an English lesson in their sig? :p

Komakino 11-11-2006 01:10 PM


Originally Posted by matthewg42
This from a person with an English lesson in their sig? :p

I don't believe my lesson covers conjunctions ;)

I tend to write things as I think of them...that list of 'ors' could have gone on even longer!

sikandar 12-01-2006 03:19 AM

Pl let me know in which section I should provide this informatio and in which format. I am also reading,

The file sections look like following,

Section "ServerLayout"
Identifier " Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"

Waiting for the reply.

Thanks to all of you for time and assistance.


Originally Posted by Simon Bridge
And these are not being set in xorg.conf because... ?

Simon Bridge 12-01-2006 05:47 AM

It's a puzzle since the DISPLAY environment variable is normally localhost:0.0 (Which is that Screen0 line in the conf.) by default. The only reason to see anything else is when you want to display to another machine on a network or you have multi-head enabled. Display :0.0 is the one in front of you... if the DISPLAY is set to anything else, you don't see zip.

So: what is the result of "echo $DISPLAY" before you run all those commands?
Perhaps it would help if we understood what you are acheiving with those commands?

You're reading will help for the x-server setup.

If you want that command set to run at each reboot, you should add them to a boot script. Though /etc/environment would appear a good bet.

sikandar 12-01-2006 07:07 AM

Required for oracle apps
I need to make these changes for Oracle Applications as after each restart these changes are manual to do. I have tried by putting in the following files but no gain,

/etc/profile or /etc/environment or /etc/rc.local

What I have to do is to execute these statements on the server console.

Still struggling.....


Simon Bridge 12-01-2006 11:59 PM


I need to make these changes for Oracle Applications as after each restart these changes are manual to do.
Yes, you said. But you havn't said what you are trying to acheive.

Have you installed the Oracle Applications server?
I've been unable to find any requirement to alter the dafault x configuration or alter any display environment variables for this installation.

Which distro are you doing this in? (Some distros are better for this than others ... i.e. SUSE has a special initialisation program to help you.)


I have tried by putting in the following files but no gain,
/etc/profile or /etc/environment or /etc/rc.local
... you've added the command lines to these files, but no joy? OK. I see:

What I have to do is to execute these statements on the server console.
You mean: the Oracle Applications Server Console or the RHEL-AS Server CLI-console? (Assuming that "Linux-AS" in your profile means RHEL-AS, and assuming this is what you are using?)

If the former, then I suppose the commands wouldn't do much in a linux boot script.

In post-install, the Oracle Server Administrators Manual suggests modifying some environment variables in order for everything to work.

Specifically, it wants DISPLAY set to hostname:display.screen ... which is usually the default behavior.

This is why I asked you to supply the output of "echo $DISPLAY" after you have booted. I'm expecting it to say ":0.0" ... which is already what you need (assuming your hostname is "localhost").

And it is why I need to know what behavior you get after running all those commands that you don't get if you do not.

Oh - BTW - the command you should be sticking in the boot script is probably "export DISPLAY=$HOSTNAME:0.0" ...

sikandar 12-04-2006 10:38 PM

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.

Pl let me know if any problem in downloading the document.

Here is the metalink note,

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.

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:

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

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:


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 in the iAS release notes (Note 146652.1)
or section 12.22 in the iAS release notes (Note 139837.1)

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.

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.

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:
- 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 (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 report=test.rdf userid=username/password@db destype=file desname=test.html desformat=html batch=yes

where 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


Simon Bridge 12-06-2006 10:49 PM

OK then - the linux command to set the display variable is

export DISPLAY="localhost:0.0"

When RHEL-AS starts, this is the default screen - unless it is a headless setup, where there is no screen.

echo $DISPLAY from cli in linux?

Id the "oracle user" a linux user named "oracle" which you login to via gdm or kdm? Or do you run an application to start "oracle" which provides you with an additional login prompt?

I didn't find anything in the thread you linked to which related to this topic. Unless you mean the documentation that was linked from that discussion?

However, according to the comments in your last post, the place to set the x display is in the reports60_server startup script. So whenever this server starts, it will set the x display appropriately.

sikandar 12-10-2006 11:40 PM

I am able to get results when I am giving statements in the terminal after logging in as Oracle user. What I want to achieve is that I should get it automated so I am putting these lines in the .bash_profile of oracle user.

export DISPLAY="localhost:0.0"
xhost + localhost

The DISPLAY settings are ok but seems in bash profile xhost is not working. As I am getting the following error,

Xlib: connection to "dbserver:0.0" refused by server
Xlib: No protocol specified

But when I am giving xhost + localhost from terminal then there is no error. So let me know where I can make xhost settings permanent or in any profile so this should not require any manual interference on the server.


Simon Bridge 12-11-2006 04:42 AM

xhost is a utility that adds a host to the list of hosts permitted access to the x server. xhost + localhost adds "localhost" to the list. (localhost is prsumably the hostname of the machine you are working at... oracle@localhost?)

You get the error because, when the .bash_profile script executes, it dosn't have access to the dbserver. Have you placed the instruction in the right place? Where is the reports60_server startup script?

All times are GMT -5. The time now is 08:12 PM.