Solved

how to run remote X app in solaris?

Posted on 2000-03-24
7
446 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 40

Accepted Solution

by:
jlevie earned 25 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Article by: IanTh
Hi Guys After a whole weekend getting wake on lan over the internet working, I thought I would share the experience. Your firewall has to have a port forward for port 9 udp to your local broadcast x.x.x.255 but if that doesnt work, do it to a …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now