Run GUI app with sudo privileges and no need for Terminal?

I try to use 'Locator' (the GUI version of the 'locate' command) but find that it can't update its database without root privileges, which defeats the GUI-ness of it.

Can it be set up to be 'run as administrator' a la Vista?

iMac 24", Mac OS X (10.5.8)

Posted on Apr 15, 2010 5:46 AM

Reply
19 replies

May 9, 2010 5:46 AM in response to baltwo

I'll have to revise my notes. In any event, if one wants to rebuild the locate database so there aren't any exclusions, they need to run the Leopard version, not the crippled SL one.


The Leopard version of WHAT? 310locate ? /usr/libexec/locateupdatedb ? Let's not even go there.

I just ran SnowLeopards version of /usr/libexec/locateupdatedb as a non-human user. Guess what?
I get the same results as if I was running 310locate in Leopard. It reveals the whole local filesystem.

May 9, 2010 11:42 AM in response to Mark Jalbert

Leopard's /usr/libexec/locateupdatedb file. Run it and you can locate anything in any user account; whereas, SL's and Leopard's 310locate excludes other accounts, and maybe other places. On a single-user machine, that's crippling, especially if you have multiple accounts for different purposes. Anyway, we've beaten this horse to death and we should just move on.

May 17, 2010 3:04 PM in response to baltwo

Well, I'm not trying to beat a dead horse. I don't know what you don't understand about +"The Leopard version of WHAT? 310locate ? /usr/libexec/locateupdatedb ? Let's not even go there."+ It is very difficult to understand made up terminology such as +"On a single-user machine, that's crippling, especially if you have multiple accounts for different purposes."+ The operating system is designed so that a user's "user land", home folder (directory), is supposed to be PRIVATE and not revealed to any other users, whether it is a login user or it is in your terminology a "unix user". As I said originally posted, +"It's a good idea NOT to run- /usr/libexec/locate.updatedb from your shell or another application."+ What happens is your ENVIROMENT is used in the locate.updatedb shell script thus revealing files in your home folder (not a good idea) to any user on the system.

At least to try to bring this back to "on topic", the OP is using the wrong tool, like using a hammer to drive a screw. It can be done but it is very messy. What sould be done is consult the bill of material file left by the installation and use that to remove the application and any supporting files. Plus, any usual suspect files in /Library and ~/Library.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Run GUI app with sudo privileges and no need for Terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.