Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up DISPLAY environment variable

Marko_3
Contributor

How to set up DISPLAY environment variable

Hi all

I am installing Oracle 8i on L-class Unix box, IP address aa.bb.cc.dd.

I am launching the Oracle Universal Installer from another Unix workstation with IP address ww.xx.yy.zz.

Should I export DISPLAY in which machine? What is the value of the DISPLAY variable?

Do I need to do xhost? Where do I invoke xhost? What is the value to invoke xhost?

Thanks a lot

9 REPLIES
mooi-kuan
Advisor

Re: How to set up DISPLAY environment variable

On your L-class Unix box,
export DISPLAY=ww.xx.yy.zz:0.0

On the other box,
xhost aa.bb.cc.dd

xhost + disabled access control, clients can connect from any host
mk
Patrick Wallek
Honored Contributor

Re: How to set up DISPLAY environment variable

Yes you will need to export your display variable. If you are working from ww.xx.yy.zz and have a terminal window open in which you have telnet'ed to aa.bb.cc.dd, then you will need to 'export DISPLAY=ww.xx.yy.zz:0.0'

You should also do an xhost. From a terminal on ww.xx.yy.zz (NOT logged into aa.bb.cc.dd) do an '/usr/bin/X11/xhost + aa.bb.cc.dd'

You should now be able to run the Oracle installer.
Dan Hetzel
Honored Contributor

Re: How to set up DISPLAY environment variable

Hi Marko,

Trying to explain a little bit:

In a X11 environment, you're running in an atypical client/server environment.
The X11 server is the system having the DISPLAY (i.e. screen, keyboard and mouse), the X11 client is the system where you run the graphical application (your L2000, in this case).
This is a bit unusual as the server and client are the other way round, compared to a more conventional client/server application.

You have to tell the client on which server (screen, keyboard, mouse) it will run.
That's the purpose of the DISPLAY environment variable.
export DISPLAY=server:0.0 (from the client side)
The ':0.0' part tells that it's on the first screen, as your server could have more.

You also need to allow your client to display something on the server:
xhost + client (from the server side)

Hoping this will make things a bit clearer,

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Steve Massey_1
Frequent Advisor

Re: How to set up DISPLAY environment variable

Dan

Excellent explanation !!

No points assigned !!!!???

Steve
Bruce Regittko_1
Esteemed Contributor

Re: How to set up DISPLAY environment variable

Steve,

Dan (and the others) might be waiting a while for those points. From the author's profile:

"This member has assigned points to 0 of 26 responses to his/her questions."

--Bruce
www.stratech.com/training
Bill Hassell
Honored Contributor

Re: How to set up DISPLAY environment variable

For those of you that are tired of typing the DISPLAY=xxx:0.0 every time you login, here is an automated way (for .profile):

REMOTEHOST=$(who -muR | awk '{print $NF}')
export DISPLAY=${REMOTEHOST%%:0.0}

Note that this works only one hop away. If you telnet to several machines in a row, the value for DISPLAY will be the last system to telnet.


Bill Hassell, sysadmin
Edward Wynn
Advisor

Re: How to set up DISPLAY environment variable

Bill,

I like the idea of automatically setting the DISPLAY var - and have tried this on my machine, but I can't egt the last bit to work:

REMOTEHOST gets set Ok , but then after the export... line DISPLAY is only set to REMOTEHOST, that is the :0.0 is missing.

Any idea why ?

Cheers, Eddie
Andreas Voss
Honored Contributor

Re: How to set up DISPLAY environment variable

Hi,

think Bill has missed i little thing.
Try this:

export DISPLAY=${REMOTEHOST%%:0.0}:0.0

Regards

Edward Wynn
Advisor

Re: How to set up DISPLAY environment variable

Cheers Andreas thats cracked it - if I could assign you points you would get 10 but unfortunately I am not the author of the original thread.

Eddie