added xvfb stuff from tools::check_packages_in_dir