# HG changeset patch # User Torsten Lilge # Date 1712852648 -7200 # Node ID f2314b4a9b1a536d46ea540d03c4bad9fc33b243 # Parent 2399268f5167456981e44a6b46c8a1136ace75f5 allow to change the application name by env variable (bug #65499) * main-gui.cc (main): check for env variable OCTAVE_GUI_SETTINGS and if present, set application name to its contents leading to a different name of the used settings file diff -r 2399268f5167 -r f2314b4a9b1a src/main-gui.cc --- a/src/main-gui.cc Thu Apr 11 08:44:23 2024 -0400 +++ b/src/main-gui.cc Thu Apr 11 18:24:08 2024 +0200 @@ -144,7 +144,12 @@ octave::sys::env::set_program_name (argv[0]); - octave::qt_application app ("octave", "octave-gui", OCTAVE_VERSION, + std::string app_name ("octave-gui"); + std::string settings_file = octave::sys::env::getenv ("OCTAVE_GUI_SETTINGS"); + if (! settings_file.empty ()) + app_name = settings_file; + + octave::qt_application app ("octave", app_name, OCTAVE_VERSION, argc, argv); int ret = app.execute ();