How can I run a gui app from an su shell?

Hello,
I login to my mac as a non-admin account.  I then open a terminal and su to my admin account for anything requiring it.  I am trying to run a gui app from the terminal window, but get this error, and the app does not open:
$ /usr/local/bin/wireshark
2011-08-14 06:54:29.327 defaults[18406:903]
The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist
2011-08-14 06:54:29.346 defaults[18407:903]
The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist
./sync_osx_look.sh: line 40: gtkrc: Permission denied
(process:18396): Gdk-WARNING **: locale not supported by C library
(wireshark-bin:18396): Gtk-WARNING **: Locale not supported by C library.
          Using the fallback 'C' locale.
(wireshark-bin:18396): Gtk-WARNING **: cannot open display:
I know I can "switch user" but this is cumbersome as it requires typing a password each time, and I need to have applications side-by-side for easy access and testing.  Any thoughts?
Thanks.

I use LaunchAsRoot to run GUI apps as the root user, while logged in to my admin account.
Another way is to use Applescript.  Here's what I do to run Console as root:
do shell script "/Applications/Utilities/Console.app/Contents/MacOS/Console > /dev/null 2>&1 &" with administrator privileges

Similar Messages

  • How can I disable the Photos app from automatically running when I plug in my iPhone?

    How can I disable the Photos app from automatically running when I plug in my iPhone?
    I have no intention of ever using Photos, in fact, having to abandon Aperture takes me one step close to moving back to Windows, but I digress.
    I just want to NOT have to kill the Photos app every time I plug in my phone.
    Thanks.

    I am still seeing the option Image Capture, like shown in the screenshot that Rysz posted.   But it is another example of the hide-and-seek Apple likes to play with us.
    The option has to be set for each device individually. With the device connected to USB, you have to click the tiny disclosure triangle in the lower left corner of the sidebar to reveal the option.
    I was perfectly happy with the program I paid for (Aperture), and now to maintain the functionality I have to pay for another application (LightRoom) to get the functionality that I paid for in Aperture.
    Aperture 3.6 is working well with Yosemite. I will use it, as long as I have a Mac, that will run Yosemite or a compatible system.
    Have you looked at Capture One?  It looks much more similar to Aperture than Lightroom.

  • How can I run a BW Function from EXCEL-IN-PLACE (BPS)??? Please give any ex

    How can I run a BW Function from EXCEL-IN-PLACE (BPS)using VBA??? Please give any example.
    I would like to run my function module ZMY from EXCEL-IN-PLACE using VBA and get a result.

    if you are using excel in place in the web application environment I doubt you can, you've never really had any macro functionalty there.
    If you are in the gui environemnt (Planning folders) it will depend on how you want to invoke the module...

  • How can I delete un lite apps from my I pad

    How can I delete un lite apps from my I pad,I just upgraded my I pad 2 to ios7, now I have so many non working apps I try to delete them but they don't go away someone please help me?

    Have you tried syncing with your usual computer?

  • How can I delete stuff like apps from my iCloud account?

    How can I delete stuff like apps from my iCloud account?

    Select what you want to back up in iCloud (tap to enlarge image)

  • I just bought a new ITOUCH 4th Generation how can i transfer all my apps from my old ITOUCH 2nd Generation? Is it possible?

    I just bought a new ITOUCH 4th Generation how can i transfer all my apps from my old ITOUCH 2nd Generation? Is it possible?I just bought a new ITOUCH 4th Generation how can i transfer all my apps from my old ITOUCH 2nd Generation? Is it possible?
    Thanks

    If you want to transfer app dat you need to restore the new iPod from the backup of the old iPod.  Restoring from backup will result in your new iPod being just like your old iPOd except you will have to reenter keychain items like passwords since those only get restore to the same device upon a restore.

  • How can I import not only apps from the old iphone to the new iphone, but also the content of the apps?

    How can I import not only apps from the old iphone to the new iphone, but also the content of the apps?

    You can sync apps as you normally would, but I do not believe this copies over app specifc data (i.e. saved game status/scores).
    You can always restore your new device with a backup from your old device.

  • How can I completely delete an app from my Macbook Pro?

    How can I completely delete an app from my Macbook Pro?

    For programs that do not require an Administrator's password to install on your Mac, drag its program icon to the Trash. For those that require a password, research its developer's website or other support options for specific uninstallation instructions.
    Never use all-purpose "cleaners" or "zappers" or similarly named clever utilities to uninstall anything.

  • How can I migrate my iphone apps from a Windows Computer to a new imac so that I can syncronize my iphone from now on on this machine?

    ow can I migrate my iphone apps from a Windows Computer to a new imac so that I can syncronize my iphone from now on on this machine?

    Redownload all your purchased/free apps.
    How to redownload purchased apps from the App Store

  • How can i move my purchased app from apple id in russia to ukrainean app store when i change country

    I had my apple id in Russia and had a lot of purchased apps there. Recently i had to change a country of my apple id to Ukraine. So i have a question how can i move my purchased apps to apple id in Ukraine?

    You have been mislead. Other users report that what you have been told by the Hack is not true. The apps will appear to have disappeared, but if you try to update an app at first the MAS will appear to be selling you the app, but if you continue, as if to buy the app, the MAS will realize that you previously purchased the app and download it for free. You can test this for yourself using a free or inexpensive app.

  • How can I transfer a purchased app from my laptop to my Mac Pro?

    Okay, here's the problem: I always sync and backup my iPhone on my Mac Pro. However, I recently bought an app from iTunes on my laptop. Both my Mac Pro and my laptop are authorized for my account. However, when I plug my iPhone 4 into my laptop to add the app I purchased (in the usual way, by clicking on the App tab and dragging the newly purchased app into my iPhone home window), iTunes asks me if I really want to delete all of my other purchased apps (forty-something of them). Of course, I DON'T want to do that, but I can't figure out a way to transfer the purchased app from iTunes on my laptop to iTunes on my Mac Pro (where all my other apps live). I called Applecare, and they suggested that I copy all of the folders from my Mac Pro/Users/Me/Home/Library/iTunes/ folder to the matching folder on my laptop, which I did, but to no avail. Do I have to buy the app all over again (on my Mac Pro or directly on my iPhone)????
    It just occurred to me that I might be able to back up my iPhone on my laptop in addition to my Mac Pro, after which I might be able to add the recently purchased app without a problem. But if the answer is so simple, why didn't the applecare person suggest this? Has anyone else run into this conundrum?

    If you bought an app, if you try to buy it again it will just download the app again. You do not get double billed for the app. So you could down load the app again on your iphone or on your desktop. Alternatively you could use Home Sharing to sync purchased apps, movies, music between the computers. http://support.apple.com/kb/HT3819 explains how to enable/use home sharing.
    I hope that helps

  • How can I launch an external app from a keynote presentation?

    I'm trying to launch a Prezi presentation ("Prezi.app") from a keynote presentation, but don't know how to do it.
    Links in keynote can only refer to websites or slides within the presentation, but not to start another App, like in - I hate to say it - Powerpoint.
    Any ideas?
    Thanks
    Juergen

    Keynote is specifically prevented from opening applications.
    In Keynote 09 (the previous version), hyperlinks can:
    Jump to a slide in the same presentation
    Open a webpage in the computer’s default web browser
    Open another Keynote document
    Open an email message
    Exit the slideshow
    in Keynote 6 (the latest version) hyperlinks can:
    Jump to a Slide in the same presentation
    Web page
    Mail opens a pre-addressed email message
    Exit the presentation

  • How can i send my purchased apps(from itunes in my computer) to icloud through new icloud control panel on my windows computer

    I usually buy apps from my computer but i am unable to send these on icloud.
    I use a windows 7 64-bit
    I upgraded my itunes and got the icloud control panel but i am not able to stream my photos or apps to it
    Can someone help.

    Redownload all your purchased/free apps.
    How to redownload purchased apps from the App Store

  • How can i change a paid app from an Apple ID to other different Apple ID?

    Hello,
    When i puchased my Ipad 2 i purchased a couple of paid apps for my little daugther, however due the damage she caused to my device, i decided to buy a new ipad.
    I need to keep my Apple ID intact and thats why i have created a new one for my wife to be used with her apps and my little dauther apps.
    My question is: How to change just a couple of paid apps from my account to the new account? Do i have to buy the apps again to use it trough the new Apple ID?
    Thank you

    yes u do. there is no way to transfer apps to another apple id.
    u can, however, keep the same apple id signed into the itunes/app section of every device and be able to keep ur apps. if u want wife and daughter to have different apple id's then just sign into those id's in the other places (like icloud settings) but leave urs signed into the itunes.
    if u do that then it might be a good idea to put restrictions on the other devices to prevent ur daughter from being able to buy anything

  • How can I run an external program from a PLSQL procedure?

    Is there a package to run an external program from PLSQL? or is there another way to do that?
    thanks.

    here there is an example about how a PL/SQL procedure can
    work with an external C program.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
    Apart from that you have Java Stored Procedures option
    to carry out your task.
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
    Joel P�rez

Maybe you are looking for

  • SQL Report query ORA-06502: PL/SQL: numeric or value error: character strin

    Hello, I have saved below query in the sql scripts, which executes good under SQL Developer, select     "RVV"."RLNUM" as "RLNUM",      "GVREB"."RLNUM" as "RLNUM",      "TVV"."RLNUM" as "RLNUM_1",      "Regulation"."CODE" as "CODE",      "Regulation".

  • Program RFFOUS_C: No records selected

    Hello Experts, I'm having issue cannot assign cheque in payment run. Currently I'm using outsource bank to issue cheque. When I do payment run, it will send the data through EDI to the respective bank.  In future, I want to have 2 method, outsource a

  • ORA-20001: error 29th ORA-24344 When creating a workspace

    Hi, I just installed APEX 4.0 on 10g (10.2.0.4). When I tried to create a new workspace, at the last step (after clicking "Create Workspace" button), it fails with the following error. ORA-20001: error 29th ORA-24344: success with compilation error E

  • COM Add-in Program Required to run XL Reporter

    Dear All, When I am Opening New (RG23A Part 1) Report in XL Reporter, System giving bellow Error A Required COM Add-in Program XL Reporter has not been loaded and Prohibits Microsoft Excel from running. I facing this Error on Server & One Client Also

  • Addl planning field in ME21N

    dear sirs, please let me know the importance of the field ADDL PLANNING which is appearing in the bottom part of the PO creation screen(ME21N) just in between item tabs and po line items. what is the importance of the same,