In unit 3.1 you claimed melodic and dashing are sourced, but most updated noetic and foxy are actually sourced in the script above.
Plus in Unit 3.2 (Example 2) it asks for 4 shells, but 3 are actually used.
UPDATE: I’m trying example 3.1.
At first try, showimage opened Gacamole but the X window was frozen. I closed it and the second attempts prompted:
user:~$ ros2 run image_tools showimage
[INFO] [1661269340.475366706] [showimage]: Subscribing to topic 'image'
[INFO] [1661269341.344676430] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [1661269341.583070626] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [1661269341.692180233] [showimage]: Received image #camera_link
Received image #camera_link
[INFO] [1661269341.701041787] [showimage]: Received image #camera_link
Received image #camera_link
(showimage:1504): Gdk-ERROR **: 15:42:21.707: The program 'showimage' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
(Details: serial 263 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Changing unit didn’t solve the issue.
I then opened the GUI first, then I run imageshow and apparently now is working.