Discussing it in advance will avoid unpleasant problems. When people visit you, they come to the door and knock or ring the doorbell. A resident room in a nursing home is home. Knock before entering and ask permission to enter. If the resident is unable to respond, then announce yourself before walking in.
Greetings usually involve some form of physical contact.
You shake hands or hug or kiss. Nursing home residents are removed from family and friends who provide this sense of touch. Think a moment about what the quality of your life would be if no one ever touched you except to bathe or toilet you. Touching tells us that we are accepted, human and desirable. Once in the room, make some form of physical contact unless it is absolutely inappropriate.