Login  Register

Re: Using a display connection name fails (through NewtFactory)

Posted by Sven Gothel on Jun 12, 2013; 3:22pm
URL: https://forum.jogamp.org/Using-a-display-connection-name-fails-through-NewtFactory-tp4029333p4029383.html

On 06/12/2013 04:50 PM, neothemachine [via jogamp] wrote:

>
>> > final long dpy = X11Lib.XOpenDisplay(System.getProperty("DISPLAY"));
>> >
>> > If the property is not set (the default case), then getProperty()
>> > returns null and thus the old behavior is used.
>> if that works well w/ you - KUDOS, it's a small and smart change.
> Yep, it works just like I want, and even better, it doesn't require
> changes in ardor3d.
>
> I'd like to write a simple unit test for it which then sets the default
> display via
>
> System.setProperty("DISPLAY", ":0.0");
>
> Can you ensure in your testing environment that a specific unit test
> doesn't have the DISPLAY environment variable set? Otherwise, I'll leave
> the unit test out for now and just submit the single-line fix as pull
> request.
Yes, we can fiddle w/ the env vars when launching a unit test.

>
> Thanks for your support :)

Good that this case(1) is solved.

(1) No DISPLAY env. variable set, hence no default X server available.
    Injecting custom default X server via Java system property 'DISPLAY'.

.. while (2) was always working:

(2) Having a default X server being set via DISPLAY env variable.
    Using the default X server, _as_well_ as other X server,
    while naming the display connection, i.e. 'host2:22.1' via
    AbstractGraphicsDevice, .. etc.

Maybe we should document this somewhere ?

Are you willing to add a wiki page for it and link it
to the JOGL tutorial/howto section ?
If yes - I create an account for you, pls PM me - sgothel at jausoft dot com.

~Sven

> Maik


signature.asc (911 bytes) Download Attachment