LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2006, 06:51 AM   #1
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Rep: Reputation: 30
Display Settings


Hi,
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.

Thanks
 
Old 11-11-2006, 04:40 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
And these are not being set in xorg.conf because... ?
 
Old 11-11-2006, 10:36 AM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Put them in /etc/profile or /etc/environment or /etc/rc.local (or /etc/rc.d/rc.local)
 
Old 11-11-2006, 12:21 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
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?
 
Old 11-11-2006, 01:10 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally Posted by matthewg42
This from a person with an English lesson in their sig?
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!
 
Old 12-01-2006, 03:19 AM   #6
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Original Poster
Rep: Reputation: 30
Pl let me know in which section I should provide this informatio and in which format. I am also reading,

http://www.freebsd.org/doc/en_US.ISO.../x-config.html

The file sections look like following,

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection


Waiting for the reply.

Thanks to all of you for time and assistance.


Quote:
Originally Posted by Simon Bridge
And these are not being set in xorg.conf because... ?
 
Old 12-01-2006, 05:47 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 12-01-2006, 07:07 AM   #8
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Original Poster
Rep: Reputation: 30
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.....

thanks
 
Old 12-01-2006, 11:59 PM   #9
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
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.)

http://www.oracle.com/technology/pub...ll.html#config

Quote:
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:
Quote:
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" ...
 
Old 12-04-2006, 10:38 PM   #10
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Original Poster
Rep: Reputation: 30
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

Last edited by sikandar; 12-04-2006 at 11:19 PM.
 
Old 12-06-2006, 10:49 PM   #11
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 12-10-2006, 11:40 PM   #12
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Original Poster
Rep: Reputation: 30
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.

Thanks
 
Old 12-11-2006, 04:42 AM   #13
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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?

Last edited by Simon Bridge; 12-11-2006 at 04:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with display settings thorney Linux - Newbie 4 09-18-2005 06:59 PM
x display settings... marsques Slackware 1 04-22-2004 02:03 PM
Display Settings Help. claudius753 Linux - Newbie 8 02-22-2004 10:15 AM
2.6.1 Display settings amw2320 Slackware 2 01-23-2004 08:23 PM
Display Settings admanis Linux - Software 4 04-07-2002 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration