Link to home
Start Free TrialLog in
Avatar of maixp
maixp

asked on

how to run remote X app in solaris?

Maybe this is a very simple question to experts, but I am a beginer of solaris.
I telnet from my solaris for x86(csh) to a remote solaris for sparc(csh too). In the telnet window, I type: set display=***.***.***.***:0(my x86's ip), then type: netscape &( I am sure this command can be run locally on the sparc). But the system said "Can open display ***.***.***.***:0..."
I know if in Linux, I can use command "xhost +" on the local x86 to fix it. However, I don't know how to do under solaris2.5/2.6. Please help.
Avatar of jlevie
jlevie

It works the same way in x86 as linux. On you lx86 box do "xhost +remote-machine-name" or "xhost +". The latter enables any remote to access your display and the former just allows the machine you are telnetting to. When you telnet to the remote do "who" and it will tell you where it thinks you are from. Use that hostname or IP in the DISPLAY env var.

If you routinely access the remote from the same location you can create the file /etc/X0.hosts and place the name of the remote in that file, which keeps you from having to do xhost every time you log in to the x86 box (you might be able to a + in the file also).
Avatar of maixp

ASKER

TO jlevie:
Thanks jlevie. It' you to answer my question again. But I have tried that "xhost" command as a root before a post this question. However, the system said "unknown command..." to me. That's why I need to ask this question.
Any way, your advice is useful especially the "/etc/X0.hosts" method.
maixp,
  Check the location of the xhost command.  I believe it's in /usr/openwin/bin

 Try
  /usr/openwin/bin/xhost +
on your your machine, then proceed to go to the remote machine to execute netscape.
  It is a good choice to set the ENV varriable (as jlevie pointed out).

samri

 
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maixp

ASKER

To jlevie:
Sorry, I ran the command and the system said "disable all the system security check, any machine can access this...." But when I "netscape&" the system still said "Can open display 'hostname':0..." . I type "env" and found that the DISPLAY value was changed to the 'hostname' I define in the remote machine's /etc/host file.
What's wrong? What is my miss? I tried almost 2 weeks. Please help
I think we are crossed up on where the xhost has to be run.

You must run the xhost command on your local x86 system. That's the X server that the remote solaris system is going to need to use.

When you get logged in to the remote Solaris box, type "who" to find out where that system thinks you are connecting from. For example when I telnet into my Ultra I see:

login: levie
Password:
Last login: Sat Apr 15 22:19:06 from wilowisp.r1.dyne
levie> who
levie      console      Mar 28 18:29    (:0)
levie      pts/3        Apr 19 07:13    (:0.0)
levie      pts/4        Mar 28 18:29    (:0.0)
levie      pts/5        Apr 19 19:25    (wilowisp.r1.xxx.com)

I'd then execute "setenv DISPLAY wilowisp.r1.xxx.com:0" before running netscape.
Avatar of maixp

ASKER

Thanks jlevie.
But I am sure that I understand your point. Do you remember my first comment? I did the same thing in RedHat6.0 and it worked. But I tried the same in Solaris26forX86, it didn't. So I asked the "xhost" command.
I felt it was strange. If I run a X-win under win98, I can open the netscape; run Xfree86 under Linux, I can; While run Solaris OpenWin, I can't. I tried another IBM AIX4.3, fails. Is it that the commercial version has difference from Xfree86? Which file shall I check for editing under /etc?
BTW, shall I open another question for this issue?

Best Regards
Maixp