-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/2754/os_x_edit_file_using_textedit_as_root_superuser/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
bej
4 comments · 1 points
-
dimithri
5 comments · 1 points
-
-
Popular Threads
-
Windows 7: How to Prevent the Mouse from Waking your PC
9 hours ago · 1 comment
-
Outlook 2010: Turn Off Attachment Preview
1 week ago · 1 comment
-
Gmail: How to Send SMS Messages Without Using Email
2 weeks ago · 2 comments
-
Windows 7 – Prevent Live Messenger from Opening at Start Up
1 week ago · 1 comment
-
Symfony: Drop Down List Box Without Submit Button
3 weeks ago · 1 comment
-
Windows 7: How to Prevent the Mouse from Waking your PC
2008-12-02 22:13:54.216 TextEdit[1144:c17] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x4403, name = 'com.apple.TextEdit.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
I enter
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts
Then my password and Text Edit does not open the HOSTS file.
Is something Wrong
Steps:
1: open ~/.profile in textedit with terminal command "open -t .profile"
2: insert the line "export PATH="$PATH:/Applications/TextEdit.app/Contents/MacOS/"
along with a commented (#) note why I was doing this
3: save that text file and close down terminal
4: open a new terminal window, enter "echo $PATH" to ensure that this new entry showed up somewhere in the path.
5: I can now use textedit as a superuser with "sudo textedit"
It saves about a few keystrokes in the long run if you like to edit previously uneditable files (but be careful!). Always save a backup of the file you are editing with the command:
"cp foo.txt foo.backup"