I ride a lot of so-called 'shared pathways'. I ding my bell to get their attention if I'm overtaking; having confirmed that, I note which shoulder they instinctively look over. I then yell out "passing on left" or "passing on right" dependent on that.
If I'm simply passing head on, I always move far left at around 100 metres closing distance (in Australia).
Never had any grief with this MO.