Re: Launch AppleScripts without utilizing the WindowServer
Re: Launch AppleScripts without utilizing the WindowServer
- Subject: Re: Launch AppleScripts without utilizing the WindowServer
- From: Brendon Bruns <email@hidden>
- Date: Sat, 09 Aug 2003 00:44:36 -0800
Hi Again!
It was suggested that I post again with some more information regarding what
my problem is, so here goes:
I am using the PHP function exec() (It just executes any shell command that
is put in-between the two (), just as if you have typed it in at the
terminal prompt) to try and execute various AppleScripts using osascript
from a web page. Here is a simple AppleScript attempted to be executed:
configure LabJack pin D0 as output
set LabJack pin D0 to high
(LabJack is a device that can send and receive information to and from the
outside world, labjack.com)
It would seem like all is well except for the fact that the Apache Web
Server (on which PHP is running) runs as the user www, the user from which
this script is being attempted to be executed from. The user www obviously
does not own WindowServer as it is an extremely limited user, so the scripts
refuse to be launched.
Why not simply use sudo from www to execute the script as root? Well, that
is the very LAST thing you want www to be able to do - gain root access!
User www is not allowed to gain root access through sudo so that in the
event that the server is compromised, the attacker can do very little
damage.
So, is this even possible now? Launch an AppleScript from a user who is not
able to sudo to root using osascript? This project of mine is starting to
seem impossible now!
Thanks again!
Brendon Bruns
>
Hello!
>
>
I am trying to launch a very simple script using osascript that does
>
not
>
require ANY GUI interaction. It simply launches, does its thing, and
>
quits.
>
It works just fine if you launch it from the user who is physically
>
logged
>
onto the machine itself (the one who is currently running
>
WindowServer).
>
>
However...if I try to launch the script from a user who is not running
>
WindowServer (Say I used SSH and logged into the box) it refuses to
>
run and
>
I get an error about a lack of connection to the default WindowServer.
>
>
Why does AppleScript require the WindowServer to be running, even if
>
there
>
is no GUI interaction as part of the script? How can I force the
>
script to
>
run without utilizing the WindowServer?
>
>
Thank You!
>
Brendon Bruns
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.