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

A simple way to launch GUI apps as root System
The site has a really nice writeup on launching GUI apps as root. After searching fruitlessly I found this hint to be succinct and useful.

[robg adds: I haven't needed a GUI app running as root for quite a while, but that's probably because I tend to do most of my root editing in the Terminal using sudo vi. Keep in mind that you can do great damage quite easily if you're running an editing application as root; I strongly recommend quitting the editor as soon as you finish whatever task required root.]
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)

A simple way to launch GUI apps as root | 7 comments | Create New Account
Click here to return to the 'A simple way to launch GUI apps as root' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A simple way to launch GUI apps as root
Authored by: GlowingApple on Jul 16, '04 12:36:00PM

This seems to work great for applications, so for editing text files and plist files and such it will be very helpful. However, is there any way to open a path as root using Finder? Using the open command is the only way I can see, but as that post mentioned, sudo open doesn't actually open the path as root. I have tried specifying the entire path of Finder (sudo -b /System/Library/.../ followed by the path of the folder I want to open as root. My dock flashes briefly, as if Finder were relaunched, but that's all I see. When I look at what applications are running, I have another Finder running. The only way I can see how this would work is to do a killall on Finder, and then open Finder as root. Would this essentially give me root access on folders? I could then killall Finder when I'm done and launch it as my normal user. Any idea if this is what I would need to do, or is there any way to just open a single folder as root???


When Microsoft asks you, "Where do you want to go today?" tell them "Apple."

[ Reply to This | # ]
root Finder
Authored by: r0n on Jul 19, '04 05:23:48AM

I think there was a hint for this since 10.1:

just copy /System/Library/.../ to anywhere and rename it or whatever. Now you´re able to drag´n´drop on Pseudo to run as root.

However then there are two Finders running (the User Finder and the pseudo-root copy) sharing the same Dock Icon. In Panther you could distinguish between the User and Root mode windows: The sidebar will contain "root" and the whole finder window configuration might appear different..

Since it´s a bit messy to quit the Finder from Dock if you were adding the 'quit' menu entry (gonna be relaunched instantly sometimes...) i prefer killing the Root-Finder from Terminal or ActivityMonitor utility.

[ Reply to This | # ]
Editing text files as root
Authored by: brion on Jul 16, '04 04:48:24PM
If you want something a little nicer than vi (or Terminal-based emacs ;) BBEdit will let you authenticate at save time when saving files you don't normally have write access to. Not sure if the cheap version does too.

[ Reply to This | # ]
Editing text files as root
Authored by: sjk on Jul 16, '04 08:55:24PM

TextWrangler prompts for authentication when saving to a write protected file that it's opened, but won't allow saving to one with a different filename (e.g. using "Save As") if the directory is write protected. And it only allows overwriting writable files in directories not owned by the user if it's opened them.

Someone more familiar with TextWrangler may know better. I won a copy the other day so your post was a reason to test it and reply.

[ Reply to This | # ]
Editing text files as root
Authored by: Musti on Jul 17, '04 05:15:05PM

How I wish SubEtheEdit could do that out-of-the-box without any tricks (sudo SEE). It is a very nice, cocoa based, free, colloborative text editor written for OS X, not a port of an aging app (re: BBEdit) that costs more than the OS it runs on...

[ Reply to This | # ]
A simple way to launch GUI apps as root
Authored by: prichardson on Jul 16, '04 06:36:55PM
I recommend a little app called Pseudo. It's $15 shareware, and I know the guy who wrote it, so please pay if you find it useful.

[ Reply to This | # ]
A simple way to launch GUI apps as root
Authored by: simonpie on Jul 18, '04 12:07:56PM
pseudo is in fact nicer than the hint herein contained. If you use
sudo -b /pathtococktail/Cocktail
, then Cocktail will still ask the logged in user to authenticate before doing anything, and Cocktail has the feature (euphemism) of not letting you changing the user to authenticate. While pseudo does a correct job of asking for the administrative password.

[ Reply to This | # ]