• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2315
  • Last Modified:

Xwindows issue

Hi,

  I am telnetting into a solaris box from a windows desktop.  I am trying to execute a command on solaris server which basically is  GUI and uses Java Swing.  I get the following error message

     [echo]
     [exec] Current OS is SunOS
     [exec] Executing 'installRemedy.bat' with
     [exec] ./installRemedy.bat: @echo: not found
     [exec] Exception in thread "main" java.lang.InternalError: Can't connect to
 X11 window server using ':0.0' as the value of the DISPLAY variable.
     [exec]     at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
     [exec]     at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironmen
t.java:54)
     [exec]     at java.lang.Class.forName0(Native Method)
     [exec]     at java.lang.Class.forName(Class.java:115)
     [exec]     at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Grap
hicsEnvironment.java:53)


I tried setting the environment in server to
setenv DISPLAY :0
and tried to run xhost +

but got the error
xhost:  unable to open display ":0"

How can I run by GUI command from windows which connects to solaris server using telnet.

Sri

0
sramaswam
Asked:
sramaswam
3 Solutions
 
RichCommented:
Hi Sri,
When you set the display environment variable (did it actually get changed? type set or env to see variables), you could try to include the full IP address of the Windows PC that you are trying to use to view the graphical program residing on the Sun box.  e.g.

DISPLAY=10.1.10.25:0.0
export DISPLAY
/usr/openwin/bin/xhost +

Also, you should be using an X CLient software, like WRQ Reflections, XWIN32 or SCO XVision on your PC.

Can other people run X programs from there?  If not, this is a common issue I had on Solaris 8.

/usr/dt/bin/dtconfig -reset

Good luck,
Rich
0
 
yuzhCommented:
To run X (GUI) appliaction from a Sun box and display it on your PC, you need to have
X server for Windows (eg Xwin32, reflextion X, Cygwin [free]) installed on your PC.

Have a look at the answer in:
          http:Q_21376889.html
          http:Q_21353098.html
     
To learn more details about how to setup.
0
 
pshattuckCommented:
1) Install Cygwin on your PC

2) Install only the Base, Network and the XWIN-Free packages

3) Once installed open cygwin

4) at prompt, type export DISPLAY=:0

5) At the prompt type Xwin -multiplewindow & (A Big Black X should appear in your system tray)

6) now telnet as you have down before but with cygwin's telnet command

7) The Windows should now come up
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
sramaswamAuthor Commented:
Hi pshattuck,

  I tried with cygwin, I still get the same error from the cygwin window

     [exec] Exception in thread "main" java.lang.InternalError: Can't connect to
 X11 window server using ':0.0' as the value of the DISPLAY variable.
     [exec]     at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
     [exec]     at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironmen
t.java:54)
     [exec]     at java.lang.Class.forName0(Native Method)
     [exec]     at java.lang.Class.forName(Class.java:115)
     [exec]     at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Grap
hicsEnvironment.java:53)
     [exec]     at java.awt.Font.initializeFont(Font.java:259)
     [exec]     at java.awt.Font.<init>(Font.java:293)
     [exec]     at com.wm.distman.install.InstallerMessages.getFont(InstallerMes
sages.java:53)
     [exec]     at com.wm.distman.install.InstallerMessages.<clinit>(InstallerMe
ssages.java:63)
     [exec]     at java.lang.Class.newInstance0(Native Method)
     [exec]     at java.lang.Class.newInstance(Class.java:232)
     [exec]     at java.util.ResourceBundle.loadBundle(ResourceBundle.java:910)
     [exec]     at java.util.ResourceBundle.findBundle(ResourceBundle.java:786)
     [exec]     at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:61
6)
     [exec]     at java.util.ResourceBundle.getBundle(ResourceBundle.java:541)
     [exec]     at com.wm.distman.install.CommandLineArgs.<init>(CommandLineArgs
.java:138)
     [exec]     at com.wm.distman.install.DistManInstallMain.init(DistManInstall
Main.java:23)
     [exec]     at com.wm.distman.install.DistManInstallMain.main(DistManInstall
Main.java:33)
     [exec] Result: 1
     [exec] Current OS is SunOS

Sri
0
 
pshattuckCommented:
Ok switch the commands around, your system must be a bit diff from mine

 1) Install Cygwin on your PC

2) Install only the Base, Network and the XWIN-Free packages

3) Once installed open cygwin

4) At the prompt type Xwin -multiplewindow & (A Big Black X should appear in your system tray)

5) At the prompt, typ xhost +<hostname of the machine you are telnetting to>

6) now telnet as you have down before but with cygwin's telnet command

7) depending on your shell (I use bash) set you DISPLAY to

      DISPLAY=<IP addy of machine you are telnetting from>:0.0

8) Execute the program that yuo want to run

9) The Windows should now come up

0
 
ngopuCommented:
Using telnet tool you can not run GUI based application from windows...

Use some other tools  like humming bird or cygwin(freeware) or etc to connect your Solaris box in GUI mode(Xterm or Xwindows). Before that enable xhost + .

if it is cygwin do export DISPLAY=<windows host Ip>:0.0

for humming bird exceed you don't need to do it.

you can simply connect it and you can see the gui windows....

Best regards,
GOPu
0
 
pshattuckCommented:
hmm ngo,

that's exactly what i told him, one post above you
0
 
yuzhCommented:
It is the X server for Windows issue, the user need to install add on package
for his/her Windows PC to do the job, eg:Xwin32, reflextion X, Cygwin.

Consider split the point to the comments which mentioned install X for the Windows PC and set the DISPLAY.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now