-1

I’am able to compile and build a Linux application remotely to a raspberry pi. It would help me if I can debug aswell.

The problem is when I try to debug with visual studio and just before the application is about to launch I get the following error:

Error: Unable to initialize gtk, is DISPLAY set properly?

I am aware that it has something to do with remotely starting a graphical application. A solution would be to start the ssh connection with -X or -Y parameter.

Unfortunately Visual Studio doesn’t let me add arguments in the ssh connection.

Is there a way to add those arguments?

1
  • Thank you for your comment and the information provided. The issue above is part of the development process and therefore in my opinion on-topic. Luckily i have resolved the issue.
    – JFr
    Feb 23, 2019 at 9:28

1 Answer 1

0

I figured it out and I'am able to debug a GUI application remotely from Visual Studio to a Linux machine(Raspberry PI).

The remote machine has to know on what display the application to run.

Add export DISPLAY=:0.0 to the Configuration Properties–>Debugging–>Pre-Launch Command setting so the Linux machine knows which display to show the window on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.