Re: As a Different User
Re: As a Different User
- Subject: Re: As a Different User
- From: Eric Peyton <email@hidden>
- Date: Fri, 6 Jul 2001 11:34:36 -0500
No - you can't. You can only su to root and run an app as root.
Su'ing to another account will not work.
On a 10.0.4 system.
[spawn:~] [epeyton] su test
Password:
[spawn:/Volumes/HomeDir] test% open -a TextEdit
Documents/TerminalTest.txt
kCGSErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGSErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGSErrorInvalidConnection : CGSGetEventPort: Invalid connection
[spawn:/Volumes/HomeDir] test%
Okay try it directly ...
[spawn:/Volumes/HomeDir] test%
/Applications/TextEdit.app/Contents/MacOS/TextEdit
kCGSErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGSErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGSErrorInvalidConnection : CGSGetEventPort: Invalid connection
The Core Graphics subsystem will not allow you to do this. It
checks to make sure the executing user is either a) the same user
as the person who owns /dev/console or b) the root user.
Eric
On Friday, July 6, 2001, at 10:18 AM, email@hidden wrote:
You can run another app if you use the terminal...just type su
<username> to login as that user, then just use the open command
to open that app up under that user. Takes care of the
authentication :D
Mike
I don't think "logging in beside" another user is a big deal.
However, it'd be nice to be able to launch an app as a different user.
Thus, while dad's surfing, Bobby can launch Mail as "bobby" and
get his
email from his mac.com account.
All that would really require - I think - is the ability to open
an app
as a different user, and all that requires is a prompt for the
username/password and the use of that user's userDefaults file.
This seems like it could be done. Perhaps even in a "virtual desktop"
thing like that Space open source thingy. Maybe two copies of
Mail could be
running - one in each virtual "space."
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev