Home » RDBMS Server » Networking and Gateways » need help to set DISPLAY variable and use GUI tool
need help to set DISPLAY variable and use GUI tool [message #270700] Thu, 27 September 2007 15:49 Go to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
Hi
Let me show u my environment.
I am working with Oracle Database 10.2.0.1 on AIX system.
I am working on my Laptop (Comp1) and i have installed 10g Clients on it.
Through Putty i have started accessing my database that is resided on different location, we can say Database server(Comp2).
DISPLAY Setting:
vijaya@bolivia</home/oracle/product/10.2.0/bin>echo $DISPLAY
xxx.xx.xxx.xx

It is the server ip on which the database is residing.

When i am checking the x-server with X-clock command:
vijaya@bolivia</home/oracle/product/10.2.0/bin>xclock
Error: Can't open display: xxx.xx.xxx.xx

Is there any way to fix it. i am not using any utility because for some of them i have not permission to access it.
Is there any way i can SET and Check my x-server / GUI setting , So on my Laptop (comp1) i can open the GUI utility.



Re: need help to set DISPLAY variable and use GUI tool [message #270702 is a reply to message #270700] Thu, 27 September 2007 16:01 Go to previous messageGo to next message
BlackSwan
Messages: 25038
Registered: January 2009
Location: SoCal
Senior Member
Is the SEARCH button on this forum broken for you?
Re: need help to set DISPLAY variable and use GUI tool [message #270708 is a reply to message #270700] Thu, 27 September 2007 16:47 Go to previous messageGo to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
thanks for directing me.
i will look at it.
Re: need help to set DISPLAY variable and use GUI tool [message #270734 is a reply to message #270708] Thu, 27 September 2007 22:15 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello jroracledba,


1) Your server: AIX (text-mode only... no GUI);
2) Your laptop: I assume it is Windows... is it right?
Yet you did not confirmed clearly!

What you have to do:

a) Your laptop (windows) have to be a X-server for the AIX. You have to install a X-server on your laptop. There are many on the market... but I use a free one: CYGWIN.

b) Install CYGWIN on your laptop. This will be your X-server. And... being a server.... there are clients. And one client will be your AIX server.

c) Your laptop is a X-server now. Then as a server you need to create a rule about connection allowance. You do this as follow:
xhost +<IP_IBM_AIX>

Then... your X-server will accept connection from your IBM AIX.

d) Tell to IBM that IAX should connect to X-server on your laptop. You do this as follow:
DISPLAY=<ip_of_your_laptop>:0
export DISPLAY


Now... every window from AIX will be served by your X-server located at <ip_of_your_laptop>... using display number 0.

e) Using putty... connect to AIX... and execute "xclock". A windows will open on your laptop if X-server is loaded on your laptop (startx.bat).

Regards,


mson77
Re: need help to set DISPLAY variable and use GUI tool [message #270941 is a reply to message #270700] Fri, 28 September 2007 08:26 Go to previous messageGo to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
First of all Thanks for reply. Also i have go through previous Forum but it couldnt help me.

I have connected to my server through Putty Session and did as following :

vijaya@bolivia</home/vijaya>xhost +166.xx.xxx.xx
1356-200 xhost unable to open display ""

vijaya@bolivia</home/vijaya>export DISPLAY=172.xx.xx.x:0
vijaya@bolivia</home/vijaya>echo $DISPLAY
172.xx.xx.x:0

vijaya@bolivia</home/vijaya>xclock
Xlib: connection to "172.xx.xx.x:0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: 172.xx.xx.x:0


I have installed X-ming server and showing status like
Xming Server:0.0 so i think its running with no client connected !

Also 172.xx.xx.x:0 is my Computer IP
and 166.xx.xxx.xx is my servers ip

Is there any thing to set with X-launch on my Laptop or ?
Re: need help to set DISPLAY variable and use GUI tool [message #271062 is a reply to message #270941] Fri, 28 September 2007 21:20 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello jroracledba,

First of all:
1) You didn't read OraFAQ Forum Guide;
2) You didn't post your messages formatted;
3) You didn't supply reference information;
4) You didn't read thorough;

Please follow above advice. It will just help you.

Regarding your question:
a) Consider the following hypothetical scenario:
computer1:
  • linux/unix server (IBM AIX for instance)
  • IP = 192.16.0.1
  • xclock installed

computer2:
  • ms windows (your laptop)
  • IP = 172.168.0.2
  • X-server installed (cygwin/xming/xdeep)
  • putty installed


=========================
Configure putty:
On the left column menu:
Connection --> SSH:
  • Preferred SSH protocol: 2

Connection --> SSH --> X11:
  • [X] Enable X11 forwarding
  • X display location: localhost:0

Session:
  • Host name (or IP Address): 192.16.0.1


Save this putty configuration and make ssh connection onto computer1 (AIX server) providing user+password.

Your will receive AIX prompt screen.
Execute:
env |grep DISPLAY

You will see something like: (depends on AIX.sshd_config)
DISPLAY=localhost:10.0

Now on MS Windows environment... start your X-server (cygwin ou Xming ou X-Deep). You will see the X-server icon at the bottom right near Windows clock).

Now on the AIX prompt screen (putty screen)... run any X-application... in our case:
xclock &

You will see a window be opening on your Windows desktop due "xclock" execution on AIX.

Regards,


mson77
Re: need help to set DISPLAY variable and use GUI tool [message #271698 is a reply to message #270700] Tue, 02 October 2007 10:06 Go to previous messageGo to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
I just started using this forums so i will keep in mind all the rules and regulations.Thanks for advice, i will follow that.

Again Let me clear my environment

Comp1= DB server running on AIX v5.3, IP=166.86.xxx.xx
Comp2= My workstation(laptop) on Windows Xp IP=172.24.xx.x

I have installed Xming as X server.And its Running ( its showing me icon on the bottom right of my screen and showing Xming Server:0.0)

Set up putty for X11 enabling ,local host is set-172.24.xx.x:0

Try to run following commands connecting to the DB sever via PuTTY.



vijaya@bolivia</home/vijaya>env |grep DISPLAY
DISPLAY=172.24.xx.x:0.0

vijaya@bolivia</home/vijaya>xhost +166.86.xxx.xx
Xlib: connection to "172.24.xx.x:0.0" refused by server
Xlib: No protocol specified

1356-200 xhost unable to open display "172.24.xx.x:0.0"

AND GET THE SAME ERROR AS ABOVE WHILE RUNNING xclock COMMAND ON SERVER.

Do u have any idea on this kind of errors.
I have connect through LAN , has Proxy server set.

[Updated on: Tue, 02 October 2007 10:08]

Report message to a moderator

Re: need help to set DISPLAY variable and use GUI tool [message #271704 is a reply to message #271698] Tue, 02 October 2007 10:36 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello jroracledba,

>>Set up putty for X11 enabling ,local host is set-172.24.xx.x:0
The correct term is "X11 forwarding"

vijaya@bolivia</home/vijaya>env |grep DISPLAY
DISPLAY=172.24.xx.x:0.0 ==> should be: localhost:0.0 or localhost:n.0
NOT Perfect!
No need to set DISPLAY variable again.
I said to set in the other old fashion. The initial fashion without using putty as X11 forwarding.

jroracledba did...
vijaya@bolivia</home/vijaya>xhost +166.86.xxx.xx
Xlib: connection to "172.24.xx.x:0.0" refused by server
Xlib: No protocol specified

Do not do this just above!

That's all.
Run xclock and a window will open on your desktop.
vijaya@bolivia</home/vijaya>xclock &


Regards,


mson77

[edit]
Did you do this below?
Connection --> SSH --> X11:

* [X] Enable X11 forwarding
* X display location: localhost:0

[Updated on: Tue, 02 October 2007 10:41]

Report message to a moderator

Re: need help to set DISPLAY variable and use GUI tool [message #271710 is a reply to message #270700] Tue, 02 October 2007 11:00 Go to previous messageGo to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
Hello Senior
Yes i did enable X11 forwarding and set X display location and SAVE for my session.

But still i am getting error:
I did as follow.

vijaya@bolivia</home/vijaya>echo $DISPLAY
172.24.26.2:0.0
vijaya@bolivia</home/vijaya>xclock &
[1] 336186
vijaya@bolivia</home/vijaya>Xlib: connection to "172.24.26.2:0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: 172.24.26.2:0.0

[1] + Done(1) xclock &


Any exposure on this !




Re: need help to set DISPLAY variable and use GUI tool [message #271712 is a reply to message #271710] Tue, 02 October 2007 11:10 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello jroracledba,

The error is in DISPLAY setting.
As you use putty and then putty creates to you a ssh tunnel... you should connect to this tunnel end which is 127.0.0.1 (localhost).

Then, when you setup a connection on putty... to reach you AIX IBM server... in X11 section... you should check:
[x] enable X11 forwarding
and set X display location to: 127.0.0.1:0 or localhost:0
It is a must.

If you did this... after connection on IBM server... if you issue the command:

env|grep DISPLAY
==> you will see that putty automatically set display as 127.0.0.1:n.0 or localhost:n.0

Then every window will be forwarded according to DISPLAY variable... in this case to 127.0.0.1:n.0... and in this case... putty "wrap" X11 connection and sends to your laptop (127.0.0.1).

Regards,


mson77
Re: need help to set DISPLAY variable and use GUI tool [message #271720 is a reply to message #270700] Tue, 02 October 2007 11:37 Go to previous messageGo to next message
jroracledba
Messages: 28
Registered: August 2007
Junior Member
Hi Senior

I got you. As you said:
env|grep DISPLAY
==> you will see that putty automatically set display as 127.0.0.1:n.0 or localhost:n.0

But when i connect to my server and try to see display setting (that PuTTy automatically set) , it shows me NOTHING !!

Thats means some how this is not done , Automatically.
So there is some problem with setting the DISPLAY it self automatically.

I will find that out.
If u have any exposure on it let me know.

Thank you and I appreciate your patience.
I wish some day on this forum i will help someone by my knowledge.



Re: need help to set DISPLAY variable and use GUI tool [message #271722 is a reply to message #270700] Tue, 02 October 2007 11:56 Go to previous messageGo to next message
BlackSwan
Messages: 25038
Registered: January 2009
Location: SoCal
Senior Member
PUTTY MUST be configured to enable X-11 FORWARDING.
You must log onto the *NIX database server as user "oracle" or who ever is the owner of the Oracle software directory tree.

If/when you do BOTH the above, then immediately after a successful logon do:
env |grep DISPLAY

& it will/should show it exists & is correctly established.

In the process a "hidden" file [.Xauthority] will be created.
Re: need help to set DISPLAY variable and use GUI tool [message #271723 is a reply to message #271722] Tue, 02 October 2007 12:04 Go to previous message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello jroracledba,

Thorough:
1) putty:
==> X11 forwarding enable checked;
==> display location to your laptop localhost... 127.0.0.1:0 or localhost:0

2) connect onto IBM AIX:
issue: env | grep DISPLAY
==> should see:
DISPLAY=127.0.0.1:n.0 ...or...
DISPLAY=localhost:n.0

3) IF you **NOT** see DISPLAY set...
Make sure that you have "xauth" installed on your IBM AIX.

That's ALL!
Regards,


mson77
Previous Topic: Regarding Form Builder Error while entering user name and password( ORA 12560 )
Next Topic: configuring oid for non ASoracle
Goto Forum:
  


Current Time: Mon Dec 05 13:18:31 CST 2016

Total time taken to generate the page: 0.07497 seconds