Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run an application as the user 'steve' with the window displayed on my desktop ( brendan ).

This is what I have been doing so far.

sudo -u steve open -a /Path/To/

No matter which application I try, it always runs with my privileges and not steve's, which is not what I want. The process is owned by me, even though I executed open under 'sudo -u steve' .

How can I simply execute a command from the console that will open any application with different user's privileges ( steve being the owning user of the process )?

Also, GUI tools such as RunAs and Peek-A-Boo ( I think that's what it was called, very similar ) are not an option. This command must be launched from a bash/zsh/python/whatever script.


share|improve this question

migrated from Feb 5 '12 at 14:35

This question came from our site for professional and enthusiast programmers.

The easiest way I'm aware of is to use the full path to the executable. For example:

$ sudo -u steve "/Path/To/"

That definitely works (I've just tested it with several applications under Lion).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.