Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Utilities (Apple)

Journal Elwood P Dowd's Journal: Run As for OS X (not just sudo) 5

I want multiple versions of Safari running at the same time with different cookie sets.

Is there a way to run two applications in the same workspace as different users under OS X? I know I can sudo whatever I like, but

sudo -u myroommate open /Applications/Safari.app/

just starts Safari as the current logged in user.

I can use fast user switching, but I don't want to. rooSwitch is closer to what I want. Exactly what I want is "Run As..." shortcuts, like in Winders. Any hints?

This discussion has been archived. No new comments can be posted.

Run As for OS X (not just sudo)

Comments Filter:
  • But I have two pieces of advice. One is that the .app is not the executable, and 'open' does... well, who knows? :) But you could try sudo'ing the executable itself, which is someplace inside the .app directory which constitutes a package. (Is that the right terminology?) Barring that, you could try using 'su -c' instead of sudo. That requires entering the password of the user as which you want to run the command, unless you're root. You might be able to 'sudo su -c'. I've never tried that either :) But it
  • The way the "open" command works is that it tells the Finder to start the application. Since the Finder is running as the current logged-in user, the application doesn't run as the user you launch the open command. Also, as someone else mentioned, the .app is actually a folder, a package to be precise, which is not executable. The application is actually inside the package, in the Contents/MacOS subfolder, usually named for the package name. So for example for TextEdit:

    sudo /Applications/TextEdit.app/Conten
    • you should ask the gurus at afp548.com
    • That worked like a damn charm.

      That's inches from ideal. I think there might be an opportunity for a shareware developer to make that setup a little more slick.

      It carped about keychain access the first few times I tried that, and eventually stopped, although I'm not sure why. And it still barfs if I tell it to autofill passwords.

      If it rooted around for the right keychain and had its own icon, my roommates would slay for it. Hmm. Maybe it'd work nicer w/ firefox, since firefox doesn't use keychains anyway...

      T
      • Interesting behavior there. I can see two reasons for it: The first is that 10.4 stupidly names every keychain login.keychain, which might cause some confusion. You could try renaming the keychains and see how it changes the issue, but that in its turn could cause some other problems so be careful.

        Another reason could be that your keychain list doesn't "know" about his keychain and Safari isn't really accessing the keychain as such, but really asking the loaded keychain framework and thus not finding the ot

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...