Allow configuring GUI options from command line and environment

Fixes #505
Closes #507