cleaning up x detection/xterm initialization