Connection problem with octoprint on linux

I installed Linux desktop 18.04 on an old PC and octoprint on top with this guide:

The problem is that at some point in printing, the printer simply stops moving and the octoprint page sends a message that the printer has disconnected even though nothing touched the USB cable between the printer and the PC, I suspect the problem is that I use USB WI-FI dongle to access the network. It will never automatically detect the printer so it will Ask me to configure the connection manually.
the printer is the original CR-10.