Rviz not opening on the Linux for Robotics Rosject

I’m trying to learn Linux for Robotics and the project that comes with the course is not behaving as the course book says. The Gazebo simulation did open, but Rviz is not opening and my terminal seems to get an error.

Here is what my terminal says:

Can someone please explain to me what is wrong? I only copy pasted the commands

Please try the following.

  1. Click the Rviz button in the middle of the bottom bar to manually open it
    image
  2. If it does not work, try stopping the simulation running in the terminal with Ctrl+C and starting it again.