Bug 884934: Set up and display relevant environment variables correctly.

This is one possible solution for the bugzilla ticket.