Re: Has anyone come up a way to force X11 not to open / close it?

From: John Wong <gokoproject_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 14 2012 - 02:20:18 MDT

Dear Gerry,
I think I should clarify the issue or the real questions again... sorry for
spamming.

I am now able to execute any image involve with X11 windows. Cool. I
finally learned that I have to issue -XY all the time (I have to tunnel
into my slave machine from home...)
However, this is done through terminal. Users will submit them through a
web browser, and get back the result.

So the main issue is whether NCL has any built-in command (when running ncl
< my_script.ncl) that will make all the windows turn into images (png. ps,
or even animated ncgm format)...
It seems like NCL does not...

I am, of course, will continue on finding a good way to monitor windows,
and close them because the script will not return as "finish" unless those
windows disappear / finish drawing...

John

On Thu, Jun 14, 2012 at 3:22 AM, John Wong <gokoproject@gmail.com> wrote:

> Dear Gerry,
>
> Thank you so much. The first link on gsn_open_wks was very helpful. Yes. I
> can now generate ps, png as I wish. I believe you are showing me the
> standard way (the clean way) of what users should do with their code.
> Obviously I should tell users the limitation (it doesn't make sense for
> them to run any X windows..).
>
> I am not familiar with NCL at all, but I doubt researchers would sit in
> front of the PC all the time waiting for result / using the interactive
> mode all the time.
> I guess the question is more about catching and turning down any X11
> attempt...
>
> I am sure there is a way to detect the windows popup in Linux (for
> example:
> http://superuser.com/questions/382616/detecting-currently-active-window)
> or basically monitor all the running processes...
> Just want to ask professionals, and potential real users?
>
>
> John
>
> On Wed, Jun 13, 2012 at 11:55 PM, Gerry Creager <gerry.creager@gmail.com>wrote:
>
>> Apologies for any types... I'm stuck working with a tiny keyboard on a
>> tablet... but...I'll try to respond in more detail tomorrow, but until
>> then, I recommend you look at
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_open_wks.shtmland see if that reference might help. The resources available at
>> http://ncl.ucar.edu are very useful, and you should familiarize yourself
>> with them. I've found them invaluable.
>>
>> gerry
>> On Jun 13, 2012 9:54 PM, "John Wong" <gokoproject@gmail.com> wrote:
>>
>>> Hey guys,
>>>
>>> I am an undergraduate student working on a browser-based computing
>>> program and one of the languages we supported is NCL. We don't know how to
>>> set the DISPLAY variable properly, because we are running these scripts in
>>> the background (send jobs to the slave machine, run there, and send back
>>> the results back to the master machine).
>>>
>>> For example, we tried to run gsun01n.ncl, but it said it couldn't open
>>> X11 workstation.
>>>
>>> We found this small snippet here(
>>> http://www.srnr.arizona.edu/ngdoc/ng4.0.1/ug/ncl/tutor/session4.html),
>>> and we adapted the PostScript solution.
>>> Here is the modified script: http://pastebin.com/F8aW3CNp
>>>
>>> If you look at line 11, we commented that out, and replaced with line 12
>>> called create
>>>
>>> That works. We are able to generate the graph in postscript format.
>>>
>>> However, this requires us to hack the users' code. Our goal is to let
>>> researchers to use our application, and the challenge is: we can't make
>>> them to change their codes... what if it's NASA guy running this? Thousands
>>> of lines!!!
>>>
>>> Has anyone forces it to close or ignore it? I can't even run my scirpt
>>> because it can't open the X Windows (display environment is set
>>> improperly..)
>>>
>>>
>>> If anyone has an idea or better solution, please let me know. I would
>>> love to make this app available and let all of you to test this...
>>>
>>> Thanks,
>>> John
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 14 02:20:30 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 15 2012 - 14:51:31 MDT