0
  1. host and target both ubuntu 16.04
  2. GDB is in use
  3. ssh works fine and X11 forwarding enabled - launching built app works with GUI
  4. Remote linux configuration in qtcreator was also created and successfully used for console apps.
  5. ~/.ssh/config contains X11Forward true

the question - the app fails with a error "no display found" . seems that qtcreator doesn't use system ssh with standard config . in other hand , Ican't find the option in qtcreator to enable X11 apps

has someone an experience in remote GUI debugging under qtcreattor?

is it possible at all?

amigo421
  • 2,429
  • 4
  • 26
  • 55

1 Answers1

2

QtCreator really seems to use an integrated SSH implementation and doesn't allow you to customize its options. Besides that, you can work around that problem. To do it, proceed as following:

  1. Log using real SSH with -X option activated to the host you want to debug. You must keep this connection opened throughout your tests.
  2. Find out which display is exported in this session using, for example env |grep DISPLAY bash_display

  3. On your QtCreator, open your Project properties using "Projects" icon on QtCreator left panel. qtcreator_projects

  4. In your kit "Run" option, go under "Run Environment", click on "Details", which will open a list, and add the variable "DISPLAY" with value equal to the one shown in step 2 enter image description here

  5. Now run your application. Your graphics part should show up correctly now, as it will be using the other session forward channel.
RDP
  • 946
  • 11
  • 14
  • actually , I now can't check this because I use another host with an access by cert (.pem). and if I'm trying to add this to qtcreator this shows me this: "Connecting to host... SSH connection failure: Decoding of private key file failed: Format not understood. Device test failed.". Of course , this is valid private key and I'm using this daily. – amigo421 Apr 04 '18 at 19:47
  • Don't you use the cert on "Tools -> Devices -> Private key file"? – RDP Apr 05 '18 at 21:14
  • yes, I've specified my pem file there and tried to connect , but got a error above – amigo421 Apr 07 '18 at 17:51
  • I didn't understand. It could not connect or it connected and the error persisted? – RDP Apr 07 '18 at 21:25
  • it could not connect. I'm specifying all parameters, including pem cert for the remote host and trying to test the connection. and it just shows me a error above, that can't read cert file file because of unknown format and then can't connect. but cert is absolutely valid, I'm using this daily , e.g. in clion ide for the same purposes – amigo421 Apr 09 '18 at 07:53