Ayoub El Khazzani's lawyer said he had a “precise, well-defined target”, the source said.
The lawyer, Sarah Mauger-Poliak, is said to have told investigators: “It was no accident that he boarded the first-class part of the train.”
However, the lawyer said her client had told investigators he had not intended to “carry out a massacre and kill just anyone” on the Amsterdam to Paris train in August 2015.
The account differs from earlier versions of the story that the gunman has told investigators. He initially said he had only wanted to carry out a robbery, using a Kalashnikov rifle he claimed he found in a park where he was sleeping rough.
Khazzani shot and seriously injured a passenger before he was overpowered by two off-duty US servicemen and their friend.
Investigators believe their actions almost certainly prevented carnage in the train.
In questioning, the gunman described his route from Syria through Turkey and into Europe, travelling with Abdelhamid Abaaoud, who a few months later would play a leading role in the Paris attacks in which 130 people were killed.
Hungarian authorities say they have records of the pair entering Hungary on August 1 before heading for Austria as they moved through Europe.
El Khazzani, who is in custody in France, is due to be questioned again on December 20.