On 02/03/2016 01:34 PM, Helmut Jarausch wrote:
> On 02/03/2016 02:04:32 PM, Jörg Schaible wrote:
>> Hi Helmut,
>>
>> Helmut Jarausch wrote:
>>
>>> Hi,
>>>
>>> when emerging sci-geosciences/josm-9999 I get a Java error :
>>>
>>>
>>> java.awt.AWTError: Can't connect to X11 window server using ':0' as
>> the
>>> value of the DISPLAY variable.
>>>
>>>
>>> This is on a local machine using DISPLAY :0
>>>
>>> Would anybody please shed some light on this error.
>>>
>>> (Emerge version 9060 proceeds just fine)
>>>
>>> Many thanks for a hint,
>>> Helmut
>>
>> during the ebuild a Java application is running that requests the
>> presence
>> of X. So you're either on a machine without X or your JDK has no X
>> support.
>> E.g. the icedtea variants have a flag 'headless-awt' wich turns off X
>> suport
>> if active (and the name and meaning of the flag recently changed from
>> 'X').
>>
>> As another alternative you may try to fix the ebuild by running the
>> java
>> application in question with system property
>> "-Djava.headless.awt=true".
>> This can succeed if the application just initializes AWT, but does not
>> use
>> it to display something.
>>
> 
> Thanks Jörg!
> 
> My icedtea doesn't have the  headless-awt use flag.
> I've replaced 
> eant  dist-optimized
> by
> eant -Djava.headless.awt=true dist-optimized
> in the ebuild, but it didn't help.
> 
> Helmut
> 
> 
> 
> 

Another possible reason for this is that X is running as your user and
not root. I am not very familiar with how X and displays work, but I've
stumbled upon similar errors before when trying to run certain GUI
programs through root or sudo. I've usually solved this by giving my
regular user some permissions (usually just groups) and ran it as my user.

Though if this happens as part of emerge I've no idea how to go about
fixing it. It might be that what I've seen earlier is just my own FUBAR
sys and config.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to