1821051 Members
2754 Online
109631 Solutions
New Discussion

Running X applications

 
Andre Nunes
New Member

Running X applications

Hi, I am running HP-UX B.11.00 on PA-RISC 9000/800.
When I run X applications (I am using Cygwin and Putty with X forwarding through SSH) from root everything works fine. When I change to ora (this is the user for oracle administration) I can't run X apps anymore.
I tried xhost +
«Xlib: connection to "172.16.2.11:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
xhost: unable to open display "172.16.2.11:10.0"»
I also tried xauth
xauth: timeout in locking authority file /oracle/MBD/.Xauthority

How can I generate a MIT Magic cookie? How can I generate a new .Xauthority file?

Kind regards,

André Nunes
6 REPLIES 6
Alex Glennie
Honored Contributor

Re: Running X applications

How do you change to Oracle ... su ?

If yes su to oracle, then from command line run dtterm -ls then run your X applications.

see man dtterm and loginshell resource for more details .

I maybe wrong re the above. sounds to me the profile is not being read when you su
Mark Greene_1
Honored Contributor

Re: Running X applications

When you su to oracle, are you keeping the DISPLAY variable set correctly?

And, have you tried using xauth and pointing back to root's authority file?

xauth -f [full/path/to/.Xauthority]

and then if xauth runs, do info and if it doesn't error, you ought to be able to use that file to create a new one:

xauth extract - $DISPLAY |xauth add -


mark
the future will be a lot like now, only later
Mark Greene_1
Honored Contributor

Re: Running X applications

Along with with Alex wrote, are you doing "su" or "su - " or logging in fresh to get to oracle?

mark
the future will be a lot like now, only later
Bill Thorsteinson
Honored Contributor

Re: Running X applications

You have a few options.
- ssh directly to ora (This is the
method I prefer as it is most secure.)
- Change the protection on .Xauthority
in ~root and link or copy it to ~ora
- Run xauth on your cygwin account before
changing to ora. (I use Linux, and
this is the equivelent to what I have done.)
- Run xaith from root before changing to
ora.
- Try the su variant that copies your
.Xauthoritiy (xsu i think). This didn't work
well for me.

Make sure the value of $DISPLAY is
the same after you change users as before.
It looks like you may
TwoProc
Honored Contributor

Re: Running X applications

This is probably because you're going from being some user (root maybe) to becoming "oracle" and you're not promoting your X protocol along with you through your next level login.

Or, you're already Oracle, but when you run the script to set ORACLE_HOME, etc, you've lost the definition of the environment variable "DISPLAY".

Two options to the first problem.

1) Login directly to "oracle" from your machine using "ssh -x", instead of logging into the server as another user first (if possible).
2) Instead of "su-ing" to become "oracle", "ssh -X" instead. You might not be able to do either of these due to the fact that you could have security set to access oracle only as "su". Pretty common actually.

If that is the case, and you must ssh as some user to the computer, and THEN you must "su" to become oracle - then you need to set your DISPLAY environment variable to either the IP_Address:0.0 for your PC - OR the environment variable value for DISPLAY (whatever that was) BEFORE you su'd to oracle. That would probably be something like DISPLAY=server_name:10.0.


The "second case" is easy - you just lost the definition of DISPLAY in the setting of your ORACLE_HOME, etc vars. Just see what DISPLAY is set to before you run the script to set up variables, and set it back again after you've run the set up script.

We are the people our parents warned us about --Jimmy Buffett
Andre Nunes
New Member

Re: Running X applications

Thank you for your replies.
It was a problem with permissions in ora homedir.

Now it's working!

By the way, I was logging directly with ora. The DISPLAY variable is pointing to the server.

Kind regards,

André Nunes