Re: Compiling NSAppleScript with getuid = 0
Re: Compiling NSAppleScript with getuid = 0
- Subject: Re: Compiling NSAppleScript with getuid = 0
- From: Lorenzo <email@hidden>
- Date: Sat, 17 Apr 2004 13:27:50 +0200
Hi,
I tried
sudo shutdown -h now
and the computer shuts down immediately whitout letting the users cancel the
task in case of open and not yet saved documents. This is not really fine.
The AppleScript to shutdown the machine works well in case of non root user,
and it, in case of open and not yet saved documents, asks the users to save
the docs, or cancel the task. That's fine.
Do you know how to do that with the "shutdown" tool?
And, the tool "shutdown", works only as super user, so, in case of non root
user, should I still use the AppleScript in order to shut down the machine?
Best Regards
--
Lorenzo
email: email@hidden
>
From: "A.M." <email@hidden>
>
Date: Fri, 16 Apr 2004 16:31:41 +0200
>
To: Lorenzo <email@hidden>
>
Subject: Re: Compiling NSAppleScript with getuid = 0
>
>
To shut down the machine, use NSTask to call "/sbin/shutdown"- as root,
>
of course. Better yet, use Authorization Services and Power Management.
>
>
On Apr 16, 2004, at 4:28 PM, Lorenzo wrote:
>
>
> Yes it was an example. That AS shuts down the machine. Since I didn't
>
> find a
>
> way to do that with Cocoa, I am using an AppleScript.
>
> I am going to ask to the AS list. Thanks for your help.
>
>
>
> Best Regards
>
> --
>
> Lorenzo
>
> email: email@hidden
>
>
,,,,,,,,,,,,,,,,,,,,,,,,,,,
>
AgentM
>
email@hidden
>
,,,,,,,,,,,,,,,,,,,,,,,,,,,
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.