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 - 01:22:49 MDT

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 01:22:59 2012

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