View previous topic :: View next topic |
Author |
Message |
chrisduck Apprentice
Joined: 30 Jun 2004 Posts: 283 Location: California
|
Posted: Sat Oct 01, 2005 8:24 am Post subject: sudo command wonn't run app |
|
|
I installed wifi-radar on my gentoo system.
I can run the application as root without problem, but 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
|
? |
|
Back to top |
|
|
dgaffuri Advocate
Joined: 05 Jun 2005 Posts: 2078 Location: Italy
|
Posted: Sat Oct 01, 2005 2:39 pm Post subject: |
|
|
Probably your environment vars are not set (DISPLAY is a candidate). Look at man sudo for options regarding environment (I don't remember now and I'm not booted in linux). |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Sat Oct 01, 2005 2:41 pm Post subject: |
|
|
Those type of errors are due to a permissions problem. A quick search for "could not open display" gives lots of results including this one that may be the solution for you. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
chrisduck Apprentice
Joined: 30 Jun 2004 Posts: 283 Location: California
|
Posted: Sat Oct 01, 2005 11:47 pm Post subject: |
|
|
I can't edit that part of visudo without a syntax error, which seems strange because I'm only uncommenting that line which is already there.
Anyway thanks for steering me in the right direction |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Sun Nov 20, 2005 6:06 pm Post subject: |
|
|
I just ran into the same problem and got the same syntax error.
Turns out that looking at it again, you also need to delete the space in front of the command not just the '#'.
It needs to look like:
Code: | # Reset environment by default
Defaults env_reset
|
NOT Code: | # Reset environment by default
Defaults env_reset |
_________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
|