New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Open a GUI app as root command line?


Post Reply New Thread Subscribe

 
Thread Tools
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
I like to use the editor bluefish. I can open it from a command line $open -a bluefish this opens it ok. So when I need it with root rights I tried it as $sudo open -a bluefish. This opens bluefish but not with root rights.

Is there a command that will let me open this with root rights?
QUOTE Thanks
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
I found that you can use sudo bash to give the shell root rights. This works when you open bluefish it has root rights.

But now I can not find out how to change back to normal rights in the terminal? There must be some command. You can close the terminal and re open it that works.

Ooops me bad. sudo bash does not give bluefish or gedit root rights. So there must be some other way. Until I find it will use sudo pico.
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,327
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Why do you need to open the editor with admin privs? If you are editing files within your home directory, you shouldn't need that. If you do need to modify things as admin, I've found using a command line editor (vi) to be the fastest and quickest.

If you normally work with an editor that has admin privs all the time, you're asking for trouble should change your habits..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
Quote:
Originally Posted by Raz0rEdge View Post
Why do you need to open the editor with admin privs? If you are editing files within your home directory, you shouldn't need that. If you do need to modify things as admin, I've found using a command line editor (vi) to be the fastest and quickest.

If you normally work with an editor that has admin privs all the time, you're asking for trouble should change your habits..
RazOrEdge. I agree. I only use and editor with root rights when I need to edit a file that needs these rights. I can use pico for this it works ok.

I would rather use bluefish editor for everything. I just like the way it works. Under normal conditions it is used without root rights. As you can open pico with root privileges "sudo pico". I was trying to find a way to open bluefish or gedit as root when I needed to use them. Have not found a way to do this yet. That is what I was looking for.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,684
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
This should do the trick:
Code:
sudo /Applications/Bluefish.app/Contents/MacOS/Bluefish
You'll have to modify that command appropriately - I have no idea where the app bundle is nor do I know what the binary is called. Tab completion is your friend here.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks

Post Reply New Thread Subscribe


« Pictures on Simple Java GUI won't work. | Bash shell scripting in OS X »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Possible Keylogger - Not sure how to identify process in Activity Monitor Konstiin OS X - Operating System 10 07-10-2012 08:41 AM
mac app store and the iphone/ipad app store minfingr OS X - Apps and Games 1 01-06-2011 09:46 PM
Imac Drive read noise every 2 sec crosswire OS X - Operating System 5 01-08-2008 12:12 PM
Can't open Mac Help app !!! Jucawho OS X - Operating System 7 12-03-2004 01:55 AM
Open GUI applications as root gatorparrots OS X - Development and Darwin 1 03-03-2003 06:56 PM

All times are GMT -4. The time now is 05:16 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?