• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: As a Different User
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: As a Different User (From: email@hidden)

  • Prev by Date: Re: Let's hope XP doesn't keep this "one-up" on OS X!
  • Next by Date: Re: Let's hope XP doesn't keep this "one-up" on OS X! [OT]
  • Previous by thread: Re: As a Different User
  • Next by thread: Re: As a Different User
  • Index(es):
    • Date
    • Thread