Better handling of GUI apps started from the cli