Unable to run cuda sample by using nsight in remote mode

Hi.
I try to build and run “boxfilter-arm” sample based on “https://devblogs.nvidia.com/cuda-jetson-nvidia-nsight-eclipse-edition/”. I can build this example and move executable file to tegra tx2 machine.
On the target machine this can be app run and work fine(via terminal).
But if i try to use run as remote c/c++ application in nsight from host machine(host machine is a virtual machine with ubuntu 18.04), next error will be occurred.
Error
Error: “Error setting up toolkit java.lang.NullPointerException”.
I can run this example from host terminal via ssh -X connection while the DISPLAY variable is set to :1 on target machine.
Can anybody help me why this error occurred for me when i try to run this app as remote c/c++ application in nsight?

Hi. I solved this problem by doing next operations:

  1. specifying the remote toolkit path in Run Configuration.(/usr/local/cuda/bin)
  2. Run nsight as sudo.
  3. Set DIASPLAY=’:1’ on target machine.(tegra tx2)