You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by th...@apache.org on 2006/07/17 22:49:55 UTC

svn commit: r422860 - /lenya/zone/bin/setenv.sh

Author: thorsten
Date: Mon Jul 17 13:49:54 2006
New Revision: 422860

URL: http://svn.apache.org/viewvc?rev=422860&view=rev
Log:
Setting the server to -Djava.awt.headless=true via the JAVA_OPTIONS env

Modified:
    lenya/zone/bin/setenv.sh

Modified: lenya/zone/bin/setenv.sh
URL: http://svn.apache.org/viewvc/lenya/zone/bin/setenv.sh?rev=422860&r1=422859&r2=422860&view=diff
==============================================================================
--- lenya/zone/bin/setenv.sh (original)
+++ lenya/zone/bin/setenv.sh Mon Jul 17 13:49:54 2006
@@ -20,6 +20,7 @@
 
 DOC_ROOT=$DOC_ROOT_SRC/build/site
 export DOC_ROOT
+export JAVA_OPTIONS = '-Djava.awt.headless=true'
 
 export WEB_LOGS=http://lenya.zones.apache.org/log
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Michael Wechner <mi...@wyona.com>.
Josias Thöny wrote:

>On Tue, 2006-07-18 at 10:02 +0200, Thorsten Scherler wrote:
>  
>
>>El mar, 18-07-2006 a las 09:22 +0200, Josias Thöny escribió:
>>    
>>
>>>On Mon, 2006-07-17 at 20:49 +0000, thorsten@apache.org wrote:
>>>      
>>>
>>>>Author: thorsten
>>>>Date: Mon Jul 17 13:49:54 2006
>>>>New Revision: 422860
>>>>
>>>>URL: http://svn.apache.org/viewvc?rev=422860&view=rev
>>>>Log:
>>>>Setting the server to -Djava.awt.headless=true via the JAVA_OPTIONS env
>>>>
>>>>Modified:
>>>>    lenya/zone/bin/setenv.sh
>>>>
>>>>Modified: lenya/zone/bin/setenv.sh
>>>>URL: http://svn.apache.org/viewvc/lenya/zone/bin/setenv.sh?rev=422860&r1=422859&r2=422860&view=diff
>>>>==============================================================================
>>>>--- lenya/zone/bin/setenv.sh (original)
>>>>+++ lenya/zone/bin/setenv.sh Mon Jul 17 13:49:54 2006
>>>>@@ -20,6 +20,7 @@
>>>> 
>>>> DOC_ROOT=$DOC_ROOT_SRC/build/site
>>>> export DOC_ROOT
>>>>+export JAVA_OPTIONS = '-Djava.awt.headless=true'
>>>>        
>>>>
>>>Thanks for fixing this. 
>>>But wouldn't it be better to add the headless option to lenya.sh instead
>>>of setenv.sh? (Just like you described in your mail) 
>>>setenv.sh is specific to the zones, whereas fixing it in lenya.sh would
>>>fix the issue on all servers without X which are running jetty.
>>>
>>>WDYT?
>>>      
>>>
>>The setenv.sh are the environment variable of our zone, correct. I am
>>not sure whether we should add this as default in the jetty script.
>>
>>Is there a benefit if headless=false is set and the server has a
>>xserver?
>>    
>>
>
>I think setting headless=true shouldn't make any difference if an
>xserver is running, because we don't display anything. 
>I tried headless=true on my machine (with a running xserver) and
>everything seemed to be normal. But I didn't test extensively.
>
>Does anybody else have an opinion on this?
>  
>

if it's possible, then I think it would be nice to have this as part of 
lenya.sh

Michi


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Josias Thöny <jo...@wyona.com>.
On Wed, 2006-07-19 at 12:45 +0200, Thorsten Scherler wrote:
> El mar, 18-07-2006 a las 22:00 +0200, Thorsten Scherler escribió:
> ...
> > If nobody objects I will patch the shell script like described in the
> > other mail.
> 
> done

thanks!


Josias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Thorsten Scherler <th...@wyona.com>.
El mar, 18-07-2006 a las 22:00 +0200, Thorsten Scherler escribió:
...
> If nobody objects I will patch the shell script like described in the
> other mail.

done
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 18-07-2006 a las 17:24 +0200, Josias Thöny escribió:
> On Tue, 2006-07-18 at 17:15 +0200, Joachim Wolfgang Kaltz wrote:
> > Josias Thöny schrieb:
> > > On Tue, 2006-07-18 at 10:02 +0200, Thorsten Scherler wrote:
> > > (...)
> > >>
> > >>Is there a benefit if headless=false is set and the server has a
> > >>xserver?
> > > 
> > > 
> > > I think setting headless=true shouldn't make any difference if an
> > > xserver is running, because we don't display anything. 
> > > I tried headless=true on my machine (with a running xserver) and
> > > everything seemed to be normal. But I didn't test extensively.
> > > 
> > > Does anybody else have an opinion on this?
> > 
> > There are some things that may not work if this option is set. For 
> > example, IIRC introspection on an image file will use awt and therefore 
> > won't work. I vaguely remember some code in Lenya 1.2 (regarding asset 
> > handling) making use of this.
> 
> Lenya uses awt, that's right. And if there is no xserver running, it
> throws an exception. But if you set headless=true, it works even if no
> xserver is running. 
> Only things which directly use the display don't work (like e.g.
> creating an awt Panel).
> At least that's my understanding of the matter... I may be wrong.

http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/

Reading this article and Josias argument I agree to deliver the lenya.sh
with headless set to true.

One can always override it, by 
export JAVA_OPTIONS='-Djava.awt.headless=false'

If nobody objects I will patch the shell script like described in the
other mail.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Josias Thöny <jo...@wyona.com>.
On Tue, 2006-07-18 at 17:15 +0200, Joachim Wolfgang Kaltz wrote:
> Josias Thöny schrieb:
> > On Tue, 2006-07-18 at 10:02 +0200, Thorsten Scherler wrote:
> > (...)
> >>
> >>Is there a benefit if headless=false is set and the server has a
> >>xserver?
> > 
> > 
> > I think setting headless=true shouldn't make any difference if an
> > xserver is running, because we don't display anything. 
> > I tried headless=true on my machine (with a running xserver) and
> > everything seemed to be normal. But I didn't test extensively.
> > 
> > Does anybody else have an opinion on this?
> 
> There are some things that may not work if this option is set. For 
> example, IIRC introspection on an image file will use awt and therefore 
> won't work. I vaguely remember some code in Lenya 1.2 (regarding asset 
> handling) making use of this.

Lenya uses awt, that's right. And if there is no xserver running, it
throws an exception. But if you set headless=true, it works even if no
xserver is running. 
Only things which directly use the display don't work (like e.g.
creating an awt Panel).
At least that's my understanding of the matter... I may be wrong.

Josias

> Also, some classes in Java beans end up using AWT where you don't expect 
> it, such as in XML serializing of a Java bean. But I don't think we use 
> these in Lenya.


> 
> --
> Wolfgang
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Joachim Wolfgang Kaltz <jo...@uni-duisburg-essen.de>.
Josias Thöny schrieb:
> On Tue, 2006-07-18 at 10:02 +0200, Thorsten Scherler wrote:
> (...)
>>
>>Is there a benefit if headless=false is set and the server has a
>>xserver?
> 
> 
> I think setting headless=true shouldn't make any difference if an
> xserver is running, because we don't display anything. 
> I tried headless=true on my machine (with a running xserver) and
> everything seemed to be normal. But I didn't test extensively.
> 
> Does anybody else have an opinion on this?

There are some things that may not work if this option is set. For 
example, IIRC introspection on an image file will use awt and therefore 
won't work. I vaguely remember some code in Lenya 1.2 (regarding asset 
handling) making use of this.
Also, some classes in Java beans end up using AWT where you don't expect 
it, such as in XML serializing of a Java bean. But I don't think we use 
these in Lenya.

--
Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Josias Thöny <jo...@wyona.com>.
On Tue, 2006-07-18 at 10:02 +0200, Thorsten Scherler wrote:
> El mar, 18-07-2006 a las 09:22 +0200, Josias Thöny escribió:
> > On Mon, 2006-07-17 at 20:49 +0000, thorsten@apache.org wrote:
> > > Author: thorsten
> > > Date: Mon Jul 17 13:49:54 2006
> > > New Revision: 422860
> > > 
> > > URL: http://svn.apache.org/viewvc?rev=422860&view=rev
> > > Log:
> > > Setting the server to -Djava.awt.headless=true via the JAVA_OPTIONS env
> > > 
> > > Modified:
> > >     lenya/zone/bin/setenv.sh
> > > 
> > > Modified: lenya/zone/bin/setenv.sh
> > > URL: http://svn.apache.org/viewvc/lenya/zone/bin/setenv.sh?rev=422860&r1=422859&r2=422860&view=diff
> > > ==============================================================================
> > > --- lenya/zone/bin/setenv.sh (original)
> > > +++ lenya/zone/bin/setenv.sh Mon Jul 17 13:49:54 2006
> > > @@ -20,6 +20,7 @@
> > >  
> > >  DOC_ROOT=$DOC_ROOT_SRC/build/site
> > >  export DOC_ROOT
> > > +export JAVA_OPTIONS = '-Djava.awt.headless=true'
> > 
> > Thanks for fixing this. 
> > But wouldn't it be better to add the headless option to lenya.sh instead
> > of setenv.sh? (Just like you described in your mail) 
> > setenv.sh is specific to the zones, whereas fixing it in lenya.sh would
> > fix the issue on all servers without X which are running jetty.
> > 
> > WDYT?
> 
> The setenv.sh are the environment variable of our zone, correct. I am
> not sure whether we should add this as default in the jetty script.
> 
> Is there a benefit if headless=false is set and the server has a
> xserver?

I think setting headless=true shouldn't make any difference if an
xserver is running, because we don't display anything. 
I tried headless=true on my machine (with a running xserver) and
everything seemed to be normal. But I didn't test extensively.

Does anybody else have an opinion on this?

Josias

> 
> If not, we can add it to the lenya.sh.
> 
> salu2
> 
> > Josias
> > 
> > 
> > >  
> > >  export WEB_LOGS=http://lenya.zones.apache.org/log
> > >  
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
> > > For additional commands, e-mail: commits-help@lenya.apache.org
> > > 
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> > For additional commands, e-mail: dev-help@lenya.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Thorsten Scherler <th...@wyona.com>.
El mar, 18-07-2006 a las 09:22 +0200, Josias Thöny escribió:
> On Mon, 2006-07-17 at 20:49 +0000, thorsten@apache.org wrote:
> > Author: thorsten
> > Date: Mon Jul 17 13:49:54 2006
> > New Revision: 422860
> > 
> > URL: http://svn.apache.org/viewvc?rev=422860&view=rev
> > Log:
> > Setting the server to -Djava.awt.headless=true via the JAVA_OPTIONS env
> > 
> > Modified:
> >     lenya/zone/bin/setenv.sh
> > 
> > Modified: lenya/zone/bin/setenv.sh
> > URL: http://svn.apache.org/viewvc/lenya/zone/bin/setenv.sh?rev=422860&r1=422859&r2=422860&view=diff
> > ==============================================================================
> > --- lenya/zone/bin/setenv.sh (original)
> > +++ lenya/zone/bin/setenv.sh Mon Jul 17 13:49:54 2006
> > @@ -20,6 +20,7 @@
> >  
> >  DOC_ROOT=$DOC_ROOT_SRC/build/site
> >  export DOC_ROOT
> > +export JAVA_OPTIONS = '-Djava.awt.headless=true'
> 
> Thanks for fixing this. 
> But wouldn't it be better to add the headless option to lenya.sh instead
> of setenv.sh? (Just like you described in your mail) 
> setenv.sh is specific to the zones, whereas fixing it in lenya.sh would
> fix the issue on all servers without X which are running jetty.
> 
> WDYT?

The setenv.sh are the environment variable of our zone, correct. I am
not sure whether we should add this as default in the jetty script.

Is there a benefit if headless=false is set and the server has a
xserver?

If not, we can add it to the lenya.sh.

salu2

> Josias
> 
> 
> >  
> >  export WEB_LOGS=http://lenya.zones.apache.org/log
> >  
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
> > For additional commands, e-mail: commits-help@lenya.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org

-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r422860 - /lenya/zone/bin/setenv.sh

Posted by Josias Thöny <jo...@wyona.com>.
On Mon, 2006-07-17 at 20:49 +0000, thorsten@apache.org wrote:
> Author: thorsten
> Date: Mon Jul 17 13:49:54 2006
> New Revision: 422860
> 
> URL: http://svn.apache.org/viewvc?rev=422860&view=rev
> Log:
> Setting the server to -Djava.awt.headless=true via the JAVA_OPTIONS env
> 
> Modified:
>     lenya/zone/bin/setenv.sh
> 
> Modified: lenya/zone/bin/setenv.sh
> URL: http://svn.apache.org/viewvc/lenya/zone/bin/setenv.sh?rev=422860&r1=422859&r2=422860&view=diff
> ==============================================================================
> --- lenya/zone/bin/setenv.sh (original)
> +++ lenya/zone/bin/setenv.sh Mon Jul 17 13:49:54 2006
> @@ -20,6 +20,7 @@
>  
>  DOC_ROOT=$DOC_ROOT_SRC/build/site
>  export DOC_ROOT
> +export JAVA_OPTIONS = '-Djava.awt.headless=true'

Thanks for fixing this. 
But wouldn't it be better to add the headless option to lenya.sh instead
of setenv.sh? (Just like you described in your mail) 
setenv.sh is specific to the zones, whereas fixing it in lenya.sh would
fix the issue on all servers without X which are running jetty.

WDYT?
Josias


>  
>  export WEB_LOGS=http://lenya.zones.apache.org/log
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
> For additional commands, e-mail: commits-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org