There is a Service in which perl scripts are associated with certain requests. Some scripts run GUI utilities. When you run scripts from the console, everything works. But if you run these scripts as processes generated by the service, then graphical applications do not start. That is, the scripts, judging by other requests, are launched, but the applications specified in them are not.
UPD: The service slows down the perl script process at the end of the timeout - 1 minute. And the result (return code) of the program can not be found. So something is happening inside the process that prevents it from getting out of the loop.