CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
Maik, would it be enough for you? System.getProperty() returns a system property, not the value of an environment variable unlike System.getenv().get().
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by neothemachine
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. > > 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 |
Administrator
|
In reply to this post by neothemachine
On 06/12/2013 05:22 PM, Sven Gothel wrote:
> On 06/12/2013 04:50 PM, neothemachine [via jogamp] wrote: >> 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 > -- health & wealth mailto:[hidden email] ; http://jausoft.com land : +49 (471) 4707742 ; fax : +49 (471) 4707741 Timezone CET: PST+9, EST+6, UTC+1 signature.asc (911 bytes) Download Attachment |
In reply to this post by gouessej
CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
Ok but then, should we name it "DISPLAY"? Shouldn't we pick a more specific name? x11.newt.display? whatever?
Julien Gouesse | Personal blog | Website
|
Administrator
|
On 06/13/2013 10:24 AM, gouessej [via jogamp] wrote:
> neothemachine wrote > gouessej [via jogamp] wrote: > > Maik, would it be enough for you? System.getProperty() returns a system > > property, not the value of an environment variable unlike > > System.getenv().get(). > > That's the point :) > > Jogl already uses the environment variable (a bit hidden through the > 'null' value of X11Lib.XOpenDisplay(null). What I want is to force Jogl > to use a different (custom) value instead. And the key is that it's not > possible to change environment variables, but it is possible to change > system properties. > > Ok but then, should we name it "DISPLAY"? Shouldn't we pick a more specific > name? x11.newt.display? whatever? to avoid [future] collisions .. ~Sven signature.asc (911 bytes) Download Attachment |
In reply to this post by gouessej
CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
In reply to this post by gouessej
On 06/13/2013 10:26 AM, Sven Gothel wrote:
> On 06/13/2013 10:24 AM, gouessej [via jogamp] wrote: >> neothemachine wrote >> gouessej [via jogamp] wrote: >> > Maik, would it be enough for you? System.getProperty() returns a system >> > property, not the value of an environment variable unlike >> > System.getenv().get(). >> >> That's the point :) >> >> Jogl already uses the environment variable (a bit hidden through the >> 'null' value of X11Lib.XOpenDisplay(null). What I want is to force Jogl >> to use a different (custom) value instead. And the key is that it's not >> possible to change environment variables, but it is possible to change >> system properties. >> >> Ok but then, should we name it "DISPLAY"? Shouldn't we pick a more specific >> name? x11.newt.display? whatever? > > We agreed to name it X11_DEFAULT_DISPLAY > to avoid [future] collisions .. since it is a java system property. Better name: 'nativewindow.x11.display.default' - using the trusted namespace 'nativewindow.*', e.g. readable via PropertyAccess. - looks nice and java'ish :) ~Sven > > ~Sven > > -- health & wealth mailto:[hidden email] ; http://jausoft.com land : +49 (471) 4707742 ; fax : +49 (471) 4707741 Timezone CET: PST+9, EST+6, UTC+1 signature.asc (911 bytes) Download Attachment |
Administrator
|
In reply to this post by neothemachine
That's ok for me. I will have to make a pull request (against Ardor3D) with my changes using the latest post build and implement your other request for enhancement very soon. Edit.: nativewindow.x11.display.default is better.
Julien Gouesse | Personal blog | Website
|
In reply to this post by Sven Gothel
CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
In reply to this post by neothemachine
On 06/13/2013 10:29 AM, neothemachine [via jogamp] wrote:
>> Ok but then, should we name it "DISPLAY"? Shouldn't we pick a more >> specific name? x11.newt.display? whatever? > > Yes, Sven suggested that, too, in private email. See my pull request: > https://github.com/sgothel/jogl/pull/66 > > Note that this change is independent of newt. > Thank you. Can you change the name to 'nativewindow.x11.display.default' ? Or do you agree that I do that ? Reasons .. see other mail (namespace). ~Sven signature.asc (911 bytes) Download Attachment |
Administrator
|
In reply to this post by neothemachine
It would be nice to have your change in the RC12 so that everything becomes clean in Ardor3D Maven support.
Julien Gouesse | Personal blog | Website
|
In reply to this post by Sven Gothel
CONTENTS DELETED
The author has deleted this message.
|
Administrator
|
On 06/13/2013 10:39 AM, neothemachine [via jogamp] wrote:
>> Can you change the name to 'nativewindow.x11.display.default' ? > > Sven, I'm not sure how to use the jnlpAlias boolean of > PropertyAccess.getProperty(key, jnlp) > > Should I set it to false? true - then you can also use 'jnlp.*' as a prefix, allowing JNLP and applets to utilize it. ~Sven signature.asc (911 bytes) Download Attachment |
CONTENTS DELETED
The author has deleted this message.
|
Free forum by Nabble | Edit this page |