US President Donald Trump and Chinese President Xi Jinping exchanged pleasantries and a firm handshake before heading for a closed-door meeting.