Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Xwindows issue

Posted on 2005-05-03
11
Medium Priority
?
2,307 Views
Last Modified: 2013-12-27
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
Comment
Question by:sramaswam
8 Comments
 

Accepted Solution

by:
Rich earned 672 total points
ID: 13922757
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
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 664 total points
ID: 13922961
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
 
LVL 7

Assisted Solution

by:pshattuck
pshattuck earned 664 total points
ID: 13928672
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sramaswam
ID: 13930002
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
 
LVL 7

Expert Comment

by:pshattuck
ID: 13930565
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
 
LVL 4

Expert Comment

by:ngopu
ID: 13949563
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
 
LVL 7

Expert Comment

by:pshattuck
ID: 13961883
hmm ngo,

that's exactly what i told him, one post above you
0
 
LVL 38

Expert Comment

by:yuzh
ID: 15716133
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
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.:
Suggested Courses

810 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