add xorg backend, fix some errors