Solved

how to run remote X app in solaris?

Posted on 2000-03-24
7
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Suggested Solutions

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

710 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