Turtlebot2 remote PC connection error "QXcbConnection: Could not connect to display"
I'm using a real turtlebot2, I have been following the instructions from the book "ROS robotics by example" to figure out how to work the turtlebot2 from a remote PC,I have been trying to perform gmapping from remote PC, all was going well until I ran this command on my remote PC : roslaunch turtlebot_rviz_launchers view_navigation.launch
I get this error:
QXcbConnection: Could not connect to display
[rviz-1] process has died [pid 8017, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz -d /opt/ros/kinetic/share/turtlebot_rviz_launchers/rviz/navigation.rviz __name:=rviz __log:=/home/turtlebot/.ros/log/39de43b2-7fed-11ec-a022-a0510b03a27d/rviz-1.log].
log file: /home/turtlebot/.ros/log/39de43b2-7fed-11ec-a022-a0510b03a27d/rviz-1*.log
I dont know why, I can Teleop my robot from my remote pc, and this same command that gives me an error on remote PC works just fine when I run it on the laptop connected to the turtlebot2 itself. i dont know how to fix this connection error.