How to use eclipse and debug GTK in yocto images?

Hello world,
I’m trying to use eclipse and debug GTK application, in
IMX6DL, now I’m able to cross compile the application, now I want to debug the application wirelessly so what is the way to do that?

While wirless debugging GTK application from eclipse,
I’m getting this error

root@colibri-imx6-10934338:~# /home/root/hello_world;exit

(hello_world:1164): Gtk-e[1;33mWARNINGe[0m **: e[34m12:08:00.777e[0m: cannot open display: :0.0

I’m using ubuntu 20.04.

regards,
Nolan

Hi @Nolan_Maverick ,

Can you elaborate a bit more about your setup?
Are you using a custom carrier board?

Which version of the BSP are you using?

Best Regards
Kevin

Hi @kevin.tx ,
I’m using Colibri Evaluation Board,
and I’m using BSP 5, I followed this link Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center
exactly to generate image, I used toradex reference multimedia image

please ask if any more information is needed?

warm regards,

Nolan

Hello @kevin.tx
do you need anymore information?

Hello @Nolan_Maverick,

Did you follow this article from our developer web-page for setting the remote debugging options on eclipse?

Your error message looks more like a problem with the wrong settings on X11 forwarding. Could you please try the following:

  1. Go to the file /etc/ssh/sshd_config on your colibri module and enable x11 forwarding as: X11forwarding yes

  2. Go to the debugging configuration → “Commands to set before execution” on Eclipse and add the command: export DISPLAY=":0.0"
    Please check if it works after the second step. If not try to set the Display manually from the command line of the host machine (your Ubuntu machine) by running the command:
    export DISPLAY="127.0.0.1:10.0"

Let me know if that solves your problem. Happy debugging :slight_smile:

Hi @rudhi.tx
thanks for your suggestion, I don’t have any ssh folder under /etc directory

and when I tried both

  1. export DISPLAY=":0.0"
  2. export DISPLAY=“127.0.0.1:10.0”
    But I’m getting error

root@colibri-imx6-10909128:~# export DISPLAY="127.0.0.1:0"root@colibri-imx6-10909128:~# ./hello_world 
(hello_world:684): Gtk-WARNING **: 12:46:16.358: cannot open display: 127.0.0.1:0

warm regards,
Nolan

Hello @rudhi.tx and @kevin.tx ,
Thanks for your suggestions, previously I was using dropbear, but now I’m using openssh, through which I’m able to display GTK application wirelessly.

Warm Regards,
Nolan

Hi @Nolan_Maverick,

Thanks for the update and glad to hear that it works for you now :slight_smile: