1 |
On 02/03/2016 01:34 PM, Helmut Jarausch wrote: |
2 |
> On 02/03/2016 02:04:32 PM, Jörg Schaible wrote: |
3 |
>> Hi Helmut, |
4 |
>> |
5 |
>> Helmut Jarausch wrote: |
6 |
>> |
7 |
>>> Hi, |
8 |
>>> |
9 |
>>> when emerging sci-geosciences/josm-9999 I get a Java error : |
10 |
>>> |
11 |
>>> |
12 |
>>> java.awt.AWTError: Can't connect to X11 window server using ':0' as |
13 |
>> the |
14 |
>>> value of the DISPLAY variable. |
15 |
>>> |
16 |
>>> |
17 |
>>> This is on a local machine using DISPLAY :0 |
18 |
>>> |
19 |
>>> Would anybody please shed some light on this error. |
20 |
>>> |
21 |
>>> (Emerge version 9060 proceeds just fine) |
22 |
>>> |
23 |
>>> Many thanks for a hint, |
24 |
>>> Helmut |
25 |
>> |
26 |
>> during the ebuild a Java application is running that requests the |
27 |
>> presence |
28 |
>> of X. So you're either on a machine without X or your JDK has no X |
29 |
>> support. |
30 |
>> E.g. the icedtea variants have a flag 'headless-awt' wich turns off X |
31 |
>> suport |
32 |
>> if active (and the name and meaning of the flag recently changed from |
33 |
>> 'X'). |
34 |
>> |
35 |
>> As another alternative you may try to fix the ebuild by running the |
36 |
>> java |
37 |
>> application in question with system property |
38 |
>> "-Djava.headless.awt=true". |
39 |
>> This can succeed if the application just initializes AWT, but does not |
40 |
>> use |
41 |
>> it to display something. |
42 |
>> |
43 |
> |
44 |
> Thanks Jörg! |
45 |
> |
46 |
> My icedtea doesn't have the headless-awt use flag. |
47 |
> I've replaced |
48 |
> eant dist-optimized |
49 |
> by |
50 |
> eant -Djava.headless.awt=true dist-optimized |
51 |
> in the ebuild, but it didn't help. |
52 |
> |
53 |
> Helmut |
54 |
> |
55 |
> |
56 |
> |
57 |
> |
58 |
|
59 |
Another possible reason for this is that X is running as your user and |
60 |
not root. I am not very familiar with how X and displays work, but I've |
61 |
stumbled upon similar errors before when trying to run certain GUI |
62 |
programs through root or sudo. I've usually solved this by giving my |
63 |
regular user some permissions (usually just groups) and ran it as my user. |
64 |
|
65 |
Though if this happens as part of emerge I've no idea how to go about |
66 |
fixing it. It might be that what I've seen earlier is just my own FUBAR |
67 |
sys and config. |