Allow configuring GUI options from command line and environment (fixes #505, closes #507)