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


One-liner? | 20 comments | Create New Account
Click here to return to the 'One-liner?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One-liner?
Authored by: jecwobble on May 21, '04 11:38:01AM
I'm not at my Mac right now so I can't test this (I know it works with out the "-u" option to run something as root), but I imagine a one line method for *.app applications could be:
sudo -u short_name open /Applications/app_name.app/Contents/MacOS/app_name
...and a one line method for Carbon applications could be (split after "/Versions/" for readability:
sudo -u short_name /System/Library/Frameworks/Carbon.framework/Versions/
Current/Support/LaunchCFMApp /Applications/carbon_app_name


[ Reply to This | # ]
One-liner?
Authored by: funkaster on May 21, '04 06:02:26PM
You don't need the whole path to the application, for instance, to open Safari you would type:
sudo -u some_user open /Applications/Safari
open is just like double clicking on the finder, you can even open documents with that.

---
funkaster./

[ Reply to This | # ]

Doesn't work here
Authored by: anjoschu on May 22, '04 02:29:30AM

I tried open and on my machine it opens the application as the current logged-in user, not as the shell-sudoer.



[ Reply to This | # ]