It is a good idea to carefully seek out the people that do want to chat. Then you are less likely to annoy folks.
Some people need space. I liken it to rebuilding indexes after a days transactions at work. Just don't annoy them. Give them space.
But some people have rebuilt their indexes and would really like to use them. That is they have something interesting to chat about and would really like to. To ignore that person is to neglect a community building opportunity. A person wanting to chat only needs to find other chatters using low threat techniques.
Some people have very scary connection methods. For example it is like: 'Hi my name is guest and my password is guest and I grant you select permissions on everything in my database.'
People respond by going 'I never have a username and password the same in my security systems. Your database is vulnerable. Connection refused.' Which is like a blank stare of gruff response.
The basics are ...
People with headphones in are not wanting to chat.
People consistently staring out the window or at their phone probably do not want to chat.
People looking at you with an unthreatening genuine smile may want to chat.
People reading a book...now that is interesting...the thing is how 'attached' are they to their book?
Once I sat down near someone reading a book. I got my book out but before I commenced reading it I asked 'What are you reading?' The person responded by lifting the book up and turning their head to the side so they could read the book while they showed me the cover. I politely replied 'oh thanks' and then read my book. They lowered their book without breaking eye contact with it.
So they were highly attached to the book and any further communication attempts would be annoying. So I desisted.
However another day I was crammed up against the door with one other person facing me reading a book. So I tried once more 'What are you reading? or Is it a good book?' The person closed their book and said 'I am glad someone started to talk, this book is so boring.' So we chatted all the way from town, about 20 min. People are interesting.
Another low threat technique is to comment genuinely at the beauty of nature as you pass it. When the sun is rising/setting over the ocean and the clouds part and a beam of light hits the water showing a collection of boats aligned by the wind. It is 'normal' to express something in the moment as the train passes it. Like 'wow look at that.' If the person next to you is sharing the moment then you have a connection. However even if they agree it is beautiful they still may not want to chat.
Recognizing who wants to chat and what about and how much in a public place is a skill.
Some comments or questions can expose a person in public. That is not a goal.
I liken the technique to managing databases. Back people up with your comments. Don't rave on about 'passwords'. If you sense 'key loggers' or third party people tracking your conversations to intently then that is to be avoided as well.
There are a few techniques to chatting in public. I once met a guy who was certified in both avionics and air frames maintenance of aircraft. Those two areas are individually intense and, to be qualified in both, is not common. Similarly some people do have the public chat skills. And if you met a good one in operation it is an art.
If you have had a successfully chat a good comment is 'Nice to met you or nice to talk with you.'