Fixed a bug where an xterm window was launching even if an X session was already running.