Solved

how to run remote X app in solaris?

Posted on 2000-03-24
7
448 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

770 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