Update setup_env for new UI

This replaces #469 which is a PR onto the now-obsolete develop-frontend.