f



Can't connect to X11 window server using ':0.0'

Hi All,
I'm trying to run a standalone application on solaris machine
,encountered the following problem.
How to go about it.

Exception in thread "main" java.lang.InternalError: Can't connect to
X11 window
server using ':0.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:1
34)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:62)
        at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:81)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at java.awt.Toolkit$2.run(Toolkit.java:748)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)
        at java.awt.Toolkit.getEventQueue(Toolkit.java:1519)
        at java.awt.EventQueue.isDispatchThread(EventQueue.java:651)
        at
javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:
1238)
        at javax.swing.text.StyleContext.reclaim(StyleContext.java:419)
        at
javax.swing.text.StyleContext.addAttribute(StyleContext.java:276)
        at
javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:538)
        at
javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.ja
va:1468)
        at
javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:12
78)
        at
javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:122
6)
        at javax.swing.text.StyleContext.addStyle(StyleContext.java:88)
        at javax.swing.text.StyleContext.<init>(StyleContext.java:68)
        at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:147)
        at
javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:
355)
        at
javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorK
it.java:186)
        at SolMetaTag.main(SolMetaTag.java:33)


Thanks

0
hrpreet (10)
4/26/2006 5:46:08 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

3 Replies
1609 Views

Similar Articles

[PageSpeed] 31

On 26 Apr 2006 10:46:08 -0700, hrpreet wrote:
> I'm trying to run a standalone application on solaris machine
> ,encountered the following problem. How to go about it.
>
> Exception in thread "main" java.lang.InternalError: Can't connect to
> X11 window server using ':0.0' as the value of the DISPLAY variable.

This really isn't a Java issue. The error message means that the
application tried to connect to the X server (i.e. the display), but
one of the following prevented it:

- you are not running an X server on your solaris box, but your
  DISPLAY variable ":0.0" is telling the application that you are.

- you are running an X server (maybe on another machine), but ":0.0"
  is not the correct DISPLAY value, so the application fails to
  connect to the server.

- there is an X server running and the DISPLAY variable is correct,
  however you are not authorized to connect to the server, either
  because it is owned by another user or because you have not
  configured your environment correctly.

If you don't think the program actually needs a GUI, you can specify
the following when you run the application:

  -Djava.awt.headless=true 

See also:

  http://java.sun.com/j2se/1.5.0/docs/guide/awt/AWTChanges.html#headless

/gordon

-- 
[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e
0
n.o.t (582)
4/26/2006 6:19:51 PM
Gordon Beaton wrote:
> On 26 Apr 2006 10:46:08 -0700, hrpreet wrote:
> 
>>I'm trying to run a standalone application on solaris machine
>>,encountered the following problem. How to go about it.
>>
>>Exception in thread "main" java.lang.InternalError: Can't connect to
>>X11 window server using ':0.0' as the value of the DISPLAY variable.
> 
> 
> This really isn't a Java issue. The error message means that the
> application tried to connect to the X server (i.e. the display), but
> one of the following prevented it:
> (...)
> - there is an X server running and the DISPLAY variable is correct,
>   however you are not authorized to connect to the server, either
>   because it is owned by another user or because you have not
>   configured your environment correctly.

I've typically run into this (on Linux) when trying to run a graphical 
application as root. Many Linux distros are by default set up to 
disallow the root user from accessing the X server; perhaps the same is 
true for Solaris.


--

Morten
0
morten10 (51)
4/27/2006 9:42:31 AM
On Thu, 27 Apr 2006 11:42:31 +0200, Morten Alver wrote:
> I've typically run into this (on Linux) when trying to run a
> graphical application as root. Many Linux distros are by default set
> up to disallow the root user from accessing the X server; perhaps
> the same is true for Solaris.

Of course, because X authorization doesn't know who is trying to
connect (it's just a socket connection), so there's no way to give
special privileges to root.

/gordon

-- 
[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e
0
n.o.t (582)
4/27/2006 9:49:08 AM
Reply:

Similar Artilces:

Can't connect to X11 window server using 'localhost:0.0'
Hi. I'm using sendmail 8.12.9 for a project on RedHat Fedora Core 2 on my personal computer with a perfectly finctioning X window server. Part of this project requires me to modify sendmail to open a gui application. When I attempted this originally, I got the following error: "No X11 DISPLAY variable was set, but this program performed an operation which requires it." Figuring that sendmail for whatever reason unset it, I added called setenv() to set it and got the following error: "Exception in thread "main" java.lang.InternalError: Can't connect to X11 wind...

Can't connect to X11 window server using 'localhost' as the value of the DISPLAY variable
I've this problem: I connet to a remote Solaris Sun Sparc 8 machine from my PC (WindowsXp OS). When I try to execute the remote program which needs to run a graphical interface, it show me this error message: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable Can you help me? thanks a lot. is this a wxWindows question ? Anyway i have hade the same problem. i asume we are talking about vnc ? ':0' i the machine current display and you probely what to run a X11 remotly ? I Linux i have to create a xstartup file o...

if instead of 0.0.0.0 netmask is 255.0.0.0, I can't go on internet. That doesn't make sense...
Hello 1) I'm running W2k on PC called A ( it's not really named A, but for the sake of argument ...) and if my routing table has ( destionation )0.0.0.0 ( netmask )255.0.0.0 ( gateway )192.168.2.1 instead of ( destionation )0.0.0.0 (netmask)0.0.0.0 (gateway)192.168.2.1 then I can't get on internet. I know address 0.0.0.0 basically means "send the packet on internet", but why needs netmask be 0.0.0.0? Afterall, all that netmask 255.0.0.0 should tell A is that destination address is not on the same network as A is, and thus should send it to d...

``awk '!a[$0]++' file'' and ``awk '{if(!($0 in rec)) {rec[$0]=1; print $0;}}' file ''
Hi all, Currently, I'm reading the book on awk programming language, but meet the following two examples which I cann't understand so well: awk '!a[$0]++' file and awk '{if(!($0 in rec)) {rec[$0]=1; print $0;}}' file Could someone here please give me some hints or explanations on the logic of above codes? Regards -- ..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. In article <meuejm$gsf$1@aspen.stu.neva.ru>, Hongyi Zhao <hongyi.zhao@gmail.com> wrote: > Hi all, > > Currently, I'm reading the bo...

3*x''+(10^-3)*x'+123*x=2*cos(3*t); x=x(t);initial conditions x(0)=0 and x'(0)=0
Hi everybody, I need to solve the Cauchy problem written in the title box ( I paste it here again ): 3*x''+(10^-3)*x'+123*x=2*cos(3*t); x=x(t);initial conditions x(0)=0 and x'(0)=0. I tried with Runge-Kutta method and it seems to work as the solution x(t) is the same that I can get solving the equation by myself. I need to know if it would be better another method (eventually multistep one) and why it would be better (please don't just tell me 'cause it's faster or so...I need to know the why too). As last thing I need to estimate the error committed with Runge...

Hi, When I launch the "J2EE 1.4 Application Server" in Linux, I receive this error: Error: Cannot connect to X11 server ':0.0'.
Check that the DISPLAY environment variable is correctly set or try rerunning this application with the following usage: 'j2eesdk-1_4-dr-linux-eval-app' -console When I launch $> j2eesdk-1_4-dr-linux-eval-app -console then I get this error: Error: Cannot find the required Motif binaries. Check that the LD_LIBRARY_PATH environment variable includes the directories that contain the Motif binaries this are my variable setting : DISPLAY=:0.0 LD_LIBRARY_PATH=/usr/X11R6/lib Anybody see what am doing wrong? starting "J2EE 1.4 Application Server&quo...

can't connect to mysql on 'local host', installing 5.0.19
I had to delete all old files and disable norton firewall to get the install to work. but I still get, after everything's applied, can't connect to mysql on 'local host' (10061) 10061 is a winsock error WSAECONNREFUSED. so the dialog box recommends to press the skip button "because you are probably doing an upgrade (shouldn't! I wasn't) and run the config wizard. so I did and that went OK. the service got installed, and can start and stop, but won't connect. probably the same error, but can't tell because no log details. I have seen this error messa...

How come I can't use 'sqrt' and 'fabs'?
Hi, group, When I compile my code, the error message are: "error C2668: 'fabs' : ambiguous call to overloaded function" "error C2668: 'sqrt' : ambiguous call to overloaded function" I already add the math library, what does this error mean? Thanks. Vol. Vol wrote: > Hi, group, > When I compile my code, the error message are: > "error C2668: 'fabs' : ambiguous call to overloaded function" > "error C2668: 'sqrt' : ambiguous call to overloaded function" > > I already add the math library, what does this...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked for...

Error in ODE45 code. PLEASE helpfunction dy = prob_52 (t,y) dy = cos(y)
function dy = prob_52 (t,y) dy = cos(y) - (sin (t)*y); [t,y] = ode45 (@prob_52,[0,1],0) plot (t,y) xlabel ('Time') ylabel ('Function Value') "Nikki Smith" <newe0033@umn.edu> wrote in message news:iaaaid$48t$1@fred.mathworks.com... > function dy = prob_52 (t,y) > dy = cos(y) - (sin (t)*y); > > [t,y] = ode45 (@prob_52,[0,1],0) > plot (t,y) > xlabel ('Time') > ylabel ('Function Value') So what is the FULL TEXT of the error message you receive? How are we supposed to help you without that? As a _guess_ I'd say...

UnicodeEncodeError: 'ascii' codec can't encode character u'\ua000' in position 0: ordinal not in range(128)
Hi, I am trying to understand what does encode() do. What are the hex representations of "u" in main.py? Why there is UnicodeEncodeError when main.py is piped to xxd? Why there is no such error when it is not piped? Thanks. ~$ cat main.py #!/usr/bin/env python u =3D unichr(40960) + u'abcd' + unichr(1972) print u ~$ cat main_encode.py #!/usr/bin/env python u =3D unichr(40960) + u'abcd' + unichr(1972) print u.encode('utf-8') $ ./main.py =EA=80=80abcd=DE=B4 ~$ cat main.sh #!/usr/bin/env bash set -v ../main.py | xxd ../main_encode.py |...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Hi, Thanks for ur help there HJ. I know how to do the tasks you specified there. I would like for the update query to use field values from some of the fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, DateTo. My problem is that an append/update query can't find the values in the open Form (frmInvoices) when I specify them as; [Forms]![frmInvoices]![InvoiceNumber] a select query has no problem finding the field values on a form. please help. Aaron Hi Aaron, Could you post the entire code that you are having trouble with? Now it is not possible to see what goes wrong. HJ "Aaron" <aaron@rapid-motion.co.uk> wrote in message news:260d7f40.0408120245.2f3d01f8@posting.google.com... > Hi, > > Thanks for ur help there HJ. > > I know how to do the tasks you specified there. > > I would like for the update query to use field values from some of the > fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, > DateTo. My problem is that an append/update query can't find the > values in the open Form (frmInvoices) when I specify them as; > > [Forms]![frmInvoices]![InvoiceNumber] > > a select query has no problem finding the field values on a form. > > please help. > > Aaron First off, if you are not always using all the parameters specified in your form, then you have to add parameters to your query on the fly. Also, you can't just do something like qdf.SQL = "SE...

'hostShow' don't have 127.0.0.1
I'm beginner of Vxworks. I want to add network programming to the existing target board. After Including INCLUDE_END in config.h and adding configNet.h, I can compile successfully but Typing 'hostShow' command in the shell, there's no active network interface. At first I want to see '127.0.0.1' or run 'ping 127.0.0.1' or 'ping localhost' successfully What should I do that? Please shed me the light :-) yudong: You've added an net driver - have you configured in tcp/ip into your kernel? If you start with Tornado and click on all the appropria...

with clk'event, must we use clk='1' or clk='0' ?
Hi, Consider this part of a hypothetical counter: process (CLK) if CLK'event then if ClrN = '1' then Qint <= "00"; else Qint <= Qint + 1; end if; endif; end process; Is this legit as it is or MUST I have something like: if CLK'event and Clk='1' then... as the idea is to have a counter that changes with EVERY clock event, not just the leading edge. ty, -e On Sat, 28 Jul 2007 21:52:47 -0000, <sunshinekisses@gmail.com> wrote: >Consider this part of a hypothetical counter: Hypothetical it certainly is. >process (CLK) >if CLK&...

shouldn't 'string'.find('ugh') return 0, not -1 ?
the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom, which is a bit of a pity I think. cheers, -jelle jelle <jelleferinga@gmail.com> writes: > the subject pretty much says it all. > if I check a string for for a substring, and this substring isn't found, > should't the .find method return 0 rather than -1? How would you treat the case of 'something' being at the beginning of the string? After all, find returns the index. > this breaks the > > if check.find('something'): > do(somethingElse) > > idiom, which is a bit of a pity I think. if 'something' in check: do(somethingElse) On Wed, 31 Oct 2007 13:31:06 +0000, jelle wrote: > if I check a string for for a substring, and this substring isn't found, > should't the .find method return 0 rather than -1? > this breaks the > > if check.find('something'): > do(somethingElse) > > idiom, which is a bit of a pity I think. And what should ``'string'.find('str')`` return? How do you distinguish the not found at all case from the found at the very beginning case!? The simple test you want can be written this way: if 'something' in check: do(something_else) Ciao, Marc 'Blac...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

Can't connect to MySQL server on 'localhost' (10061)
Hi all, maybe this isn't a php question, but a MySQL question. If so I'm sorry for asking you guys to help me :) I know this question is asked often in NGs, but I couldn't find the answer that works for me. I've just installed my server with following: Apache2, PHP5 and MySQL 4.1.12 on Windows 2000 Server. Apache and PHP are funtioning properly (I can open a page like phpinfo() ). But now i've come upon a problem with MySQL. When i try to run a simple PHP script like: mysql_connect("localhost", "root", "password") or die (mysql_error())...

can't install a windows software, using 'wine'
Hi, I am having trouble installing a windows application. Normally, under windows, I would just click on setup.exe file. But when I tried to install it under linux, I tried: wine Setup.exe At this point, I have got a lot of error messages, and eventually the terminal froze. So I can't really post all the error messages, but I have got the following messages. fixme:ole:ITypeInfo_fnRelease destroy child objects fixme:ole:CoTreatAsClass ({8c3c1b17-e59d-11d2-b40b-00a024b9dddd},{22d84ec7-e201-4432-b3ed-a9dca3604594}) fixme:dialog:MSGBOX_OnInit task modal msgbox ! Not modal ...

Can't delete file named '0' (zero)
Hi folks, I have a file named 0 (zero) which I cannot delete. Any clues? Thanks Glenn GlennH wrote: > Hi folks, > > I have a file named 0 (zero) which I cannot delete. Any clues? > > Thanks > > Glenn Short term, reformat the disk. Long term, read the disk directly, figure out exactly what's in the directory. Then you should be able to figure out what you need to pass to delete it. Even better, check file names when you create files. Speaking only for myself, Joe Durusau ...

Padding a string with characters other than ' ' and '0' using format
Hello, I have a situation where I have a predefined TCL command, using a custom interpreter, that takes one argument...a string. Now, obviously, this argument may be as long as needed. Basically, the command is used to denote the beginning of a block of execution in a log file. So, for example, I'd say, Command "1: string is here" However, the command prepends a set number of characters to the string given as an argument. So, the end result in the log file is: Prepended Text: 1: string is here Now, I'd like to "beautify" my log files, basically, make...

other problems using set(0,'defaultObjectPropertyName','factory')?
I've encountered a few quirks when resetting certain default properties to factory values with set(0,'defaultObjectPropertyName','factory') on version 7.1.0.246 (R14) Service Pack 3. They are: (1) set(0,'defaultSurfaceCData','factory') causes the creation of the first surface object to seg. fault, (2) set(0,'defaultPatchFaceVertexAlphaData','factory') gives an error, (3) set(0,'defaultTextPosition','factory') causes colorbar and legend axes to be improperly positioned. I'm curious to know if anyone has uncovered any ot...

Schools subnet = 10.0.0.1 Classes subnet 10.0.0.1 can't connect to internet
Schools subnet = 10.0.0.1 Class subnet 10.0.0.1 -- can't connect to internet Don't know if this is exactly a firewall issue. My school allows us to do a little lan gaming in one computer lab. I like to set up my dlink to pass out 10.0.0.x addresses because it's easy to type in. Games and map servers are under 10.0.0.100. My gateway is 10.0.0.1. I connect that to the schools system (lets call it a linksys) which is also a 10.0.0.x subnet. I use the DLINK because there's a bunch of windows shares I don't want the gamers getting to and it seems to isolate them. But when I...

Why can't we 'tformfwd' a cp2tform(..., 'polynomial')
Hi, Just as an example: This is allowed xybase = reshape(randn(12,1),6,2); t_affine = cp2tform(xybase,xybase,'affine'); [x,y] = tformfwd(t_affine,xybase,xybase); but this t_poly = cp2tform(xybase,xybase,'polynomial',2); [x,y] = tformfwd(t_poly,xybase,xybase); gives an error "Function TFORMFWD expected T's forward_fcn field to be non- empty." I checked the code a bit and indeed, with the 'polynomial' case, the findPolynomialTransform() function has at its end trans = maketform('custom',2,2,[],@inv_polynomial,[A B]); wher...

Web resources about - Can't connect to X11 window server using ':0.0' - comp.lang.java.programmer

Resources last updated: 3/6/2016 2:48:01 PM