Discussion:
Newbie question
David Cortesi
2008-05-07 22:51:06 UTC
Permalink
Re using BBEdit for protected files, nobody has mentioned the open command,
which is very useful for connecting the command-line world of Terminal.app
to the world of GUI applications (see "man open").

The following shell-script opens anything as root in BBEdit:

#/bin/sh
sudo open -a /Applications/BBEdit/BBEdit.app $@

Our Mac "newbie" should experiment further with Terminal, it has a number of
helpful features. For example, drag-n-drop anything onto a terminal window
and the path to that thing (with all special characters escaped) is entered
into the current command line. So "ls -a <space> <drag-n-drop
folder><return>" lists the contents of that folder.
Charlie Garrison
2008-05-08 05:40:15 UTC
Permalink
Good afternoon,

On 7/5/08 at 6:51 PM -0400, David Cortesi
Post by David Cortesi
#/bin/sh
I think you'll find that only works if BBEdit is not already
running. And that will open the whole BBEdit app as root user
which is not something I would recommend for newbie users.

So my advice would be don't use the above technique unless you
fully understand the security implications.

Charlie
--
Charlie Garrison <***@zeta.org.au>
PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Maarten Sneep
2008-05-08 17:32:33 UTC
Permalink
Post by Charlie Garrison
Post by David Cortesi
#/bin/sh
I think you'll find that only works if BBEdit is not already
running. And that will open the whole BBEdit app as root user which
is not something I would recommend for newbie users.
So my advice would be don't use the above technique unless you fully
understand the security implications.
In addition to this: you can use the bbedit command to open the file,
and BBEdit will ask for your root password when saving the file. I
think this is much more elegant, and safer as well.

Maarten
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
David Nicholls
2008-05-09 01:14:51 UTC
Permalink
Post by Maarten Sneep
Post by David Cortesi
#/bin/sh
I think you'll find that only works if BBEdit is not already running.
And that will open the whole BBEdit app as root user which is not
something I would recommend for newbie users.
So my advice would be don't use the above technique unless you fully
understand the security implications.
In addition to this: you can use the bbedit command to open the file,
and BBEdit will ask for your root password when saving the file. I think
this is much more elegant, and safer as well.
Thanks for all the comments. I'm old and wise enough not to do anything
stupid with powerful commands (Unix in the hands of a dummy is like the
wizard's wand in the hands of Micky Mouse in the Sorcerer's Apprentice),
but it's good to know what's possible.

DN
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Continue reading on narkive:
Loading...