Solved

how to run remote X app in solaris?

Posted on 2000-03-24
7
450 Views
Last Modified: 2013-12-23
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.
0
Comment
Question by:maixp
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2653208
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).
0
 

Author Comment

by:maixp
ID: 2656286
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.
0
 
LVL 15

Expert Comment

by:samri
ID: 2656683
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

 
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 40

Accepted Solution

by:
jlevie earned 25 total points
ID: 2656707
The xhost command is in /usr/openwin/bin, as samri correctly pointed out. You are probably using a "smart" shell init file that notices whether you are logging on to the console or not. If the script detects that you aren't on the console it doesn't add the X stuff to your path, hence you can't find xhost.

You'll want to add /usr/openwin/bin & /usr/dt/bin to your path after the remote login (or modify your shell init script to have it do so). Also you might need to set up an LD_LIBRARY_PATH to include /usr/openwin/lib & /usr/dt/lib.
0
 

Author Comment

by:maixp
ID: 2732791
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
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2732815
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.
0
 

Author Comment

by:maixp
ID: 2732870
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
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question