I'm sure this has happened to all of you and I'm seeking a good solution: You come up on someone who is not looking at you and doesn't see you coming; or, someone is approaching you with their head down, as I experienced today with someone coming to my porch to deliver a package, head down...how or what do you say or do not to startle them, if it's even possible. I used a low voice to say hello and the delivery guy was still startled when he looked up.
I scrape my foot on the ground to make a noise
Which leads me to the joke I can't help but tell here. Two guys are approaching each other both scraping a foot, one guy says "Vietnam 67" the other guy says "dog shit a block back"
Don't worry about it, in this day and age there are plenty of videos of people walking into ponds, signposts, whatever because they are not paying attention to their surroundings, being startled is a very mild outcome.
When I was about 19 I was off work sick for a while and while I was lying down resting somebody tried to break in, I bellowed at them, they scarpered so all was well and good. Anyway a couple of days later still off work and hear someone opening the garage door to come round the back, so I thought the same p&^)k was back again, go into the kitchen, grab a chef's knife and out I go to confront them yelling loudly. Problem was it was just a delivery man nobody had bothered to tell me about, poor guy was more than startled and I apologized profusely, however he got over it once I explained about the attempted break in.
The moral of the story is that being startled is not likely to hurt anyone, not being aware of your surroundings on the other hand can be dangerous. If you've said hello in a low voice I'd say no fault: no foul, though I would suggest that a normal speaking voice might be more appropriate as people whispering at you is actually more threatening (seems like they don't want other people to hear.)