Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sudo command wonn't run app
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
chrisduck
Apprentice
Apprentice


Joined: 30 Jun 2004
Posts: 283
Location: California

PostPosted: Sat Oct 01, 2005 8:24 am    Post subject: sudo command wonn't run app Reply with quote

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
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Sat Oct 01, 2005 2:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sat Oct 01, 2005 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
chrisduck
Apprentice
Apprentice


Joined: 30 Jun 2004
Posts: 283
Location: California

PostPosted: Sat Oct 01, 2005 11:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sun Nov 20, 2005 6:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum