r1mini@omo2:~$ ros2 run turtlesim turtlesim_node
젯슨ROS2 에서도 그렇고, Linux ROS2 에서도 위 명령을 실행하면 아래 오류가 나타납니다.
qt.qpa.xcb: could not connect to display 127.0.0.53:0
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
그래서 이를 해결하기 위해서
$ export DISPLAY=:0 을 실행하면 오류가 나지 않고 실행이 됩니다.
이 이유가 무엇인지 궁금합니다.
$ export DISPLAY=:0 명령을 계속 실행하지 않고, .bashrc에 고정 시키면 될 줄 알았는데 되지 않습니다. 다른 방법으로 고정시키는 방법이 있는지요?