System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to set a display variable

iinfi1
Super Advisor

how to set a display variable

Hi all,

we have oracle EBS 12.1.1 installed on suse linux servers in our setup. one developer is using dev tools to have some graphs displayed while generating reports. all of a sudden we find that the graphs are not getting generated.
i am told that it is because of the DISPLAY variable in Linux. I am working as a Linux admin and I am not too sure how to set it.
i went to the company's data center to get to the console of the Linux box. I logged into the GUI and ran these commands

linux-43x3:~ # echo $DISPLAY
:0.0
linux-43x3:~ # export DISPLAY=:0.0
linux-43x3:~ # xhost +
access control disabled, clients can connect from any host

since the display was showing :0.0, there sud not v been any issue in my opinion, but still i chose to run the export DISPLAY command.
still i find the graphs do not show up. should I run the command as root or should I run it as an apps user? and further if I log out of the GUI will the graphs still work?

12 REPLIES
Steven Schweda
Honored Contributor

Re: how to set a display variable

> [...] all of a sudden [...]

What changed?

> [...] using dev tools to have some graphs
> displayed [...]

That description does not tell me what you're
doing, what happened, or what you expected to
happen. Are you getting any error messages?

Have you tried using some simple X program,
like, say, xclock, instead of whatever "dev
tools" might be?

> [...] the console of the Linux box. [...]

I don't know what that is, either.

Are you using some kind of serial terminal or
terminal emulator, or are you sitting at some
kind of graphics-capable keyboard + mouse +
display?

> [...] if I log out of the GUI [...]

If I knew what you meant by being logged
into the GUI, then I might be able to answer.
iinfi1
Super Advisor

Re: how to set a display variable

well sorry for not being clear.

i had mentioned oracle ebs. so thought u wud understand.

what changed?
I am not sure what changed. I think someone at the data center logged out of the GUI. by GUI i mean the xwindows which comes up when we hit Alt+F7 while we sit on the Linux box itself.

By console I meant the terminal which we get if we sit on the machine where my linux is installed.
Steven Schweda
Honored Contributor

Re: how to set a display variable

> well sorry for not being clear.

So, be more clear? Answer the questions?

> i had mentioned oracle ebs. so thought u
> wud understand.

I'm not an Oracle EBS user.

> Have you tried using some simple X program,
> like, say, xclock, instead of whatever "dev
> tools" might be?

If I could get an answer to a question like
that, then I might know whether the problem
is somehow specific to the Oracle stuff
(about which I know nothing), or if it's a
more general problem (where my ignorance of
the Oracle stuff might matter little).

> Are you using some kind of serial terminal or
> terminal emulator, or are you sitting at some
> kind of graphics-capable keyboard + mouse +
> display?

Is that a hard question?

> by GUI i mean the xwindows which comes up
> when we hit Alt+F7 while we sit on the
> Linux box itself.

I don't use "Alt+F7" on my systems, but I can
imagine that you have some kind of X graphics
environment.

If you're running GUI stuff, then DISPLAY is
probably set correctly.

> By console I meant the terminal which we
> get if we sit on the machine where my
> linux is installed.

You know, if I were sitting there with you,
then I wouldn't need to ask these basic
questions. But I'm not, and, with my weak
psychic powers, I still do not know what
"the terminal" is.

> That description does not tell me what you're
> doing, what happened, or what you expected to
> happen. Are you getting any error messages?

As usual, showing actual commands with their
actual error messages can be more helpful
than vague descriptions (or no useful
information at all).
iinfi1
Super Advisor

Re: how to set a display variable

well ok ...
if u install SuSe Linux on a system you do get a GUI. I was mentioning about that GUI. In the GUI you also get a terminal window after you login as a user. Thats the termial.
Alt+F1 to F6 gives consoles and Alt+F7 gives you a GUI screen.
I am not using any terminal emulator.
In the GUI if I run xclock, it works perfectly.

But when users using Oracle developer try to get graphs on their browser, the get blank screens. One of the resolutions given by Oracle is set the DISPLAY variable correctly.

My question was whether I should set the display variable while I am logged in as root or as oracle apps user. It would not harm if I try both tomorrow morning, which I am going to do anyway. But I thought this was a very common issue and people here might understand it easily.
But once I set a DISPLAY variable is it necessary to keep the GUI on with the same user logged in? I dont know!
Steven Schweda
Honored Contributor

Re: how to set a display variable

> In the GUI if I run xclock, it works
> perfectly.

Ok.

> But when users using Oracle developer try
> to get graphs on their browser, the get
> blank screens.

Can the "users" run xclock, too?

"on their browser"? Is there some Web
browser involved here, too? If not, then
what's "their browser"?

"blank screens"? Whole screens are blank,
or browser windows are blank, or what?

> My question was whether I should set the
> display variable while I am logged in as
> root or as oracle apps user.

It depends on what you're doing, which is
still about as clear as mud. If you're
running any any X program on a system, and
displaying the results on an X server (which
could be on the same system or on a
different system), then you normally need to
set DISPLAY.

> [...] But I thought this was a very common
> issue and people here might understand it
> easily. [...]

It may be a very common problem, but I can't
understand your description of what you're
doing or of what happens when you do it.

> But once I set a DISPLAY variable is it
> necessary to keep the GUI on with the same
> user logged in?

A DISPLAY variable is a property of the
process (shell) where it was set. Different
users will be running different processes
(shells). In your situation, I don't know
who is sitting where, who is running what,
where he's running it, or almost anything
else which might be helpful.
iinfi1
Super Advisor

Re: how to set a display variable

Listen!!

if u dont understand a damn about what Oracle EBS is .. then why take the pains to answer? I have asked n number of questions here and occasionally tried to help. But I am not skillful enough to understand other users issues. hence I come here to gain knowledge.
Till date I have not seen any one try to understand how clear mud is. Probably you are an exception.
I have tried to be as clear as possible. Anyone with a remotest idea of how application servers work know I am talking about Apps users and not OS users!!!
Its disappointing that a person with 19k+ points speaks like this.
Its a Sunday and the WC Finals is on .. probably ur drunk or what i dont know. This is the worst experience I have had here ...
Steven Schweda
Honored Contributor

Re: how to set a display variable

> if u dont understand a damn about what
> Oracle EBS is .. then why take the pains to
? answer?

As you may recall, your question involved
setting a DISPLAY variable, which can be done
whether or not one is using Oracle EBS.

> I have tried to be as clear as possible.

It didn't work.

> This is the worst experience I have had
> here ...

And it's one of the most poorly posed
questions I've seen here, too. (And that
takes some doing.)

> As usual, showing actual commands with their
> actual error messages can be more helpful
> than vague descriptions (or no useful
> information at all).

Still true. Actually answering questions can
be helpful, too.

> [...] probably ur drunk [...]

Sober enough to spell "you're", though.

Re: how to set a display variable

Dear,

in our environment for oracle ERP what the thing we do is introducing VNC in application server end. (note : we are using HP-UX 11.23 not linux)

As Oracle EBS and ERP application server is very similar, using VNC may help you.

May be you need to add vnc module to your application.
iinfi1
Super Advisor

Re: how to set a display variable

@Mohammad Ashfaqur Rahman
I will try to check with the dba as to how that works.

@Steven Schweda
apologies for what happened last night. I thought you were way too rude. Probably becoz u have not worked on AS you felt my question was incomplete. We were simply not in the same page. forget this episode if possible. Apologies again.
iinfi1
Super Advisor

Re: how to set a display variable

hi,

we resolved it by changing display parameters at the application startup scripts
the same DISPLAY=:0.0 was hard coded in the Oracle EBS startup scripts

thanks
Matti_Kurkela
Honored Contributor

Re: how to set a display variable

Based on the problem and its solution, Oracle EBS appears to be use the X server for rendering its graphics, then reads the rendered bitmaps back to itself for printing or other purposes.

Running a normal X server (or even a Xvnc server) for this purpose is usually a security weakness: a normal X server needs direct access to the graphics hardware, so it will need root-level access to the system.

Xvnc does not necessarily need root, but its primary purpose is to offer remote access to the system: if someone logs in to the system through it, it may interfere with the application (Oracle EBS).

If someone logs in through an X server (either on the local GUI console, or remotely in case of Xvnc), the X server will be reset when the user logs out. If this happens while the application is rendering some graphics, it may cause errors.

So, the most secure solution for application graphics rendering needs would be an X server that a) does not require root permissions, and b) does not offer any real login services at all.
Such a solution exists: it is Xvfb, the Virtual Frame Buffer X server. It is available in most Linux distributions as an optional package.

In general, when setting the DISPLAY variable, you must set it *before* starting the application that needs it. When you start the application, it will get all the exported environment variable values from your session, and will hold them as long as it's running. Any changes made after the application is already running will not be effective: the application already has the old value and will keep using it.

MK
MK
iinfi1
Super Advisor

Re: how to set a display variable

thank you Matti for the detailed analysis
i didnt understand ur post entirely. i will re-read it tonight when i get home from office n trouble you again if needed.
thanks again