GTK DISPLAY Error in GUI Application

1,074 views
Skip to first unread message

Ian Mallett

unread,
Sep 29, 2012, 2:36:27 PM9/29/12
to wx-u...@lists.wxwidgets.org
Hi,

I have written a GUI program (developed on Windows), and am working on cross-platform testing. When running from a console on Ubuntu 12.04, I get the following output
No protocol specified
No protocol specified
Error: Unable to initialize gtk, is DISPLAY set properly?

"echo $DISPLAY" returns ":0".

When running from an explorer window, no window opens.

Help? Thanks,
Ian

Vadim Zeitlin

unread,
Sep 29, 2012, 4:38:28 PM9/29/12
to wx-u...@googlegroups.com
On Sat, 29 Sep 2012 12:36:27 -0600 Ian Mallett wrote:

IM> I have written a GUI program (developed on Windows), and am working on
IM> cross-platform testing. When running from a console on Ubuntu 12.04, I get
IM> the following output
IM> No protocol specified
IM> No protocol specified

I have no idea where do these messages come from but they don't come from
wxWidgets. Perhaps you're using some unusual GTK+ version?

IM> Error: Unable to initialize gtk, is DISPLAY set properly?
IM>
IM> "echo $DISPLAY" returns ":0".

Is it exported? I.e. what does "env|fgrep -a DISPLAY" say?

Also do the other X11 applications run from this command line? E.g.
xclock?

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Ian Mallett

unread,
Sep 29, 2012, 6:20:31 PM9/29/12
to wx-u...@googlegroups.com
On Sat, Sep 29, 2012 at 2:38 PM, Vadim Zeitlin <va...@wxwidgets.org> wrote:
On Sat, 29 Sep 2012 12:36:27 -0600 Ian Mallett wrote:

IM> I have written a GUI program (developed on Windows), and am working on
IM> cross-platform testing. When running from a console on Ubuntu 12.04, I get
IM> the following output
IM> No protocol specified
IM> No protocol specified

 I have no idea where do these messages come from but they don't come from
wxWidgets. Perhaps you're using some unusual GTK+ version?
I have no idea. How is GTK+ related to wxWidgets?

IM> Error: Unable to initialize gtk, is DISPLAY set properly?
IM>
IM> "echo $DISPLAY" returns ":0".

 Is it exported?
I haven't set it myself, if that's what you mean.
 
I.e. what does "env|fgrep -a DISPLAY" say?
DISPLAY=:0

 Also do the other X11 applications run from this command line? E.g.
xclock?
No. xclock in particular gives identical output.
 
 Regards,
VZ
Thanks,
Ian

Gerald Brandt

unread,
Sep 29, 2012, 6:37:13 PM9/29/12
to wx-u...@googlegroups.com


----- Original Message -----
> From: "Ian Mallett" <geome...@gmail.com>
> To: wx-u...@googlegroups.com
> Sent: Saturday, September 29, 2012 5:20:31 PM
> Subject: Re: GTK DISPLAY Error in GUI Application
>
> On Sat, Sep 29, 2012 at 2:38 PM, Vadim Zeitlin < va...@wxwidgets.org
> > wrote:
>
>
>
> On Sat, 29 Sep 2012 12:36:27 -0600 Ian Mallett wrote:
>
> IM> I have written a GUI program (developed on Windows), and am
> working on
> IM> cross-platform testing. When running from a console on Ubuntu
> 12.04, I get
> IM> the following output
> IM> No protocol specified
> IM> No protocol specified
>

Are you trying to run the app as a different user than the one that logged into X?

Gerald

Ian Mallett

unread,
Sep 29, 2012, 7:22:59 PM9/29/12
to wx-u...@googlegroups.com
On Sat, Sep 29, 2012 at 4:37 PM, Gerald Brandt <g...@majentis.com> wrote:
Are you trying to run the app as a different user than the one that logged into X?
Not certain. I am running the application in a standard Ubuntu terminal (I'm not SSHed in or anything).

I logged in to Ubuntu using my standard username and password, and just started the terminal. The terminal does not (and cannot) have root access.

Gerald
Ian

Vadim Zeitlin

unread,
Sep 29, 2012, 8:19:01 PM9/29/12
to wx-u...@googlegroups.com
On Sat, 29 Sep 2012 17:22:59 -0600 Ian Mallett wrote:

IM> On Sat, Sep 29, 2012 at 4:37 PM, Gerald Brandt <g...@majentis.com> wrote:
IM>
IM> > Are you trying to run the app as a different user than the one that logged
IM> > into X?
IM> >
IM> Not certain. I am running the application in a standard Ubuntu terminal
IM> (I'm not SSHed in or anything).

If so running xclock should definitely work. And once it works, running wx
programs should work too. But this is not a wxWidgets problem at all,
something is seriously wrong on your system if you can't run any X
application. You probably should ask for help in Ubuntu forums because I
really have no idea about could be causing it, especially if you just are
on a normal Ubuntu installation.

Ian Mallett

unread,
Oct 4, 2012, 9:25:16 AM10/4/12
to wx-u...@googlegroups.com
On Sat, Sep 29, 2012 at 6:19 PM, Vadim Zeitlin <va...@wxwidgets.org> wrote:
this is not a wxWidgets problem at all,
something is seriously wrong on your system if you can't run any X
application.
Alright--thanks!
Reply all
Reply to author
Forward
0 new messages