Question

using cygwin X and xhost from Windows to connect to solaris

Asked by: dbguy0

Hi,
I am unable to run a x command on a  solaris 10 box from my local workstation. Cygwin X is installed on my local workstation (windows). Here is whaty I am doing.

1) Start X server (cygwin x) on local PC
2) Open SSH client, connect to solaris 10 server, export DISPLAY=<local PC IP ADDRESS>:0
I even tried :0.0 instead of :0
3) Open cygwin bash shell on local PC
4) ssh -Y user@solaris10 and then authenticate
4) export DISPLAY=<local PC IP ADDRESS>:0
5) run gedit (or any other oracle based gui application)
6) It hangs .. I am now expecting an editor window show up on my local PC but it won't
It is instead showing this error on bash shell:

java.lang.NullPointerException
        at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
        at oracle.sysman.emSDK.client.appContainer.WebApplication.<init>(Unknown
 Source)
        at oracle.security.admin.wltmgr.owma.OwmaApp.<init>(OwmaApp)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at oracle.sysman.emSDK.client.appContainer.WebApplication.main(Unknown S
ource)
Done.

(gedit:18647): Gtk-WARNING **: cannot open display:
[1] +  Done                    owm &

Is it the right way of doing it? Can someone help me with the exact steps? Thank you.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-09 at 10:41:40ID24799992
Topics

Oracle Database

,

X-Windows Window Manager

,

Sun Solaris

Participating Experts
4
Points
500
Comments
10

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. mount directory in cygwin
    Is there any ways to mount directory automaticaly (when cygwin start) like in linux (use fstab)?
  2. Difficulty with Cygwin SSH package
    I'm installed CygwinX on windows so I can run Solaris apps on my XP machine. But, am having trouble getting ssh to work with cygwin. www.cygwin.com says to install package first but I can't find the package on the cygwin website. It uses openssh.
  3. Cygwin SSH question
    I setup cygwin on my AD at home to ssh to and I verfied that SSH works but I am not sure home to sh remotely with putty. ... I enter the user account but the password is rejected . I see the domain users accounts when I do a less /etc/mkpasswd
  4. Cygwin/X XDMCP over VPN to Solaris 10 server
    If I'm in the office on the LAN, I can successfully connect to my Solaris 10 server via cygwin/x, by simply doing: XWin.exe -query x.x.x.x However, when I'm at home connected via VPN, if I do the same thing, I get a blank X display come up and then after about 10 seconds it...
  5. trying again on cygwin ftp
    okay i posted a question on the windows.. i guess you guys are going to want to merge or whatever.. i don't know what happened to the ability of cygwin to connect to my domain ftp server. here is the link to the question http://www.experts-exchange.com/Security/Win_Securit...
  6. using CYGWIN
    I know this is a reach. But I am desperate. I am trying to establish and xsession in order to gain a terminal connection to our client servers. I installed cygwin. I am currently able to remotely log in using putty to our client servers by logging into our ftp server and then...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: bluPosted on 2009-10-09 at 11:13:28ID: 25537381

Maybe there is a difference in ssh versions, but I think you need -X not -Y. What do you get if you run "echo $DISPLAY" on the remote host?

 

by: dbguy0Posted on 2009-10-09 at 11:47:24ID: 25537685

Hi I used -X this time and after step 4  echo $DISPLAY shows my lcoal pc ip address:0
Can you please give me the exact steps? Thank you.

 

by: bluPosted on 2009-10-09 at 14:21:08ID: 25538978

I am not understanding what step 4 is. Are you setting the DISPLAY variable after you ssh to the remote system. If you are using -X then you should not be doing that.

 

by: dbguy0Posted on 2009-10-09 at 14:33:45ID: 25539068

Hi, here is what I amdoing from my cygwin shell.

user1@BOWIT-user1 ~
$ export DISPLAY=localhost:0.0

user1@BOWIT-user1 ~
$ xhost +
access control disabled, clients can connect from any host

user1@BOWIT-user1 ~
$ ssh -X oraias@srv2
Password:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Fri Oct  9 17:25:15 2009 from 198.203.237.46
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.

One moment, acquiring system and Oracle environment variables.....

srv2_oraias:/home/oraias> gedit
Xlib: connection to "srv2.dia.state.ma.us:0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(gedit:25406): Gtk-WARNING **: cannot open display:
srv2_oraias:/home/oraias>

 

by: turnbulldPosted on 2009-10-09 at 15:04:12ID: 25539232

Could your ssh connection not be setting DISPLAY properly as a result of the authentication error?  Once you connect to srv2_oraias, try setting DISPLAY=BOWIT-user1:0.0

 

by: uaynebPosted on 2009-10-09 at 17:59:13ID: 25540117

When you are installing X11 package (a.k.a. startxwin.sh) it doesn't install xhost by default.  I ran into the same issue.  

step 1: install xhost
1. Run your cygwin setup.exe
2. expand X11
3. scroll down to xhost and install

step 2: startxwin.sh and you know the rest
1. start cygwin
2. startxwin.sh
3. xhost +
4. ssh -g -X [user]@[solaris box]
5. set display back .. in this case I use csh
setenv DISPLAY [my desktop]:0.0
6. /usr/openwin/bin/xcalc  (simple x app)

voila

 

by: uaynebPosted on 2009-10-09 at 18:01:17ID: 25540125

oops, you did instal xhost.  I have to read more carefully.  I apologize

Can you run a simple x app like xcalc ?  That's test # 1 .

so sorry for not reading carefully.
   

 

by: uaynebPosted on 2009-10-09 at 18:03:30ID: 25540143

hey in your cygwin shell, the "export DISPLAY" line is not needed.  You need to do that on the remote host after you log in ... that is the same as my "setenv DISPLAY" line .   That's probably why your x connection is refused.

 

by: gheistPosted on 2009-10-11 at 05:57:02ID: 25545760

xming is perfect for your purpose...

 

by: dbguy0Posted on 2009-10-13 at 06:54:34ID: 25559937

Hi All!
Thank you !!!! It works fine now after installing xhost.
Appreciate all your help.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...