Re: Radio Userland
Posted
Last Modified
In Response To
2/5/2002; 9:23 AM by Henri AsseilyLast Modified
In Response To
2/5/2002; 9:23 AM by Henri Asseily
Re: Radio Userland (#15645)
Reply To This Message [Edit]
<x-flowed ISO-8859-1>Ok, now bear with me for a second.
Assumptions:
1- Frontier can be started from the command line "./frontier.app &" or
something like that
2- Frontier is bound to the display server/window manager only
3- Quartz can be, as XWindows, redirected to another display
4- A fake Quartz display server can be compiled for OSX
Actions:
Run the fake Quartz display server, then run Frontier making it think
that it should bind to the fake display server, then log out.
The fake display server is made to run in the background, so Frontier
thinks that the user is still logged in, therefore it happily serves
away.
I know that it's doable with X applications, as a minimalistic fake X
display server is available that has the APIs and libraries but doesn't
actually need to display anything.
H
On Tuesday, February 5, 2002, at 12:15 PM, Emmanuel. M. Decarie wrote:
>> Stupid question: can it run command-line with "&", as a background
>> process that doesn't quit when you log out?
>> If so, then it is Unix.
>> (I have put my G4 450Mhz through so much Unix testing and it hasn't
>> died at all. THe BSD subsystem is rock-solid. I wrote some C code to
>> test in-memory data scanning and even with ridiculous memory usage and
>> page swapping, it held up like a champ. Ran for 8 hours non-stop at
>> that load, then came back down as if nothing had happened, happily
>> telling me all was well)
>
> No, I don't think so. I think that Frontier is using the same API as
> AppleScript to call the Darwin layer. And in both case, it seems that
> you can't just start a job and leave, you have to wait until the job
> have finish. What I heard, is the this API is "non-blocking" or maybe
> the contrary, I'm not familiar with these terms.
>
> I tried different combinations with Perl and fork but it doesn't work.
> I though that a forking was going to detach the child process from its
> parent but its not the case when the script is called from AppleScript
> (and I guess Frontier) instead of Terminal.app, so even if you call the
> parent script, Frontier will return only when the child script will end.
>
> The only solution that I saw was offered on the AppleScript Studio list
> in this thread:
> "[do shell script] forked daemons prevent command completion"
> <http://lists.apple.com/archives/applescript-studio/2002/Jan/3.html>
>
> What one need to do is to "daemonize" a Perl script like in the example
> in perldoc perlipc and in the above thread.
>
> Or one could use xml-rpc and call a Perl script this way. There is a
> magnificient module for that called SOAP::Lite that do also xml-rpc and
> which is very well documented.
>
> Good to see you aboard again Henri!
>
> Cheers
> -Emmanuel
> -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Emmanuel Décarie - Consultant
> Programmation pour le Web - Programming for the Web
> UserLand Frontier - Perl - JavaScript - AppleScript - HTML - XML
> http://www.scriptdigital.com
> ---> The Frontier Newbie Toolbox:
> <http://www.scriptdigital.com/fnt/frontierNewbieToolbox.html>
</x-flowed>
Assumptions:
1- Frontier can be started from the command line "./frontier.app &" or
something like that
2- Frontier is bound to the display server/window manager only
3- Quartz can be, as XWindows, redirected to another display
4- A fake Quartz display server can be compiled for OSX
Actions:
Run the fake Quartz display server, then run Frontier making it think
that it should bind to the fake display server, then log out.
The fake display server is made to run in the background, so Frontier
thinks that the user is still logged in, therefore it happily serves
away.
I know that it's doable with X applications, as a minimalistic fake X
display server is available that has the APIs and libraries but doesn't
actually need to display anything.
H
On Tuesday, February 5, 2002, at 12:15 PM, Emmanuel. M. Decarie wrote:
>> Stupid question: can it run command-line with "&", as a background
>> process that doesn't quit when you log out?
>> If so, then it is Unix.
>> (I have put my G4 450Mhz through so much Unix testing and it hasn't
>> died at all. THe BSD subsystem is rock-solid. I wrote some C code to
>> test in-memory data scanning and even with ridiculous memory usage and
>> page swapping, it held up like a champ. Ran for 8 hours non-stop at
>> that load, then came back down as if nothing had happened, happily
>> telling me all was well)
>
> No, I don't think so. I think that Frontier is using the same API as
> AppleScript to call the Darwin layer. And in both case, it seems that
> you can't just start a job and leave, you have to wait until the job
> have finish. What I heard, is the this API is "non-blocking" or maybe
> the contrary, I'm not familiar with these terms.
>
> I tried different combinations with Perl and fork but it doesn't work.
> I though that a forking was going to detach the child process from its
> parent but its not the case when the script is called from AppleScript
> (and I guess Frontier) instead of Terminal.app, so even if you call the
> parent script, Frontier will return only when the child script will end.
>
> The only solution that I saw was offered on the AppleScript Studio list
> in this thread:
> "[do shell script] forked daemons prevent command completion"
> <http://lists.apple.com/archives/applescript-studio/2002/Jan/3.html>
>
> What one need to do is to "daemonize" a Perl script like in the example
> in perldoc perlipc and in the above thread.
>
> Or one could use xml-rpc and call a Perl script this way. There is a
> magnificient module for that called SOAP::Lite that do also xml-rpc and
> which is very well documented.
>
> Good to see you aboard again Henri!
>
> Cheers
> -Emmanuel
> -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Emmanuel Décarie - Consultant
> Programmation pour le Web - Programming for the Web
> UserLand Frontier - Perl - JavaScript - AppleScript - HTML - XML
> http://www.scriptdigital.com
> ---> The Frontier Newbie Toolbox:
> <http://www.scriptdigital.com/fnt/frontierNewbieToolbox.html>
</x-flowed>
Enclosures
None.
Replies
Re: Radio Userland
2/5/2002 by Seth Dillingham
On 2/5/02, Henri Asseily said: >1- Frontier can be started from the command line "./frontier.app &" or >something like that >2-
2/5/2002 by Seth Dillingham
Re: Radio Userland
2/5/2002 by Emmanuel. M. Decarie
<x-flowed iso-8859-1>À (At) 14:23 -0800 05/02/02, Henri Asseily écrivait (wrote) : >3- Quartz can be, as XWindows, redirected
2/5/2002 by Emmanuel. M. Decarie