Re: X server needed for agide --version?

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Aschwin Marsman wrote:

> In order to automatically check for updates of aap en agide,
> I use aap --version and agide --version in a shell script.
> 
> No GUI is needed for both, but agide would like to make a
> connection to the GUI:
> 
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> 
> 
> Gtk-WARNING **: cannot open display: :0.0
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> 
> 
> Gtk-WARNING **: cannot open display: :0.0
> 
> Is it possible to change agide to get "agide --version" 
> working without a GUI?

The problem appears to be that simply importing the wxPython module
already makes the connection to the X server.

I would call this a problem in wxPython, it shouldn't do real work when
only importing the modules.

Avoiding this problem is tricky.  It requires postponing all imports
that use wxPython until after checking for --version.  But it can be
done!  Get version 0.119 when it's there (next week).

-- 
ARTHUR:        What?
BLACK KNIGHT:  None shall pass.
ARTHUR:        I have no quarrel with you, good Sir knight, but I must cross
               this bridge.
BLACK KNIGHT:  Then you shall die.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.