xsession: move to generic and add sample