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