Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Replace /usr/bin/mail with' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Replace /usr/bin/mail with
Authored by: truhe on Aug 23, '03 04:59:39AM

it should work this way:

osascript -e 'tell application "Finder" of machine "epcc://USER:PASSWORD@" sleep'

but this gives me the following error messages:

kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
INIT_Processeses(), could not establish the default connection to the WindowServer.Abort

I enabled remote apple events and disabled my firewall for testing purposes, but it still fails...

any hints?

[ Reply to This | # ]
Replace /usr/bin/mail with
Authored by: njnystrom on Aug 23, '03 01:38:03PM

You could also try something like this script:

% osascript -e 'do shell script "sudo -u USER whoami"
                password "PASSWORD" with administrator privileges'

This works because root is allowed to sudo to any other user without a password.


[ Reply to This | # ]