LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't run app w/ sudo command (https://www.linuxquestions.org/questions/linux-software-2/cant-run-app-w-sudo-command-368588/)

fatblueduck 09-30-2005 07:05 PM

can't run app w/ sudo command
 
I just installed wifi radar on my gentoo system.

for some reason, when I try to run wifi-radar through sudo ("sudo wifi-radar") it fails...
Code:

# sudo wifi-radar
Traceback (most recent call last):
  File "/usr/sbin/wifi-radar", line 1795, in ?
    import gtk, gobject
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 37, in ?
    from _gtk import *
RuntimeError: could not open display

This will happen, even if I try this as root.

Otherwise, when I am root I can simply type "wifi-radar" and the application will start with no problems.

thanks for any suggestions.

daihard 09-30-2005 07:22 PM

I run into similar problems from time to time. It's not always reproducible. What I do to get around it is to run "xhost +" as myself (i.e. normal user) before running "sudo" or becoming "su" to run commands. I don't have very good technical exlanations for this, but it usually works for me.

fatblueduck 09-30-2005 07:39 PM

that didn't enable sudo to execute wifi-radar. Thanks though.


All times are GMT -5. The time now is 12:14 PM.