US President Barack Obama said Thursday's "heartbreaking" shootings in Chattanooga that killed four Marines appeared to be the work of a lone gunman.