Fix up xdisplay and sudo check