Is it possible to get ST-LINK's virtual COM port working without launching any program in Ubuntu?
There should be no real interaction between GDB or OpenOCD and the virtual serial port of an STM32 Discovery or Nucleo board, however the  modemmanager package installed by default in Ubuntu and derived distributions will substantially delay availability of the CDC/ACM device after each reset, which typically includes not just connections but some programming operations (at least those using the mass storage emulation).

Things will work much better with modemmanger uninstalled.  Please don't argue about this until you have actually tried removing it - the issue is behind the scenes, a delay in the operating system making the port available to user programs.  It makes the difference between the boards being essentially useless, and working fairly well (a udev rule or driver blacklist to ignore the marginally broken mass storage emulation is a good idea, too)

You will however still probably need to establish appropriate serial line settings, with something like stty if not an actual terminal program - without that (and possibly even afterwards) you can't just go using something like cat that is ignorant of serial port details to interact with the port (though often if you do have a terminal program running, you can use echo or cat and a shell redirect alongside to write specific lines to it)