Maybe is better set DISPLAY to default and then continue execution.
What you think is better?
On Tue, Apr 1, 2008 at 10:29 PM, Joćo Medeiros <ignotus21_at_gmail.com> wrote:
> 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_at_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
Received on Apr 01 2008