|
Nmap Development
mailing list archives
Re: zenmap as root error
From: "João Medeiros" <ignotus21 () gmail com>
Date: Tue, 1 Apr 2008 22:29:14 -0300
You can just check if the DISPLAY environment variable is set. Like this:
----------------------------------------8<----------------------------------------
import os
import sys
if 'DISPLAY' not in os.environ.keys():
print "Unable to start graphical application. Please, set DISPLAY \
environment variable."
sys.exit(0)
import gtk
----------------------------------------8<----------------------------------------
Put this before "import gtk" in zenmap main file to avoid some warnings too.
Att, João Medeiros.
On Tue, Apr 1, 2008 at 4:21 PM, Fyodor <fyodor () insecure org> wrote:
On Sun, Mar 23, 2008 at 11:47:56PM -0300, eldraco wrote:
> Hi Aaron,
>
> Hope this helps you. Perhaps you already think about this, but...
> Try to set the DISPLAY variable before.
>
> If I don't set it before, I have the same output:
>
> #zenmap
> Segmentation fault
>
> But after I set It, it works like a charm:
Hm, thanks for the report. Zenmap should give a proper error in that
case, not segfault. When I unset my display, I get a much more useful
exception:
RuntimeError: could not open display
If anyone else gets the segmentation fault result described above and
can find a fix, I'd be happy to integrate it.
Cheers,
-F
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
By Date
By Thread
Current thread:
|