How to open httpd.conf with regular editor

jsn

Registered
Hi all

is there a way to open the file httpd.conf with a regular editor for the finder. Everytime I want to open the httpd.conf file I have to tuype something like:

sudo vi httpd.conf <password>

I would ike to open it with bbedit for example, how can I do that from the finder?

How do you open bbedit from the Terminal command line?

thanks
jsn
 
Command-I on the 'httpd.conf' file and Open with BBEdit.

terminal;

open /Applications/BBEdit\ 7.1/BBEdit.app/

or what ever your path is.

you can open Terminal, type open[space] and drag the BBEdit app there to get the path.
 
'... regular editor for the finder.', ?.

' I would like to open it' (httpd.conf) 'with bbedit for example, how can I do that from the finder?', select 'Finder's 'Go, Go to Folder...' menu item, enter

/private/etc/httpd/

... and click the 'Go' button. A window titled 'httpd' will appear.

Or, via 'Terminal' ..

open /private/etc/httpd/

... <return>. A window titled 'httpd' will appear.

Launch 'BBEdit' (if it's icon is not on the 'Dock') and drag 'httpd.conf' (from the 'httpd' window) onto 'BBEdit's 'Dock' based icon.

'How do you open BBEdit from the Terminal command line?', ...

bbedit /private/etc/httpd/httpd.conf

... <return>, works here.

Also, via 'Terminal' ...

/Applications/TextEdit.app/Contents/MacOS/TextEdit/private/etc/httpd/httpd.conf

[
Added 08.11.2005, at 11.03

Correction to above entry ...

/Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/httpd/httpd.conf

(please note the needed 'space' before '/private...')

Also note, a daemon of 'TextEdit' is launched - with 'httpd.conf' displayed. Closing the related 'Terminal' window will automatically close the 'httpd.conf' window and quit the daemon.

Ah, the things one learns ... after making a post.
]

... <return>, works - in opening 'httpd.conf'. However, 'TextEdit' will not allow one to save a file in a 'system' owned folder (such as '/private/etc/httpd/'); 'BBEdit' will.
 
There is an easier way to use BBEdit for modding the conf file than previously described.

Just use BBEdit as normal but select "Open Hidden...". Then in the Open dialog box set All Files, not Readable files in the top drop menu.

You can browse to any file, anywhere. Once it's open you can click on the Pencil Icon (on the very left, it will have a slash though it at first). Clicking it alllows one to save the file.

You'll get a warning that the file is owned by root but you'll be able to save after clearing the slash mark (you'll have to supply your password).

I think TextWrangler works exactly the same way. It's from BBEdit too, it's a free, limited version of BBEdit.
 
Back
Top