aspose file tools*
The moose likes Linux / UNIX and the fly likes I know program works but problem with display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "I know program works but problem with display" Watch "I know program works but problem with display" New topic
Author

I know program works but problem with display

northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
I am getting this display program. The program works on windows and linux but not where I favour to work from.
[sidte5115@node00 w0109699]$ cd Bank
[sidte5115@node00 Bank]$ appletviewer NorthfieldBanque.java
Xlib: connection to "whale.cscs.qmw.ac.uk:49.0" refused by server
Xlib: Client is not authorized to connect to Server
Exception in thread "main" java.lang.InternalError: Can't connect to
X11
window
server using 'whale.cscs.qmw.ac.uk:49.0' as the value of the DISPLAY
variable
.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:5
9)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:58)
at java.awt.Window.<init>(Window.java:188)
at java.awt.Frame.<init>(Frame.java:315)
at java.awt.Frame.<init>(Frame.java:262)
at sun.applet.AppletViewer.<init>(AppletViewer.java:139)
at
sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
a:81)
at sun.applet.AppletViewer.parse(AppletViewer.java:1035)
at sun.applet.AppletViewer.parse(AppletViewer.java:969)
at sun.applet.Main.run(Main.java:140)
at sun.applet.Main.main(Main.java:82)
[sidte5115@node00 BankCW1]$

I have tried
man xhost

I have read this very small manual but it doesn't help.
I have tried 4 different servers: whale, cetacean, porpoise and
dolphin. All gave the same error.
The last server I tried via dolphine, it works on this but the laboratory is favoured by first year undergradutes.
Hubert Schmid
Greenhorn

Joined: Aug 21, 2002
Posts: 7
Hi,
your client could´┐Żnt make a connect to the server. Make sure that you have export the Display(export DISPLAY=IP:0.0) and typed the "xhost +" command.
Maybe you must change your xhost configuration to accept a display export
Greetings from Germany
schmidh
James O'Dell
Greenhorn

Joined: Apr 29, 2002
Posts: 16
Hi Sid,
Your problem is defined in these lines:
Xlib: connection to "whale.cscs.qmw.ac.uk:49.0" refused by server
Xlib: Client is not authorized to connect to Server

Like Hubert mentioned you probably need to do an xhost command. However using "xhost +" will enable any (and all) machines to connect to your Xserver.
It is usually better to do "xhost + ipaddress" where ipaddress is the ip address of the machine your app is on.
Jim
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I know program works but problem with display