[Scilab-users] Really headless figure generation in scilab

classic Classic list List threaded Threaded
8 messages Options
Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Really headless figure generation in scilab

Hello All,

Here is a Covid19 & forced remote work issue.
One of my students has to run some of his simulations and generate
png/svg figures on a linux workstation we don't have physical access to
given the current lockdown.

The problem is that from his Windows laptop without X server, he cannot
"ssh -YC" to the linux workstation but only "ssh -X".
He thus only have access to "-nogui" or "-nwni" modes were all the
graphics macros are deactivate.

Any of you ever faced a similar situation and found a solution?

Thanks in advance,


Antoine

PS: it's a pity that scilab is not able to do real headless figure
generation.

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

Hello,

Is VNC installed on the remote computer ? Ideally, TurboVNC is the best
choice because it includes headless OpenGL drivers.

S.

Le 29/04/2020 à 14:51, Antoine Monmayrant a écrit :

> Hello All,
>
> Here is a Covid19 & forced remote work issue.
> One of my students has to run some of his simulations and generate
> png/svg figures on a linux workstation we don't have physical access
> to given the current lockdown.
>
> The problem is that from his Windows laptop without X server, he
> cannot "ssh -YC" to the linux workstation but only "ssh -X".
> He thus only have access to "-nogui" or "-nwni" modes were all the
> graphics macros are deactivate.
>
> Any of you ever faced a similar situation and found a solution?
>
> Thanks in advance,
>
>
> Antoine
>
> PS: it's a pity that scilab is not able to do real headless figure
> generation.
>
> _______________________________________________
> users mailing list
> [hidden email]
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users 
>

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

In reply to this post by Antoine Monmayrant
You should start Scilab this way:

SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
_JAVA_OPTIONS='-Djava.awt.headless=true' bin/scilab-adv-cli

You will be able to use graphic commands (without visible output) and
then export directy with e.g. xs2pdf.

S.

Le 29/04/2020 à 14:51, Antoine Monmayrant a écrit :

> Hello All,
>
> Here is a Covid19 & forced remote work issue.
> One of my students has to run some of his simulations and generate
> png/svg figures on a linux workstation we don't have physical access
> to given the current lockdown.
>
> The problem is that from his Windows laptop without X server, he
> cannot "ssh -YC" to the linux workstation but only "ssh -X".
> He thus only have access to "-nogui" or "-nwni" modes were all the
> graphics macros are deactivate.
>
> Any of you ever faced a similar situation and found a solution?
>
> Thanks in advance,
>
>
> Antoine
>
> PS: it's a pity that scilab is not able to do real headless figure
> generation.
>
> _______________________________________________
> users mailing list
> [hidden email]
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users 
>

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab


On 29/04/2020 15:18, Stéphane Mottelet wrote:
>
> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
> _JAVA_OPTIONS='-Djava.awt.headless=true'


Thanks Stéphane for this dark magic!
It works.
Is this documented somewhere?


Antoine

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

I don't think so. This is the way Scilab is launched to build the
documentation.

S.

Le 29/04/2020 à 15:28, Antoine Monmayrant a écrit :

>
> On 29/04/2020 15:18, Stéphane Mottelet wrote:
>>
>> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
>> _JAVA_OPTIONS='-Djava.awt.headless=true'
>
>
> Thanks Stéphane for this dark magic!
> It works.
> Is this documented somewhere?
>
>
> Antoine
>
> _______________________________________________
> users mailing list
> [hidden email]
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users 
>

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

Hello,

Thanks for sharing the info Stéphane, it is documented on the scilab binary help page, on https://help.scilab.org/docs/6.1.0/en_US/scilab.html . However, this might not be clear enough. Maybe adding your usage as an example can help?

Thanks,

--
Clément

> -----Original Message-----
> From: users <[hidden email]> On Behalf Of Stéphane Mottelet
> Sent: Wednesday, April 29, 2020 3:33 PM
> To: [hidden email]
> Subject: Re: [Scilab-users] Really headless figure generation in scilab
>
> I don't think so. This is the way Scilab is launched to build the documentation.
>
> S.
>
> Le 29/04/2020 à 15:28, Antoine Monmayrant a écrit :
> >
> > On 29/04/2020 15:18, Stéphane Mottelet wrote:
> >>
> >> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
> >> _JAVA_OPTIONS='-Djava.awt.headless=true'
> >
> >
> > Thanks Stéphane for this dark magic!
> > It works.
> > Is this documented somewhere?
> >
> >
> > Antoine
> >
> > _______________________________________________
> > users mailing list
> > [hidden email]
> > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists
> > .scilab.org/mailman/listinfo/users
> >
>
> --
> Stéphane Mottelet
> Ingénieur de recherche
> EA 4297 Transformations Intégrées de la Matière Renouvelable Département
> Génie des Procédés Industriels Sorbonne Universités - Université de Technologie
> de Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688
> http://www.utc.fr/~mottelet
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

Hi,

Le 30/04/2020 à 09:22, Clément David a écrit :
> Hello,
>
> Thanks for sharing the info Stéphane, it is documented on the scilab binary help page, on https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.1.0/en_US/scilab.html . However, this might not be clear enough.

Yes. Particularly, I don't see any mention of

_JAVA_OPTIONS='-Djava.awt.headless=true'

which is mandatory (and should be added on-the-fly by the Scilab
script), I mean SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 are not enough.

S.

>   Maybe adding your usage as an example can help?
>
> Thanks,
>
> --
> Clément
>
>> -----Original Message-----
>> From: users <[hidden email]> On Behalf Of Stéphane Mottelet
>> Sent: Wednesday, April 29, 2020 3:33 PM
>> To: [hidden email]
>> Subject: Re: [Scilab-users] Really headless figure generation in scilab
>>
>> I don't think so. This is the way Scilab is launched to build the documentation.
>>
>> S.
>>
>> Le 29/04/2020 à 15:28, Antoine Monmayrant a écrit :
>>> On 29/04/2020 15:18, Stéphane Mottelet wrote:
>>>> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
>>>> _JAVA_OPTIONS='-Djava.awt.headless=true'
>>>
>>> Thanks Stéphane for this dark magic!
>>> It works.
>>> Is this documented somewhere?
>>>
>>>
>>> Antoine
>>>
>>> _______________________________________________
>>> users mailing list
>>> [hidden email]
>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists
>>> .scilab.org/mailman/listinfo/users
>>>
>> --
>> Stéphane Mottelet
>> Ingénieur de recherche
>> EA 4297 Transformations Intégrées de la Matière Renouvelable Département
>> Génie des Procédés Industriels Sorbonne Universités - Université de Technologie
>> de Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688
>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet
>>
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [hidden email]
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|

Re: Really headless figure generation in scilab

In reply to this post by mottelet
Hello Stéphane,


Sadly, after some testings, it doe not seem to work for me on the
machine I connect to with ssh (see transcript below).
The connection is done with bare 'ssh' and not 'ssh -X' (contrary to
what I wrote in a previous email) and your combination of env variables
still results in a bunch of errors...


Cheers,

Antoine

//////////////////////////

ssh remotemachine
SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
_JAVA_OPTIONS='-Djava.awt.headless=true' scilab-adv-cli
Error: unable to open display
Picked up _JAVA_OPTIONS:
-Djava.class.path=/usr/share/java/flexdock.jar:/usr/share/java/skinlf.jar:/usr/share/java/looks.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jhall.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/maven-repo/org/freehep/freehep-util/debian/freehep-util-debian.jar:/usr/share/maven-repo/org/freehep/freehep-io/debian/freehep-io-debian.jar:/usr/share/maven-repo/org/freehep/freehep-graphicsio/debian/freehep-graphicsio-debian.jar:/usr/share/java/freehep-graphicsio-emf-2.1.jar:/usr/share/java/freehep-graphics2d-2.1.1.jar:/usr/share/java/jrosetta-API.jar:/usr/share/java/jrosetta-engine-1.0.4.jar:/usr/share/java/jgraphx.jar:/usr/share/java/jogl2.jar:/usr/share/java/gluegen2-rt.jar:/usr/share/java/jeuclid-core.jar:/usr/share/java/jlatexmath-fop-1.0.7.jar:/usr/share/java/fop.jar:/usr/share/java/saxon.jar:/usr/share/java/batik.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/jlatexmath-1.0.7.jar:/usr/share/java/ecj.jar:/usr/share/java/javax.activation.jar:/usr/share/java/jaxb-runtime.jar:/usr/share/scilab/modules/graphic_objects/jar/org.scilab.modules.graphic_objects.jar:/usr/share/scilab/modules/javasci/jar/org.scilab.modules.javasci.jar:/usr/share/scilab/modules/completion/jar/org.scilab.modules.completion.jar:/usr/share/scilab/modules/preferences/jar/org.scilab.modules.preferences.jar:/usr/share/scilab/modules/scirenderer/jar/scirenderer.jar:/usr/share/scilab/modules/graph/jar/org.scilab.modules.graph.jar:/usr/share/scilab/modules/renderer/jar/org.scilab.modules.renderer.jar:/usr/share/scilab/modules/ui_data/jar/org.scilab.modules.ui_data.jar:/usr/share/scilab/modules/localization/jar/org.scilab.modules.localization.jar:/usr/share/scilab/modules/scinotes/jar/org.scilab.modules.scinotes.jar:/usr/share/scilab/modules/types/jar/org.scilab.modules.types.jar:/usr/share/scilab/modules/history_browser/jar/org.scilab.modules.history_browser.jar:/usr/share/scilab/modules/commons/jar/org.scilab.modules.commons.jar:/usr/share/scilab/modules/console/jar/org.scilab.modules.console.jar:/usr/share/scilab/modules/action_binding/jar/org.scilab.modules.action_binding.jar:/usr/share/scilab/modules/history_manager/jar/org.scilab.modules.history_manager.jar:/usr/share/scilab/modules/core/jar/org.scilab.modules.core.jar:/usr/share/scilab/modules/external_objects_java/jar/org.scilab.modules.external_objects_java.jar:/usr/share/scilab/modules/xcos/jar/org.scilab.modules.xcos.jar:/usr/share/scilab/modules/graphic_export/jar/org.scilab.modules.graphic_export.jar:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar:/usr/share/scilab/modules/gui/jar/org.scilab.modules.gui.jar:/usr/share/scilab/modules/helptools/jar/scilab_ru_RU_help.jar:/usr/share/scilab/modules/helptools/jar/scilab_images.jar:/usr/share/scilab/modules/helptools/jar/org.scilab.modules.helptools.jar:/usr/share/scilab/modules/helptools/jar/scilab_en_US_help.jar:
-Djava.awt.headless=true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.scilab.modules.jvm.LibraryPath
(file:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar) to
field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of
org.scilab.modules.jvm.LibraryPath
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
Could not access to the Main Scilab Class:
Exception in thread "main" java.lang.ExceptionInInitializerError
         at org.scilab.modules.localization.Messages.gettext(Unknown Source)
         at
org.scilab.modules.commons.xml.XConfiguration.<clinit>(Unknown Source)
         at org.scilab.modules.core.Scilab.<clinit>(Unknown Source)
Caused by: java.lang.NullPointerException
         at
java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2646)
         at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
         at java.base/java.lang.System.loadLibrary(System.java:1870)
         at org.scilab.modules.localization.MessagesJNI.<clinit>(Unknown
Source)
         ... 3 more

Scilab cannot create Scilab Java Main-Class (we have not been able to
find the main Scilab class. Check if the Scilab and thirdparty packages
are available).




On 29/04/2020 15:18, Stéphane Mottelet wrote:

> You should start Scilab this way:
>
> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1
> _JAVA_OPTIONS='-Djava.awt.headless=true' bin/scilab-adv-cli
>
> You will be able to use graphic commands (without visible output) and
> then export directy with e.g. xs2pdf.
>
> S.
>
> Le 29/04/2020 à 14:51, Antoine Monmayrant a écrit :
>> Hello All,
>>
>> Here is a Covid19 & forced remote work issue.
>> One of my students has to run some of his simulations and generate
>> png/svg figures on a linux workstation we don't have physical access
>> to given the current lockdown.
>>
>> The problem is that from his Windows laptop without X server, he
>> cannot "ssh -YC" to the linux workstation but only "ssh -X".
>> He thus only have access to "-nogui" or "-nwni" modes were all the
>> graphics macros are deactivate.
>>
>> Any of you ever faced a similar situation and found a solution?
>>
>> Thanks in advance,
>>
>>
>> Antoine
>>
>> PS: it's a pity that scilab is not able to do real headless figure
>> generation.
>>
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users 
>>
>

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users