change startX function to make it work with Xorg 1.6+logind